Skip to content

Commit

Permalink
4.28
Browse files Browse the repository at this point in the history
  • Loading branch information
odudename committed Nov 6, 2024
1 parent 91ec805 commit 8b27b14
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 61 deletions.
4 changes: 2 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: gallery, photo gallery, image gallery, video gallery, Frontend, visitor
Requires at least: 5.0.0
Requires PHP: 5.5
Tested up to: 6.6.2
Stable tag: 4.27
Stable tag: 4.28
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -189,7 +189,7 @@ At Flexi Settings all configuration are ready, but do check all automatically cr

== Changelog ==

= 4.27 =
= 4.28 =
* Block editor recreated supporting latest version of wordpress.


Expand Down
8 changes: 4 additions & 4 deletions flexi.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
* that starts the plugin.
*
* @link https://odude.com/
* @since 4.27
* @since 4.28
* @package Flexi
*
* @wordpress-plugin
* Plugin Name: Flexi - Guest Submit
* Plugin URI: https://odude.com/
* Description: User submitted images/video into gallery
* Version: 4.27
* Version: 4.28
* Author: ODude
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
Expand All @@ -37,7 +37,7 @@

// The current version of the plugin
if (!defined('FLEXI_VERSION')) {
define('FLEXI_VERSION', '4.27');
define('FLEXI_VERSION', '4.28');
}
define('FLEXI_FOLDER', dirname(plugin_basename(__FILE__)));
define('FLEXI_PLUGIN_URL', content_url('/plugins/' . FLEXI_FOLDER));
Expand Down Expand Up @@ -96,4 +96,4 @@ function run_flexi()
$plugin = new Flexi();
$plugin->run();
}
run_flexi();
run_flexi();
52 changes: 29 additions & 23 deletions includes/addon/class-flexi-appearance-style.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Gallery appearance settings
*
Expand All @@ -8,98 +9,103 @@
* @package Flexi
* @subpackage Flexi/includes/addon
*/
class Flexi_Addon_Appearance_Style {
private $help = ' <a style="text-decoration: none;" href="https://odude.com/blog/docs/flexi-gallery/tutorial/appearance-css-style/" target="_blank"><span class="dashicons dashicons-editor-help"></span></a>';
class Flexi_Addon_Appearance_Style
{
private $help = ' <a style="text-decoration: none;" href="https://odude.com/flexi/docs/flexi-gallery/tutorial/appearance-css-style/" target="_blank"><span class="dashicons dashicons-editor-help"></span></a>';

public function __construct() {
public function __construct()
{

add_filter( 'flexi_settings_sections', array( $this, 'add_section' ) );
add_filter( 'flexi_settings_fields', array( $this, 'add_fields' ) );
add_filter('flexi_settings_sections', array($this, 'add_section'));
add_filter('flexi_settings_fields', array($this, 'add_fields'));
}

// add_filter flexi_settings_tabs
public function add_tabs( $new ) {
public function add_tabs($new)
{
$tabs = array();
$new = array_merge( $tabs, $new );
$new = array_merge($tabs, $new);
return $new;
}

// Add Section title
public function add_section( $new ) {
public function add_section($new)
{

$sections = array(
array(
'id' => 'flexi_app_style_settings',
'title' => __( 'Appearance CSS Style', 'flexi' ),
'description' => __( 'Change colors, fonts of flexi elements using your own css style classes.<br>Form colors can abe achieved by using class attribute in shortcode.', 'flexi' ) . ' ' . $this->help,
'title' => __('Appearance CSS Style', 'flexi'),
'description' => __('Change colors, fonts of flexi elements using your own css style classes.<br>Form colors can abe achieved by using class attribute in shortcode.', 'flexi') . ' ' . $this->help,
'tab' => 'general',
),
);
$new = array_merge( $new, $sections );
$new = array_merge($new, $sections);

return $new;
}

// Add section fields
public function add_fields( $new ) {
public function add_fields($new)
{

$fields = array(
'flexi_app_style_settings' => array(
array(
'name' => 'flexi_style_text_color',
'label' => __( 'Text color', 'flexi' ),
'description' => __( 'fl-has-text-black fl-has-text-danger fl-has-text-success', 'flexi' ),
'label' => __('Text color', 'flexi'),
'description' => __('fl-has-text-black fl-has-text-danger fl-has-text-success', 'flexi'),
'type' => 'text',
'sanitize_callback' => 'sanitize_key',
),
array(
'name' => 'flexi_style_base_color',
'label' => __( 'Base/container color', 'flexi' ),
'description' => __( 'fl-has-background-black fl-has-background-white', 'flexi' ),
'label' => __('Base/container color', 'flexi'),
'description' => __('fl-has-background-black fl-has-background-white', 'flexi'),
'type' => 'text',
'sanitize_callback' => 'sanitize_key',
),

array(
'name' => 'flexi_style_heading',
'type' => 'text',
'label' => __( 'Gallery title heading', 'flexi' ),
'label' => __('Gallery title heading', 'flexi'),
'description' => 'fl-is-4 fl-mb-1 fl-has-text-success',
),
array(
'name' => 'flexi_style_tag',
'type' => 'text',
'label' => __( 'Gallery filter tag style', 'flexi' ),
'label' => __('Gallery filter tag style', 'flexi'),
'description' => 'fl-is-medium',
),
array(
'name' => 'flexi_style_button',
'type' => 'text',
'label' => __( 'Flexi regular buttons', 'flexi' ),
'label' => __('Flexi regular buttons', 'flexi'),
'description' => 'fl-button fl-is-small fl-is-info',
),

array(
'name' => 'flexi_style_icon_grid',
'type' => 'text',
'label' => __( 'Icon grid buttons', 'flexi' ),
'label' => __('Icon grid buttons', 'flexi'),
'description' => 'fl-is-small flexi_css_button',
),

array(
'name' => 'flexi_style_common_toolbar',
'type' => 'text',
'label' => __( 'Common toolbar buttons', 'flexi' ),
'label' => __('Common toolbar buttons', 'flexi'),
'description' => 'fl-is-light',
),

),
);
$new = array_merge( $new, $fields );
$new = array_merge($new, $fields);

return $new;
}
}

// Ultimate Member: Setting at Flexi & Tab at profile page
$appstyle = new Flexi_Addon_Appearance_Style();
$appstyle = new Flexi_Addon_Appearance_Style();
4 changes: 2 additions & 2 deletions includes/addon/class-flexi-ffmpeg.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function flexi_ffmpeg_report()
array(
'id' => 'flexi_ffmpeg_setting',
'title' => 'FFMPEG ' . __('settings', 'flexi'),
'description' => $this->help . ' <b><a href="https://ffmpeg.org/">FFMPEG</a></b> PHP ' . __('extension must be installed on your server.<br><b>shell_exec</b> should be enabled by PHP or purchase <a href="https://odude.com/product/flexi-library-ffmpeg/">FFMPEG- Flexi Library</a><br>This will only get applied to newly submitted video files.<br>Processing time based on video file sizes.<br>Thumbnail are based on media settings, medium size<br>Animated video results poor quality. Install Flexi-PRO for higher resolution.<hr>FFMPEG Library required purchase of flexi-pro<hr>' . flexi_ffmpeg_report() . '<hr>This library requires a working FFMpeg install. You will need both FFMpeg and FFProbe binaries to use it.', 'flexi'),
'description' => $this->help . ' <b><a href="https://ffmpeg.org/">FFMPEG</a></b> PHP ' . __('extension must be installed on your server.<br><b>shell_exec</b> should be enabled by PHP or purchase <a href="https://odude.com/flexi/product/flexi-library-ffmpeg/">FFMPEG- Flexi Library</a><br>This will only get applied to newly submitted video files.<br>Processing time based on video file sizes.<br>Thumbnail are based on media settings, medium size<br>Animated video results poor quality. Install Flexi-PRO for higher resolution.<hr>FFMPEG Library required purchase of flexi-pro<hr>' . flexi_ffmpeg_report() . '<hr>This library requires a working FFMpeg install. You will need both FFMpeg and FFProbe binaries to use it.', 'flexi'),
'tab' => 'general',
),
);
Expand Down Expand Up @@ -273,4 +273,4 @@ public function make_jpg($input, $output, $ffmpegpath, $palette, $ffmpeg_process
}

// FFMPEG settings
$conflict = new Flexi_Addon_FFMPEG();
$conflict = new Flexi_Addon_FFMPEG();
57 changes: 28 additions & 29 deletions includes/dashboard/class-flexi-dashboard-layout.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Import external layouts created specially for Flexi
*
Expand Down Expand Up @@ -79,7 +80,6 @@ public function deleteAll($dir, $remove = false)
rmdir($dir);
}
}

}

//Upload .zip file
Expand Down Expand Up @@ -194,10 +194,10 @@ public function flexi_dashboard_content()
}
}

