Changeset 3183294
- Timestamp:
- 11/06/2024 03:56:05 PM (13 months ago)
- Location:
- flexi
- Files:
-
- 76 added
- 2 deleted
- 18 edited
- 1 copied
-
tags/4.27 (copied) (copied from flexi/trunk)
-
tags/4.27/README.txt (modified) (2 diffs)
-
tags/4.27/block (deleted)
-
tags/4.27/blocks (added)
-
tags/4.27/blocks/flexi-form-block (added)
-
tags/4.27/blocks/flexi-form-block/.editorconfig (added)
-
tags/4.27/blocks/flexi-form-block/build (added)
-
tags/4.27/blocks/flexi-form-block/build/block.json (added)
-
tags/4.27/blocks/flexi-form-block/build/index.asset.php (added)
-
tags/4.27/blocks/flexi-form-block/build/index.js (added)
-
tags/4.27/blocks/flexi-form-block/flexi-form-block.php (added)
-
tags/4.27/blocks/flexi-form-block/package-lock.json (added)
-
tags/4.27/blocks/flexi-form-block/package.json (added)
-
tags/4.27/blocks/flexi-form-block/readme.txt (added)
-
tags/4.27/blocks/flexi-form-block/src (added)
-
tags/4.27/blocks/flexi-form-block/src/block.json (added)
-
tags/4.27/blocks/flexi-form-block/src/edit.js (added)
-
tags/4.27/blocks/flexi-form-block/src/editor.scss (added)
-
tags/4.27/blocks/flexi-form-block/src/index.js (added)
-
tags/4.27/blocks/flexi-form-block/src/save.js (added)
-
tags/4.27/blocks/flexi-form-block/src/style.scss (added)
-
tags/4.27/blocks/flexi-form-block/src/test.txt (added)
-
tags/4.27/blocks/flexi-form-block/src/view.js (added)
-
tags/4.27/blocks/flexi-gallery-block (added)
-
tags/4.27/blocks/flexi-gallery-block/.editorconfig (added)
-
tags/4.27/blocks/flexi-gallery-block/build (added)
-
tags/4.27/blocks/flexi-gallery-block/build/block.json (added)
-
tags/4.27/blocks/flexi-gallery-block/build/index.asset.php (added)
-
tags/4.27/blocks/flexi-gallery-block/build/index.js (added)
-
tags/4.27/blocks/flexi-gallery-block/flexi-gallery-block.php (added)
-
tags/4.27/blocks/flexi-gallery-block/package-lock.json (added)
-
tags/4.27/blocks/flexi-gallery-block/package.json (added)
-
tags/4.27/blocks/flexi-gallery-block/readme.txt (added)
-
tags/4.27/blocks/flexi-gallery-block/src (added)
-
tags/4.27/blocks/flexi-gallery-block/src/block.json (added)
-
tags/4.27/blocks/flexi-gallery-block/src/edit.js (added)
-
tags/4.27/blocks/flexi-gallery-block/src/editor.scss (added)
-
tags/4.27/blocks/flexi-gallery-block/src/index.js (added)
-
tags/4.27/blocks/flexi-gallery-block/src/save.js (added)
-
tags/4.27/blocks/flexi-gallery-block/src/style.scss (added)
-
tags/4.27/blocks/flexi-gallery-block/src/view.js (added)
-
tags/4.27/flexi.php (modified) (4 diffs)
-
tags/4.27/includes/class-flexi-gallery.php (modified) (2 diffs)
-
tags/4.27/includes/class-flexi.php (modified) (1 diff)
-
tags/4.27/includes/class-flexi_ajax_like.php (modified) (3 diffs)
-
tags/4.27/includes/class-flexi_view_count.php (modified) (7 diffs)
-
tags/4.27/includes/dashboard/class-flexi-dashboard-pro.php (modified) (8 diffs)
-
tags/4.27/includes/functions.php (modified) (1 diff)
-
tags/4.27/public/partials/layout/gallery/portfolio/loop.php (modified) (2 diffs)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/block (deleted)
-
trunk/blocks (added)
-
trunk/blocks/flexi-form-block (added)
-
trunk/blocks/flexi-form-block/.editorconfig (added)
-
trunk/blocks/flexi-form-block/build (added)
-
trunk/blocks/flexi-form-block/build/block.json (added)
-
trunk/blocks/flexi-form-block/build/index.asset.php (added)
-
trunk/blocks/flexi-form-block/build/index.js (added)
-
trunk/blocks/flexi-form-block/flexi-form-block.php (added)
-
trunk/blocks/flexi-form-block/package-lock.json (added)
-
trunk/blocks/flexi-form-block/package.json (added)
-
trunk/blocks/flexi-form-block/readme.txt (added)
-
trunk/blocks/flexi-form-block/src (added)
-
trunk/blocks/flexi-form-block/src/block.json (added)
-
trunk/blocks/flexi-form-block/src/edit.js (added)
-
trunk/blocks/flexi-form-block/src/editor.scss (added)
-
trunk/blocks/flexi-form-block/src/index.js (added)
-
trunk/blocks/flexi-form-block/src/save.js (added)
-
trunk/blocks/flexi-form-block/src/style.scss (added)
-
trunk/blocks/flexi-form-block/src/test.txt (added)
-
trunk/blocks/flexi-form-block/src/view.js (added)
-
trunk/blocks/flexi-gallery-block (added)
-
trunk/blocks/flexi-gallery-block/.editorconfig (added)
-
trunk/blocks/flexi-gallery-block/build (added)
-
trunk/blocks/flexi-gallery-block/build/block.json (added)
-
trunk/blocks/flexi-gallery-block/build/index.asset.php (added)
-
trunk/blocks/flexi-gallery-block/build/index.js (added)
-
trunk/blocks/flexi-gallery-block/flexi-gallery-block.php (added)
-
trunk/blocks/flexi-gallery-block/package-lock.json (added)
-
trunk/blocks/flexi-gallery-block/package.json (added)
-
trunk/blocks/flexi-gallery-block/readme.txt (added)
-
trunk/blocks/flexi-gallery-block/src (added)
-
trunk/blocks/flexi-gallery-block/src/block.json (added)
-
trunk/blocks/flexi-gallery-block/src/edit.js (added)
-
trunk/blocks/flexi-gallery-block/src/editor.scss (added)
-
trunk/blocks/flexi-gallery-block/src/index.js (added)
-
trunk/blocks/flexi-gallery-block/src/save.js (added)
-
trunk/blocks/flexi-gallery-block/src/style.scss (added)
-
trunk/blocks/flexi-gallery-block/src/view.js (added)
-
trunk/flexi.php (modified) (4 diffs)
-
trunk/includes/class-flexi-gallery.php (modified) (2 diffs)
-
trunk/includes/class-flexi.php (modified) (1 diff)
-
trunk/includes/class-flexi_ajax_like.php (modified) (3 diffs)
-
trunk/includes/class-flexi_view_count.php (modified) (7 diffs)
-
trunk/includes/dashboard/class-flexi-dashboard-pro.php (modified) (8 diffs)
-
trunk/includes/functions.php (modified) (1 diff)
-
trunk/public/partials/layout/gallery/portfolio/loop.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
flexi/tags/4.27/README.txt
r3175928 r3183294 6 6 Requires PHP: 5.5 7 7 Tested up to: 6.6.2 8 Stable tag: 4.2 68 Stable tag: 4.27 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 190 190 == Changelog == 191 191 192 = 4.27 = 193 * Block editor recreated supporting latest version of wordpress. 194 195 192 196 = 4.26 = 193 197 * No features added. Only made it compatible to work with latest version of wordpress -
flexi/tags/4.27/flexi.php
r3175928 r3183294 10 10 * 11 11 * @link https://odude.com/ 12 * @since 4.2 612 * @since 4.27 13 13 * @package Flexi 14 14 * … … 17 17 * Plugin URI: https://odude.com/ 18 18 * Description: User submitted images/video into gallery 19 * Version: 4.2 619 * Version: 4.27 20 20 * Author: ODude 21 21 * License: GPL-2.0+ … … 38 38 // The current version of the plugin 39 39 if (!defined('FLEXI_VERSION')) { 40 define('FLEXI_VERSION', '4.2 6');40 define('FLEXI_VERSION', '4.27'); 41 41 } 42 42 define('FLEXI_FOLDER', dirname(plugin_basename(__FILE__))); … … 44 44 define('FLEXI_BASE_DIR', WP_CONTENT_DIR . '/plugins/' . FLEXI_FOLDER . '/'); 45 45 define('FLEXI_ROOT_URL', plugin_dir_url(__FILE__)); 46 define('FLEXI_HOST', "https://odude.com/ wp-json/lmfwc/v2/licenses/");46 define('FLEXI_HOST', "https://odude.com/flexi/wp-json/lmfwc/v2/licenses/"); 47 47 define('FLEXI_CK', 'ck_cc93b6452693ea129f6fb4696f50275a4282840a'); 48 48 define('FLEXI_CS', 'cs_5bab8367ab36992b00f1fe69d866c3bbf4820dbe'); -
flexi/tags/4.27/includes/class-flexi-gallery.php
r2743905 r3183294 526 526 ?> 527 527 528 <script>529 jQuery(document).ready(function() {530 // console.log("start");531 document.documentElement.style.setProperty('--flexi_padding', jQuery("#padding").text());532 533 <?php528 <script> 529 jQuery(document).ready(function() { 530 // console.log("start"); 531 document.documentElement.style.setProperty('--flexi_padding', jQuery("#padding").text()); 532 533 <?php 534 534 $enable_conflict = flexi_get_option('conflict_disable_fancybox', 'flexi_conflict_settings', 0); 535 535 if ('1' != $enable_conflict) { 536 536 if ('inline' == $atts['popup']) { 537 537 ?> 538 jQuery('[data-fancybox-trigger').fancybox({539 selector: '.flexi_show_popup_<?php echo esc_attr($atts['popup']); ?> a:visible',540 thumbs: {541 autoStart: false542 },543 protect: false,544 arrows: false,545 });546 <?php538 jQuery('[data-fancybox-trigger').fancybox({ 539 selector: '.flexi_show_popup_<?php echo esc_attr($atts['popup']); ?> a:visible', 540 thumbs: { 541 autoStart: false 542 }, 543 protect: false, 544 arrows: false, 545 }); 546 <?php 547 547 } elseif ('custom' == $atts['popup']) { 548 548 549 549 ?> 550 jQuery('[custom-lightbox').fancybox({551 selector: '.flexi_show_popup_custom a:visible',552 thumbs: {553 autoStart: false554 },555 autoSize: false,556 protect: false,557 arrows: false,558 });559 <?php550 jQuery('[custom-lightbox').fancybox({ 551 selector: '.flexi_show_popup_custom a:visible', 552 thumbs: { 553 autoStart: false 554 }, 555 autoSize: false, 556 protect: false, 557 arrows: false, 558 }); 559 <?php 560 560 } elseif ('simple' == $atts['popup'] || 'simple_info' == $atts['popup']) { 561 561 ?> 562 562 563 var lightbox = GODude();564 var lightboxDescription = GODude({565 selector: '.godude',566 });567 <?php563 var lightbox = GODude(); 564 var lightboxDescription = GODude({ 565 selector: '.godude', 566 }); 567 <?php 568 568 } else { 569 569 ?> 570 jQuery('[data-fancybox-trigger').fancybox({571 selector: '.flexi_show_popup_<?php echo esc_attr($atts['popup']); ?> a:visible',572 thumbs: {573 autoStart: true574 },575 protect: true,576 caption: function(instance, item) {577 //This is not working on ajax loading. only for for page navigation.578 // return jQuery(this).closest('flexi_media_holder').find('flexi_figcaption').html();579 return jQuery(this).find('.flexi_figcaption').html();580 581 582 }583 });584 <?php570 jQuery('[data-fancybox-trigger').fancybox({ 571 selector: '.flexi_show_popup_<?php echo esc_attr($atts['popup']); ?> a:visible', 572 thumbs: { 573 autoStart: true 574 }, 575 protect: true, 576 caption: function(instance, item) { 577 //This is not working on ajax loading. only for for page navigation. 578 // return jQuery(this).closest('flexi_media_holder').find('flexi_figcaption').html(); 579 return jQuery(this).find('.flexi_figcaption').html(); 580 581 582 } 583 }); 584 <?php 585 585 } 586 586 } 587 587 ?> 588 588 589 });590 </script>591 592 <?php589 }); 590 </script> 591 592 <?php 593 593 $put = ob_get_clean(); 594 594 echo $put; … … 610 610 611 611 ?> 612 <style>613 :root {614 --flexi_t_width: <?php echo esc_attr($t_width);615 ?>px;616 --flexi_t_height: <?php echo esc_attr($t_height);617 ?>px;618 --flexi_m_width: <?php echo esc_attr($m_width);619 ?>px;620 --flexi_m_height: <?php echo esc_attr($m_height);621 ?>px;622 --flexi_l_width: <?php echo esc_attr($l_width);623 ?>px;624 --flexi_l_height: <?php echo esc_attr($l_height);625 ?>px;626 --flexi_padding: <?php echo esc_attr($padding);627 ?>px;628 }629 </style>630 <?php612 <style> 613 :root { 614 --flexi_t_width: <?php echo esc_attr($t_width); 615 ?>px; 616 --flexi_t_height: <?php echo esc_attr($t_height); 617 ?>px; 618 --flexi_m_width: <?php echo esc_attr($m_width); 619 ?>px; 620 --flexi_m_height: <?php echo esc_attr($m_height); 621 ?>px; 622 --flexi_l_width: <?php echo esc_attr($l_width); 623 ?>px; 624 --flexi_l_height: <?php echo esc_attr($l_height); 625 ?>px; 626 --flexi_padding: <?php echo esc_attr($padding); 627 ?>px; 628 } 629 </style> 630 <?php 631 631 if (isset($_GET['flexi_layout'])) { 632 632 ?> 633 <style>634 .fl-column {635 border-radius: .500em;636 border: dotted;637 }638 </style>639 <script>640 jQuery(document).ready(function() {641 var colors = ['red', 'blue', 'green', 'yellow', 'cyan', 'orange', 'pink', 'grey', 'white', 'black',642 'rosybrown', 'tan', 'plum', 'saddlebrown'643 ];644 jQuery.each(jQuery('.fl-column'), function() {645 var new_color = colors[Math.floor(Math.random() * colors.length)];646 jQuery(this).css('background-color', new_color);647 });648 });649 </script>650 <?php633 <style> 634 .fl-column { 635 border-radius: .500em; 636 border: dotted; 637 } 638 </style> 639 <script> 640 jQuery(document).ready(function() { 641 var colors = ['red', 'blue', 'green', 'yellow', 'cyan', 'orange', 'pink', 'grey', 'white', 'black', 642 'rosybrown', 'tan', 'plum', 'saddlebrown' 643 ]; 644 jQuery.each(jQuery('.fl-column'), function() { 645 var new_color = colors[Math.floor(Math.random() * colors.length)]; 646 jQuery(this).css('background-color', new_color); 647 }); 648 }); 649 </script> 650 <?php 651 651 } 652 652 ?> -
flexi/tags/4.27/includes/class-flexi.php
r2743905 r3183294 119 119 120 120 //Block 121 require_once plugin_dir_path(dirname(__FILE__)) . 'block/plugin.php'; 121 //require_once plugin_dir_path(dirname(__FILE__)) . 'block/plugin.php'; 122 require_once plugin_dir_path(dirname(__FILE__)) . 'blocks/flexi-gallery-block/flexi-gallery-block.php'; 123 require_once plugin_dir_path(dirname(__FILE__)) . 'blocks/flexi-form-block/flexi-form-block.php'; 122 124 123 125 //Widgets -
flexi/tags/4.27/includes/class-flexi_ajax_like.php
r2675492 r3183294 1 1 <?php 2 2 3 /** 3 4 * Like/Unlike button on gallery page … … 87 88 $toggle = flexi_evalue_toggle('like', $evalue); 88 89 89 if (($enable == 1 )) {90 if (($enable == 1 && $toggle == "")) { 90 91 $extra_icon = array(); 91 92 $nonce = wp_create_nonce('flexi_ajax_like'); … … 130 131 // flexi_log($toggle); 131 132 132 if (($enable == 1 )) {133 if (($enable == 1 && $toggle == "")) { 133 134 $extra_icon = array(); 134 135 $nonce = wp_create_nonce('flexi_ajax_like'); -
flexi/tags/4.27/includes/class-flexi_view_count.php
r2674031 r3183294 1 1 <?php 2 2 3 /** 3 4 * Display view count on gallery page … … 9 10 * @subpackage Flexi/includes 10 11 */ 11 class flexi_view_count { 12 public function __construct() { 12 class flexi_view_count 13 { 14 public function __construct() 15 { 13 16 // add_action('flexi_module_grid', array($this, 'display_view_count')); 14 17 add_filter('flexi_settings_fields', array($this, 'add_fields')); … … 17 20 } 18 21 19 public function display_view_count($container, $evalue = '', $id = '') { 22 public function display_view_count($container, $evalue = '', $id = '') 23 { 24 //flexi_log('count page ' . $evalue . ' -- ' . $id); 20 25 $enable = flexi_get_option('evalue_count', 'flexi_image_layout_settings', 1); 21 26 $this->increase_count($id, 'flexi_view_count'); 22 // If page is detail page27 //If page is detail page 23 28 if ($evalue == '') { 24 29 $evalue .= 'count:on'; … … 26 31 27 32 $toggle = flexi_evalue_toggle('count', $evalue); 28 // flexi_log($toggle);33 //flexi_log("The value of count is: " . $toggle . ' for evalue: ' . $evalue); 29 34 30 if ( ($enable == 1)) {35 if ($enable == 1 && $toggle == "") { 31 36 $extra_icon = array(); 32 33 $div = '<div style="' . $toggle . '" class="fl-button fl-is-small"> 37 $div = '<div class="fl-button fl-is-small"> 34 38 <span class="fl-icon fl-is-small"><i class="far fa-eye"></i></span> 35 39 <span>' . $this->get_view_count($id, 'flexi_view_count') . '</span></div>'; … … 49 53 50 54 // Total number of like & unlike 51 public function get_view_count($id, $key) { 55 public function get_view_count($id, $key) 56 { 52 57 $count = get_post_meta($id, $key, true); 53 58 return $count; … … 55 60 56 61 // Increase like 57 public function increase_count($post_id, $key) { 62 public function increase_count($post_id, $key) 63 { 58 64 59 65 $count = (int) get_post_meta($post_id, $key, true); … … 63 69 64 70 // enable/disable option at Gallery -> Gallery Settings 65 public function add_fields($new) { 71 public function add_fields($new) 72 { 66 73 67 74 $fields = array( -
flexi/tags/4.27/includes/dashboard/class-flexi-dashboard-pro.php
r2674150 r3183294 1 1 <?php 2 2 3 /** 3 4 * Admin dashboard tab to enable Flexi-Pro … … 9 10 * @subpackage Flexi/includes/dashboard 10 11 */ 11 class Flexi_Admin_Dashboard_Pro { 12 public function __construct() { 12 class Flexi_Admin_Dashboard_Pro 13 { 14 public function __construct() 15 { 13 16 add_filter('flexi_dashboard_tab', array($this, 'add_tabs')); 14 17 add_action('flexi_dashboard_tab_content', array($this, 'add_content')); 15 18 } 16 19 17 public function add_tabs($tabs) { 20 public function add_tabs($tabs) 21 { 18 22 19 23 $extra_tabs = array("pro" => __('Flexi-Pro', 'flexi')); … … 25 29 } 26 30 27 public function add_content() { 31 public function add_content() 32 { 28 33 29 34 if (isset($_GET['tab']) && 'pro' == $_GET['tab']) { … … 32 37 } 33 38 34 public function flexi_dashboard_content() { 39 public function flexi_dashboard_content() 40 { 35 41 ob_start(); 36 42 37 ?>43 ?> 38 44 39 45 <div style="text-align:right;"> <a href="https://odude.com/product-category/flexi/" … … 52 58 53 59 <?php 54 if (isset($_POST['flexi_license'])) {60 if (isset($_POST['flexi_license'])) { 55 61 if (function_exists('flexi_process_license')) { 56 62 … … 64 70 65 71 $res = flexi_process_license(sanitize_text_field($_POST['flexi_license'])); 66 if ('404' == $res->data->status) { 67 echo '<div class="card"><h3>' . esc_attr($res->message) . '</h3></div>'; 72 73 74 // Check if errors are present in the response data 75 if (isset($res->data->errors)) { 76 // Retrieve the first key from the errors object 77 $errorKeys = array_keys(get_object_vars($res->data->errors)); 78 $errorType = $errorKeys[0] ?? null; 79 80 // Check if the error type and message exist 81 if ($errorType && isset($res->data->errors->$errorType[0])) { 82 echo '<div class="card"><h3>' . $res->data->errors->$errorType[0] . '</h3></div>'; 83 } else { 84 echo '<div class="card"><h3>Unknown error occurred.</h3></div>'; 85 } 68 86 } else { 69 87 echo '<div class="card"><h3>License activated</h3></div>'; … … 80 98 <b>Flexi Version: </b> <?php echo esc_attr(FLEXI_VERSION); ?><br> 81 99 <b>Flexi-PRO status:</b> <?php if (is_flexi_pro()) { 82 echo "#####.....<b>Activated</b>.....#####";83 } else {84 echo "Not activated";85 }?><br>100 echo "#####.....<b>Activated</b>.....#####"; 101 } else { 102 echo "Not activated"; 103 } ?><br> 86 104 <?php 87 if (is_flexi_pro()) {88 echo "<b>Flexi-PRO version </b>:" . esc_attr(FLEXI_PRO_VERSION);105 if (is_flexi_pro()) { 106 echo "<b>Flexi-PRO version </b>:" . esc_attr(FLEXI_PRO_VERSION); 89 107 90 $expire = get_option('FLEXI_PRO_EXPIRE', ''); 91 if ('' != $expire) { 92 $expdAt = date($expire); 93 $today = date("Y-m-d H:i:s"); 94 if ($today >= $expdAt) { 95 echo "<br><b>Expired:</b> " . esc_attr($expdAt) . '<br><code> Please renew to regain access for premium features.</code>'; 96 update_option('FLEXI_PRO', 'FAIL'); 97 } else { 98 echo "<br><b>Expires:</b> " . esc_attr($expdAt); 108 $expire = get_option('FLEXI_PRO_EXPIRE', ''); 109 if ('' != $expire) { 110 $expdAt = date($expire); 111 $today = date("Y-m-d H:i:s"); 112 if ($today >= $expdAt) { 113 echo "<br><b>Expired:</b> " . esc_attr($expdAt) . '<br><code> Please renew to regain access for premium features.</code>'; 114 update_option('FLEXI_PRO', 'FAIL'); 115 } else { 116 echo "<br><b>Expires:</b> " . esc_attr($expdAt); 117 } 99 118 } 100 119 } 101 } 102 ?> 120 ?> 103 121 <br> 104 122 <?php 105 echo get_option('FLEXI_PRO_RESPONSE', '');106 ?>123 echo get_option('FLEXI_PRO_RESPONSE', ''); 124 ?> 107 125 </div> 108 126 … … 160 178 </div> 161 179 <?php 162 $content = ob_get_clean();180 $content = ob_get_clean(); 163 181 return $content; 164 182 } -
flexi/tags/4.27/includes/functions.php
r3175924 r3183294 1319 1319 // flexi_log($extra_param); 1320 1320 if (isset($extra_param[$key]) && 'on' == $extra_param[$key]) { 1321 // Flexi_log($extra_param[$key]); 1321 1322 return ''; 1322 1323 } else { -
flexi/tags/4.27/public/partials/layout/gallery/portfolio/loop.php
r2684792 r3183294 42 42 if (flexi_evalue_toggle('excerpt', $evalue) != 'display:none') { 43 43 ?> 44 <div class="fl-content fl-mb-1 fl-is-size-6 <?php echo esc_attr($style_text_color); ?>">45 <?php echo wpautop(wp_kses_post(flexi_excerpt(20))); ?>46 </div>44 <div class="fl-content fl-mb-1 fl-is-size-6 <?php echo esc_attr($style_text_color); ?>"> 45 <?php echo wpautop(wp_kses_post(flexi_excerpt(20))); ?> 46 </div> 47 47 <?php 48 48 } … … 121 121 </div> 122 122 <?php echo wp_kses_post(flexi_show_addon_gallery($evalue, get_the_ID(), 'portfolio')); ?> 123 124 123 </div> 125 124 -
flexi/trunk/README.txt
r3175928 r3183294 6 6 Requires PHP: 5.5 7 7 Tested up to: 6.6.2 8 Stable tag: 4.2 68 Stable tag: 4.27 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 190 190 == Changelog == 191 191 192 = 4.27 = 193 * Block editor recreated supporting latest version of wordpress. 194 195 192 196 = 4.26 = 193 197 * No features added. Only made it compatible to work with latest version of wordpress -
flexi/trunk/flexi.php
r3175928 r3183294 10 10 * 11 11 * @link https://odude.com/ 12 * @since 4.2 612 * @since 4.27 13 13 * @package Flexi 14 14 * … … 17 17 * Plugin URI: https://odude.com/ 18 18 * Description: User submitted images/video into gallery 19 * Version: 4.2 619 * Version: 4.27 20 20 * Author: ODude 21 21 * License: GPL-2.0+ … … 38 38 // The current version of the plugin 39 39 if (!defined('FLEXI_VERSION')) { 40 define('FLEXI_VERSION', '4.2 6');40 define('FLEXI_VERSION', '4.27'); 41 41 } 42 42 define('FLEXI_FOLDER', dirname(plugin_basename(__FILE__))); … … 44 44 define('FLEXI_BASE_DIR', WP_CONTENT_DIR . '/plugins/' . FLEXI_FOLDER . '/'); 45 45 define('FLEXI_ROOT_URL', plugin_dir_url(__FILE__)); 46 define('FLEXI_HOST', "https://odude.com/ wp-json/lmfwc/v2/licenses/");46 define('FLEXI_HOST', "https://odude.com/flexi/wp-json/lmfwc/v2/licenses/"); 47 47 define('FLEXI_CK', 'ck_cc93b6452693ea129f6fb4696f50275a4282840a'); 48 48 define('FLEXI_CS', 'cs_5bab8367ab36992b00f1fe69d866c3bbf4820dbe'); -
flexi/trunk/includes/class-flexi-gallery.php
r2743905 r3183294 526 526 ?> 527 527 528 <script>529 jQuery(document).ready(function() {530 // console.log("start");531 document.documentElement.style.setProperty('--flexi_padding', jQuery("#padding").text());532 533 <?php528 <script> 529 jQuery(document).ready(function() { 530 // console.log("start"); 531 document.documentElement.style.setProperty('--flexi_padding', jQuery("#padding").text()); 532 533 <?php 534 534 $enable_conflict = flexi_get_option('conflict_disable_fancybox', 'flexi_conflict_settings', 0); 535 535 if ('1' != $enable_conflict) { 536 536 if ('inline' == $atts['popup']) { 537 537 ?> 538 jQuery('[data-fancybox-trigger').fancybox({539 selector: '.flexi_show_popup_<?php echo esc_attr($atts['popup']); ?> a:visible',540 thumbs: {541 autoStart: false542 },543 protect: false,544 arrows: false,545 });546 <?php538 jQuery('[data-fancybox-trigger').fancybox({ 539 selector: '.flexi_show_popup_<?php echo esc_attr($atts['popup']); ?> a:visible', 540 thumbs: { 541 autoStart: false 542 }, 543 protect: false, 544 arrows: false, 545 }); 546 <?php 547 547 } elseif ('custom' == $atts['popup']) { 548 548 549 549 ?> 550 jQuery('[custom-lightbox').fancybox({551 selector: '.flexi_show_popup_custom a:visible',552 thumbs: {553 autoStart: false554 },555 autoSize: false,556 protect: false,557 arrows: false,558 });559 <?php550 jQuery('[custom-lightbox').fancybox({ 551 selector: '.flexi_show_popup_custom a:visible', 552 thumbs: { 553 autoStart: false 554 }, 555 autoSize: false, 556 protect: false, 557 arrows: false, 558 }); 559 <?php 560 560 } elseif ('simple' == $atts['popup'] || 'simple_info' == $atts['popup']) { 561 561 ?> 562 562 563 var lightbox = GODude();564 var lightboxDescription = GODude({565 selector: '.godude',566 });567 <?php563 var lightbox = GODude(); 564 var lightboxDescription = GODude({ 565 selector: '.godude', 566 }); 567 <?php 568 568 } else { 569 569 ?> 570 jQuery('[data-fancybox-trigger').fancybox({571 selector: '.flexi_show_popup_<?php echo esc_attr($atts['popup']); ?> a:visible',572 thumbs: {573 autoStart: true574 },575 protect: true,576 caption: function(instance, item) {577 //This is not working on ajax loading. only for for page navigation.578 // return jQuery(this).closest('flexi_media_holder').find('flexi_figcaption').html();579 return jQuery(this).find('.flexi_figcaption').html();580 581 582 }583 });584 <?php570 jQuery('[data-fancybox-trigger').fancybox({ 571 selector: '.flexi_show_popup_<?php echo esc_attr($atts['popup']); ?> a:visible', 572 thumbs: { 573 autoStart: true 574 }, 575 protect: true, 576 caption: function(instance, item) { 577 //This is not working on ajax loading. only for for page navigation. 578 // return jQuery(this).closest('flexi_media_holder').find('flexi_figcaption').html(); 579 return jQuery(this).find('.flexi_figcaption').html(); 580 581 582 } 583 }); 584 <?php 585 585 } 586 586 } 587 587 ?> 588 588 589 });590 </script>591 592 <?php589 }); 590 </script> 591 592 <?php 593 593 $put = ob_get_clean(); 594 594 echo $put; … … 610 610 611 611 ?> 612 <style>613 :root {614 --flexi_t_width: <?php echo esc_attr($t_width);615 ?>px;616 --flexi_t_height: <?php echo esc_attr($t_height);617 ?>px;618 --flexi_m_width: <?php echo esc_attr($m_width);619 ?>px;620 --flexi_m_height: <?php echo esc_attr($m_height);621 ?>px;622 --flexi_l_width: <?php echo esc_attr($l_width);623 ?>px;624 --flexi_l_height: <?php echo esc_attr($l_height);625 ?>px;626 --flexi_padding: <?php echo esc_attr($padding);627 ?>px;628 }629 </style>630 <?php612 <style> 613 :root { 614 --flexi_t_width: <?php echo esc_attr($t_width); 615 ?>px; 616 --flexi_t_height: <?php echo esc_attr($t_height); 617 ?>px; 618 --flexi_m_width: <?php echo esc_attr($m_width); 619 ?>px; 620 --flexi_m_height: <?php echo esc_attr($m_height); 621 ?>px; 622 --flexi_l_width: <?php echo esc_attr($l_width); 623 ?>px; 624 --flexi_l_height: <?php echo esc_attr($l_height); 625 ?>px; 626 --flexi_padding: <?php echo esc_attr($padding); 627 ?>px; 628 } 629 </style> 630 <?php 631 631 if (isset($_GET['flexi_layout'])) { 632 632 ?> 633 <style>634 .fl-column {635 border-radius: .500em;636 border: dotted;637 }638 </style>639 <script>640 jQuery(document).ready(function() {641 var colors = ['red', 'blue', 'green', 'yellow', 'cyan', 'orange', 'pink', 'grey', 'white', 'black',642 'rosybrown', 'tan', 'plum', 'saddlebrown'643 ];644 jQuery.each(jQuery('.fl-column'), function() {645 var new_color = colors[Math.floor(Math.random() * colors.length)];646 jQuery(this).css('background-color', new_color);647 });648 });649 </script>650 <?php633 <style> 634 .fl-column { 635 border-radius: .500em; 636 border: dotted; 637 } 638 </style> 639 <script> 640 jQuery(document).ready(function() { 641 var colors = ['red', 'blue', 'green', 'yellow', 'cyan', 'orange', 'pink', 'grey', 'white', 'black', 642 'rosybrown', 'tan', 'plum', 'saddlebrown' 643 ]; 644 jQuery.each(jQuery('.fl-column'), function() { 645 var new_color = colors[Math.floor(Math.random() * colors.length)]; 646 jQuery(this).css('background-color', new_color); 647 }); 648 }); 649 </script> 650 <?php 651 651 } 652 652 ?> -
flexi/trunk/includes/class-flexi.php
r2743905 r3183294 119 119 120 120 //Block 121 require_once plugin_dir_path(dirname(__FILE__)) . 'block/plugin.php'; 121 //require_once plugin_dir_path(dirname(__FILE__)) . 'block/plugin.php'; 122 require_once plugin_dir_path(dirname(__FILE__)) . 'blocks/flexi-gallery-block/flexi-gallery-block.php'; 123 require_once plugin_dir_path(dirname(__FILE__)) . 'blocks/flexi-form-block/flexi-form-block.php'; 122 124 123 125 //Widgets -
flexi/trunk/includes/class-flexi_ajax_like.php
r2675492 r3183294 1 1 <?php 2 2 3 /** 3 4 * Like/Unlike button on gallery page … … 87 88 $toggle = flexi_evalue_toggle('like', $evalue); 88 89 89 if (($enable == 1 )) {90 if (($enable == 1 && $toggle == "")) { 90 91 $extra_icon = array(); 91 92 $nonce = wp_create_nonce('flexi_ajax_like'); … … 130 131 // flexi_log($toggle); 131 132 132 if (($enable == 1 )) {133 if (($enable == 1 && $toggle == "")) { 133 134 $extra_icon = array(); 134 135 $nonce = wp_create_nonce('flexi_ajax_like'); -
flexi/trunk/includes/class-flexi_view_count.php
r2674031 r3183294 1 1 <?php 2 2 3 /** 3 4 * Display view count on gallery page … … 9 10 * @subpackage Flexi/includes 10 11 */ 11 class flexi_view_count { 12 public function __construct() { 12 class flexi_view_count 13 { 14 public function __construct() 15 { 13 16 // add_action('flexi_module_grid', array($this, 'display_view_count')); 14 17 add_filter('flexi_settings_fields', array($this, 'add_fields')); … … 17 20 } 18 21 19 public function display_view_count($container, $evalue = '', $id = '') { 22 public function display_view_count($container, $evalue = '', $id = '') 23 { 24 //flexi_log('count page ' . $evalue . ' -- ' . $id); 20 25 $enable = flexi_get_option('evalue_count', 'flexi_image_layout_settings', 1); 21 26 $this->increase_count($id, 'flexi_view_count'); 22 // If page is detail page27 //If page is detail page 23 28 if ($evalue == '') { 24 29 $evalue .= 'count:on'; … … 26 31 27 32 $toggle = flexi_evalue_toggle('count', $evalue); 28 // flexi_log($toggle);33 //flexi_log("The value of count is: " . $toggle . ' for evalue: ' . $evalue); 29 34 30 if ( ($enable == 1)) {35 if ($enable == 1 && $toggle == "") { 31 36 $extra_icon = array(); 32 33 $div = '<div style="' . $toggle . '" class="fl-button fl-is-small"> 37 $div = '<div class="fl-button fl-is-small"> 34 38 <span class="fl-icon fl-is-small"><i class="far fa-eye"></i></span> 35 39 <span>' . $this->get_view_count($id, 'flexi_view_count') . '</span></div>'; … … 49 53 50 54 // Total number of like & unlike 51 public function get_view_count($id, $key) { 55 public function get_view_count($id, $key) 56 { 52 57 $count = get_post_meta($id, $key, true); 53 58 return $count; … … 55 60 56 61 // Increase like 57 public function increase_count($post_id, $key) { 62 public function increase_count($post_id, $key) 63 { 58 64 59 65 $count = (int) get_post_meta($post_id, $key, true); … … 63 69 64 70 // enable/disable option at Gallery -> Gallery Settings 65 public function add_fields($new) { 71 public function add_fields($new) 72 { 66 73 67 74 $fields = array( -
flexi/trunk/includes/dashboard/class-flexi-dashboard-pro.php
r2674150 r3183294 1 1 <?php 2 2 3 /** 3 4 * Admin dashboard tab to enable Flexi-Pro … … 9 10 * @subpackage Flexi/includes/dashboard 10 11 */ 11 class Flexi_Admin_Dashboard_Pro { 12 public function __construct() { 12 class Flexi_Admin_Dashboard_Pro 13 { 14 public function __construct() 15 { 13 16 add_filter('flexi_dashboard_tab', array($this, 'add_tabs')); 14 17 add_action('flexi_dashboard_tab_content', array($this, 'add_content')); 15 18 } 16 19 17 public function add_tabs($tabs) { 20 public function add_tabs($tabs) 21 { 18 22 19 23 $extra_tabs = array("pro" => __('Flexi-Pro', 'flexi')); … … 25 29 } 26 30 27 public function add_content() { 31 public function add_content() 32 { 28 33 29 34 if (isset($_GET['tab']) && 'pro' == $_GET['tab']) { … … 32 37 } 33 38 34 public function flexi_dashboard_content() { 39 public function flexi_dashboard_content() 40 { 35 41 ob_start(); 36 42 37 ?>43 ?> 38 44 39 45 <div style="text-align:right;"> <a href="https://odude.com/product-category/flexi/" … … 52 58 53 59 <?php 54 if (isset($_POST['flexi_license'])) {60 if (isset($_POST['flexi_license'])) { 55 61 if (function_exists('flexi_process_license')) { 56 62 … … 64 70 65 71 $res = flexi_process_license(sanitize_text_field($_POST['flexi_license'])); 66 if ('404' == $res->data->status) { 67 echo '<div class="card"><h3>' . esc_attr($res->message) . '</h3></div>'; 72 73 74 // Check if errors are present in the response data 75 if (isset($res->data->errors)) { 76 // Retrieve the first key from the errors object 77 $errorKeys = array_keys(get_object_vars($res->data->errors)); 78 $errorType = $errorKeys[0] ?? null; 79 80 // Check if the error type and message exist 81 if ($errorType && isset($res->data->errors->$errorType[0])) { 82 echo '<div class="card"><h3>' . $res->data->errors->$errorType[0] . '</h3></div>'; 83 } else { 84 echo '<div class="card"><h3>Unknown error occurred.</h3></div>'; 85 } 68 86 } else { 69 87 echo '<div class="card"><h3>License activated</h3></div>'; … … 80 98 <b>Flexi Version: </b> <?php echo esc_attr(FLEXI_VERSION); ?><br> 81 99 <b>Flexi-PRO status:</b> <?php if (is_flexi_pro()) { 82 echo "#####.....<b>Activated</b>.....#####";83 } else {84 echo "Not activated";85 }?><br>100 echo "#####.....<b>Activated</b>.....#####"; 101 } else { 102 echo "Not activated"; 103 } ?><br> 86 104 <?php 87 if (is_flexi_pro()) {88 echo "<b>Flexi-PRO version </b>:" . esc_attr(FLEXI_PRO_VERSION);105 if (is_flexi_pro()) { 106 echo "<b>Flexi-PRO version </b>:" . esc_attr(FLEXI_PRO_VERSION); 89 107 90 $expire = get_option('FLEXI_PRO_EXPIRE', ''); 91 if ('' != $expire) { 92 $expdAt = date($expire); 93 $today = date("Y-m-d H:i:s"); 94 if ($today >= $expdAt) { 95 echo "<br><b>Expired:</b> " . esc_attr($expdAt) . '<br><code> Please renew to regain access for premium features.</code>'; 96 update_option('FLEXI_PRO', 'FAIL'); 97 } else { 98 echo "<br><b>Expires:</b> " . esc_attr($expdAt); 108 $expire = get_option('FLEXI_PRO_EXPIRE', ''); 109 if ('' != $expire) { 110 $expdAt = date($expire); 111 $today = date("Y-m-d H:i:s"); 112 if ($today >= $expdAt) { 113 echo "<br><b>Expired:</b> " . esc_attr($expdAt) . '<br><code> Please renew to regain access for premium features.</code>'; 114 update_option('FLEXI_PRO', 'FAIL'); 115 } else { 116 echo "<br><b>Expires:</b> " . esc_attr($expdAt); 117 } 99 118 } 100 119 } 101 } 102 ?> 120 ?> 103 121 <br> 104 122 <?php 105 echo get_option('FLEXI_PRO_RESPONSE', '');106 ?>123 echo get_option('FLEXI_PRO_RESPONSE', ''); 124 ?> 107 125 </div> 108 126 … … 160 178 </div> 161 179 <?php 162 $content = ob_get_clean();180 $content = ob_get_clean(); 163 181 return $content; 164 182 } -
flexi/trunk/includes/functions.php
r3175924 r3183294 1319 1319 // flexi_log($extra_param); 1320 1320 if (isset($extra_param[$key]) && 'on' == $extra_param[$key]) { 1321 // Flexi_log($extra_param[$key]); 1321 1322 return ''; 1322 1323 } else { -
flexi/trunk/public/partials/layout/gallery/portfolio/loop.php
r2684792 r3183294 42 42 if (flexi_evalue_toggle('excerpt', $evalue) != 'display:none') { 43 43 ?> 44 <div class="fl-content fl-mb-1 fl-is-size-6 <?php echo esc_attr($style_text_color); ?>">45 <?php echo wpautop(wp_kses_post(flexi_excerpt(20))); ?>46 </div>44 <div class="fl-content fl-mb-1 fl-is-size-6 <?php echo esc_attr($style_text_color); ?>"> 45 <?php echo wpautop(wp_kses_post(flexi_excerpt(20))); ?> 46 </div> 47 47 <?php 48 48 } … … 121 121 </div> 122 122 <?php echo wp_kses_post(flexi_show_addon_gallery($evalue, get_the_ID(), 'portfolio')); ?> 123 124 123 </div> 125 124
Note: See TracChangeset
for help on using the changeset viewer.