?>
?>

<div style="text-align:right;"> <a href="https://flexi.odude.com/layout/" class="button-secondary">More FREE/PAID
Gallery</a> </div>
<div style="text-align:right;"> <a href="#" class="button-secondary">More FREE/PAID
Gallery Soon...</a> </div>

<h3>Gallery Layouts</h3>
<div class="about-text card">
Expand All @@ -214,22 +214,22 @@ public function flexi_dashboard_content()
<div class="theme-browser rendered">
<div class="themes wp-clearfix">
<?php
$output = "";
$folder = "gallery";
$dir = FLEXI_BASE_DIR . 'public/partials/layout/' . $folder . '/';
$files = array_map("htmlspecialchars", scandir($dir));
foreach ($files as $file) {
if (!strpos($file, '.') && "." != $file && ".." != $file) {
$style_path = FLEXI_BASE_DIR . 'public/partials/layout/' . $folder . '/' . $file . '/style.css';
$version = $this->get_layout_info($style_path, 'version');
$url = $this->get_layout_info($style_path, 'url');
$screenshot = FLEXI_BASE_DIR . 'public/partials/layout/' . $folder . '/' . $file . '/screenshot.png';
if (file_exists($screenshot)) {
$screenshot = FLEXI_ROOT_URL . 'public/partials/layout/' . $folder . '/' . $file . '/screenshot.png';
} else {
$output = "";
$folder = "gallery";
$dir = FLEXI_BASE_DIR . 'public/partials/layout/' . $folder . '/';
$files = array_map("htmlspecialchars", scandir($dir));
foreach ($files as $file) {
if (!strpos($file, '.') && "." != $file && ".." != $file) {
$style_path = FLEXI_BASE_DIR . 'public/partials/layout/' . $folder . '/' . $file . '/style.css';
$version = $this->get_layout_info($style_path, 'version');
$url = $this->get_layout_info($style_path, 'url');
$screenshot = FLEXI_BASE_DIR . 'public/partials/layout/' . $folder . '/' . $file . '/screenshot.png';
if (file_exists($screenshot)) {
$screenshot = FLEXI_ROOT_URL . 'public/partials/layout/' . $folder . '/' . $file . '/screenshot.png';
} else {

$screenshot = FLEXI_ROOT_URL . 'admin/img/screenshot.png';
}
$screenshot = FLEXI_ROOT_URL . 'admin/img/screenshot.png';
}
?>
<div class="theme active" tabindex="0" aria-describedby="dukan-lite-action dukan-lite-name"
data-slug="dukan-lite">
Expand All @@ -248,23 +248,23 @@ public function flexi_dashboard_content()
</h2>
<?php

if (!in_array($file, $safe_layout)) {
?>
if (!in_array($file, $safe_layout)) {
?>
<div class="theme-actions">
<?php
$layout_page = add_query_arg('delete', trim($file), $layout_page);
?>
$layout_page = add_query_arg('delete', trim($file), $layout_page);
?>
<a class="button button-primary customize load-customize hide-if-no-customize"
href="<?php echo esc_url_raw($layout_page); ?>">Delete</a>
</div>
<?php }?>
<?php } ?>
</div>
</div>

<?php
}
}
?>
}
}
?>
</div>
</div>

Expand All @@ -273,7 +273,7 @@ public function flexi_dashboard_content()


<?php
$content = ob_get_clean();
$content = ob_get_clean();
return $content;
}
public function get_layout_info($css, $key)
Expand All @@ -292,7 +292,6 @@ public function get_layout_info($css, $key)
} else {
$linea .= '';
}

}
}

Expand Down
2 changes: 1 addition & 1 deletion includes/dashboard/class-flexi-dashboard-pro.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function flexi_dashboard_content()

?>

<div style="text-align:right;"> <a href="https://odude.com/product-category/flexi/"
<div style="text-align:right;"> <a href="https://odude.com/flexi/product-category/flexi/"
class="button-secondary">Purchase/Renew Flexi-PRO</a> </div>

<div class="card">
Expand Down

0 comments on commit 8b27b14

Please sign in to comment.