Plugin Directory

Changeset 3369421


Ignore:
Timestamp:
09/29/2025 05:18:06 AM (6 months ago)
Author:
codecanel
Message:

Issue fixed

Location:
wp-before-after-image-slider
Files:
85 added
6 edited

Legend:

Unmodified
Added
Removed
  • wp-before-after-image-slider/trunk/CHANGELOG

    r3365511 r3369421  
    11== Changelog ==
    2 = 2.0.6 =
    3 * Readme updated
    42
    53= 2.0.5 =
  • wp-before-after-image-slider/trunk/assets/admin/js/save-post.asset.php

    r3340813 r3369421  
    1 <?php return array('dependencies' => array('jquery', 'wp-api-fetch'), 'version' => '8a3d60842834ed07c054');
     1<?php return array('dependencies' => array('jquery', 'wp-api-fetch'), 'version' => '32118457abfdd1555dc0');
  • wp-before-after-image-slider/trunk/assets/admin/js/save-post.js

    r3340813 r3369421  
    1 "use strict";var __webpack_require__={n:e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},d:(e,t)=>{for(var a in t)__webpack_require__.o(t,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const external_jQuery_namespaceObject=window.jQuery;var external_jQuery_default=__webpack_require__.n(external_jQuery_namespaceObject);const external_wp_apiFetch_namespaceObject=window.wp.apiFetch;var external_wp_apiFetch_default=__webpack_require__.n(external_wp_apiFetch_namespaceObject);external_jQuery_default()(document).ready((function(){var e=null,t=!1;function a(){external_jQuery_default()('.post-type-coca_bais form#post input[type="submit"], .post-type-coca_bais form#post button[type="submit"]').on("click touchstart",(function(t){(e=external_jQuery_default()(this)).clickedAt=Date.now(),e.buttonName=external_jQuery_default()(this).attr("name")||"",e.buttonValue=external_jQuery_default()(this).val()||external_jQuery_default()(this).text()||"",e.buttonId=external_jQuery_default()(this).attr("id")||""}))}function n(e,a,n){try{external_jQuery_default()(e).off("submit"),external_jQuery_default()('.post-type-coca_bais form#post input[type="submit"], .post-type-coca_bais form#post button[type="submit"]').off("click touchstart"),a&&(["#post_status","#original_post_status","#hidden_post_status"].forEach((function(e){external_jQuery_default()(e).length&&external_jQuery_default()(e).val("publish")})),external_jQuery_default()('input[name="publish"][type="hidden"]').remove(),external_jQuery_default()("<input>").attr({type:"hidden",name:"publish",value:"Publish"}).appendTo(e),external_jQuery_default()("#post_action").length&&external_jQuery_default()("#post_action").val("publish"));var u=function(){if(t=!1,e.submit&&"function"==typeof e.submit)e.submit();else{var n=document.createElement("input");n.type="submit",n.style.display="none",a&&(n.name="publish",n.value="Publish"),e.appendChild(n),n.click()}},o=navigator.userAgent.toLowerCase();-1!==o.indexOf("safari")&&-1===o.indexOf("chrome")?setTimeout(u,150):-1!==o.indexOf("firefox")?setTimeout(u,10):setTimeout(u,50)}catch(e){if(console.error("Form submission error:",e),t=!1,!n){var r=window.location.href;r+=(-1!==r.indexOf("?")?"&":"?")+"submit_failed=1",window.location.href=r}}}a(),external_jQuery_default()(".post-type-coca_bais form#post").on("submit",(function(a){if(t)return!1;var u;try{u=window.localStorage.getItem("coca_bais_data")}catch(e){return void console.warn("localStorage not available:",e)}if(u){var o=this,r=e;(!r||Date.now()-(r.clickedAt||0)>5e3)&&((r=external_jQuery_default()(document.activeElement))&&r.is("input, button")||(r=external_jQuery_default()(o).find('input[name="publish"], button[name="publish"], #publish, .editor-post-publish-button').first()));var i,l=function(e){if(!e)return!1;var t=e.buttonName||e.attr("name")||"",a=e.buttonValue||e.val()||e.text()||"",n=e.buttonId||e.attr("id")||"",u=e.attr("class")||"";return"publish"===t||"Publish"===a||-1!==a.indexOf("Publish")||"publish"===n||-1!==n.indexOf("publish")||-1!==u.indexOf("publish")||-1!==u.indexOf("editor-post-publish-button")}(r);try{i=JSON.parse(u)}catch(e){return console.error("Invalid localStorage JSON:",e),confirm("Invalid meta data format. Do you want to continue anyway?")?void 0:(a.preventDefault(),!1)}i&&"object"==typeof i&&(a.preventDefault(),t=!0,i.post_id=external_jQuery_default()("#post_ID").val(),i.intended_status=l?"publish":"draft",("undefined"!=typeof wp&&wp.apiFetch?wp.apiFetch({path:"/coca-bais/v1/save-post-meta",method:"POST",data:i}):void 0!==external_wp_apiFetch_default()?external_wp_apiFetch_default()({path:"/coca-bais/v1/save-post-meta",method:"POST",data:i}):external_jQuery_default().ajax({url:"/wp-json/coca-bais/v1/save-post-meta",method:"POST",contentType:"application/json",data:JSON.stringify(i),beforeSend:function(e){var t=external_jQuery_default()("#_wpnonce").val()||external_jQuery_default()('input[name="_wpnonce"]').val();t&&e.setRequestHeader("X-WP-Nonce",t)}})).then((function(e){n(o,l,!1)})).catch((function(e){console.error("Meta save failed:",e),confirm("Failed to save meta data. Do you want to continue anyway?")?n(o,l,!1):t=!1}))),e=null}})),external_jQuery_default()(document).ajaxComplete((function(){setTimeout(a,100)})),document.addEventListener&&document.addEventListener("visibilitychange",(function(){document.hidden||(t=!1)}))}));
     1"use strict";var __webpack_require__={n:e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},d:(e,t)=>{for(var a in t)__webpack_require__.o(t,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const external_jQuery_namespaceObject=window.jQuery;var external_jQuery_default=__webpack_require__.n(external_jQuery_namespaceObject);const external_wp_apiFetch_namespaceObject=window.wp.apiFetch;var external_wp_apiFetch_default=__webpack_require__.n(external_wp_apiFetch_namespaceObject);external_jQuery_default()(document).ready((function(){var e=null,t=!1;function a(){external_jQuery_default()('.post-type-coca_bais form#post input[type="submit"], .post-type-coca_bais form#post button[type="submit"]').on("click touchstart",(function(t){(e=external_jQuery_default()(this)).clickedAt=Date.now(),e.buttonName=external_jQuery_default()(this).attr("name")||"",e.buttonValue=external_jQuery_default()(this).val()||external_jQuery_default()(this).text()||"",e.buttonId=external_jQuery_default()(this).attr("id")||""}))}function n(e,a,n){try{external_jQuery_default()(e).off("submit"),external_jQuery_default()('.post-type-coca_bais form#post input[type="submit"], .post-type-coca_bais form#post button[type="submit"]').off("click touchstart"),window.onbeforeunload=null,external_jQuery_default()(window).off("beforeunload"),a&&(["#post_status","#original_post_status","#hidden_post_status"].forEach((function(e){external_jQuery_default()(e).length&&external_jQuery_default()(e).val("publish")})),external_jQuery_default()('input[name="publish"][type="hidden"]').remove(),external_jQuery_default()("<input>").attr({type:"hidden",name:"publish",value:"Publish"}).appendTo(e),external_jQuery_default()("#post_action").length&&external_jQuery_default()("#post_action").val("publish"));var o=function(){if(t=!1,e.submit&&"function"==typeof e.submit)e.submit();else{var n=document.createElement("input");n.type="submit",n.style.display="none",a&&(n.name="publish",n.value="Publish"),e.appendChild(n),n.click()}},u=navigator.userAgent.toLowerCase();-1!==u.indexOf("safari")&&-1===u.indexOf("chrome")?setTimeout(o,150):-1!==u.indexOf("firefox")?setTimeout(o,10):setTimeout(o,50)}catch(e){if(console.error("Form submission error:",e),t=!1,!n){var r=window.location.href;r+=(-1!==r.indexOf("?")?"&":"?")+"submit_failed=1",window.location.href=r}}}a(),external_jQuery_default()(".post-type-coca_bais form#post").on("submit",(function(a){if(t)return!1;var o;try{o=window.localStorage.getItem("coca_bais_data")}catch(e){return void console.warn("localStorage not available:",e)}if(o){var u=this,r=e;(!r||Date.now()-(r.clickedAt||0)>5e3)&&((r=external_jQuery_default()(document.activeElement))&&r.is("input, button")||(r=external_jQuery_default()(u).find('input[name="publish"], button[name="publish"], #publish, .editor-post-publish-button').first()));var i,l=function(e){if(!e)return!1;var t=e.buttonName||e.attr("name")||"",a=e.buttonValue||e.val()||e.text()||"",n=e.buttonId||e.attr("id")||"",o=e.attr("class")||"";return"publish"===t||"Publish"===a||-1!==a.indexOf("Publish")||"publish"===n||-1!==n.indexOf("publish")||-1!==o.indexOf("publish")||-1!==o.indexOf("editor-post-publish-button")}(r);try{i=JSON.parse(o)}catch(e){return console.error("Invalid localStorage JSON:",e),confirm("Invalid meta data format. Do you want to continue anyway?")?void 0:(a.preventDefault(),!1)}i&&"object"==typeof i&&(a.preventDefault(),t=!0,i.post_id=external_jQuery_default()("#post_ID").val(),i.intended_status=l?"publish":"draft",("undefined"!=typeof wp&&wp.apiFetch?wp.apiFetch({path:"/coca-bais/v1/save-post-meta",method:"POST",data:i}):void 0!==external_wp_apiFetch_default()?external_wp_apiFetch_default()({path:"/coca-bais/v1/save-post-meta",method:"POST",data:i}):external_jQuery_default().ajax({url:"/wp-json/coca-bais/v1/save-post-meta",method:"POST",contentType:"application/json",data:JSON.stringify(i),beforeSend:function(e){var t=external_jQuery_default()("#_wpnonce").val()||external_jQuery_default()('input[name="_wpnonce"]').val();t&&e.setRequestHeader("X-WP-Nonce",t)}})).then((function(e){n(u,l,!1)})).catch((function(e){console.error("Meta save failed:",e),confirm("Failed to save meta data. Do you want to continue anyway?")?n(u,l,!1):t=!1}))),e=null}})),external_jQuery_default()(document).ajaxComplete((function(){setTimeout(a,100)})),document.addEventListener&&document.addEventListener("visibilitychange",(function(){document.hidden||(t=!1)}))}));
  • wp-before-after-image-slider/trunk/languages/wp-before-after-image-slider.pot

    r3365511 r3369421  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WP Before After Image Slider 2.0.6\n"
     5"Project-Id-Version: WP Before After Image Slider 2.0.7\n"
    66"Report-Msgid-Bugs-To: "
    77"https://wordpress.org/support/plugin/before-after-image-slider\n"
    8 "POT-Creation-Date: 2025-09-22 04:59:26+00:00\n"
     8"POT-Creation-Date: 2025-09-29 05:05:45+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
     
    11961196msgstr ""
    11971197
    1198 #: plugin-freemium.php:577
     1198#: plugin-freemium.php:575
    11991199msgid "Compatibility Alert!"
    12001200msgstr ""
  • wp-before-after-image-slider/trunk/readme.txt

    r3365513 r3369421  
    1 === WP Before After Image Slider – Advanced Image & Video comparison Plugin for WordPress ===
     1=== WP Before After Image Slider – Advanced Image comparison Plugin for WordPress ===
    22Contributors: codecanel
    33Donate link: https://codecanel.com/wp-before-after-image-slider/
    4 Tags: before after, image comparison, photo comparison, video comparison, image slider
     4Tags: before after, image comparison, image slider, video comparison, photo comparison
    55Requires at least: 6.0
    66Tested up to: 6.8
    77Requires PHP: 7.4
    8 Stable tag: 2.0.6
     8Stable tag: 2.0.7
    99License: GPL-2.0-or-later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    12112113. Shortcode generator for easy slider embedding. 
    122122
    123 
    124123== Upgrade Notice ==
     124= 2.0.7
     125* Issue fixed
     126
    125127= 2.0.6 =
    126128* Readme updated
    127129
    128 == Upgrade Notice ==
    129130= 2.0.5 =
    130131Minor update – Readme improved.
     
    140141
    141142== Changelog ==
     143= 2.0.7
     144* Issue fixed
     145
    142146= 2.0.6 =
    143147* Readme updated
  • wp-before-after-image-slider/trunk/wp-before-after-image-slider.php

    r3365511 r3369421  
    1515 * Plugin URI:          https://codecanel.com/wp-before-after-image-slider/
    1616 * Description:         Craft dynamic before and after image sliders effortlessly. Engage viewers with seamless visual transitions. Compatible with top page builders like Elementor, Divi, and Gutenberg.
    17  * Version:             2.0.6
     17 * Version:             2.0.7
    1818 * Requires at least:   6.0
    1919 * Tested up to:        6.8
     
    4747     * @var string
    4848     */
    49     private string $version = '2.0.6';
     49    private string $version = '2.0.7';
    5050
    5151    /**
     
    423423        return ! empty( $attributes['slider_type'] ) ? $attributes['slider_type'] : 'default';
    424424    }
    425     endif;
     425endif;
    426426
    427427if ( ! function_exists( 'coca_bais_disabled_pro_feature_notice' ) ) :
     
    442442        return is_user_logged_in() && ! empty( $pro_feature_notice ) ? $warning : '';
    443443    }
    444     endif;
     444endif;
    445445
    446446if ( ! function_exists( 'coca_bais_insert_array_element' ) ) :
     
    471471        return array_merge( $arr, $spliced_arr );
    472472    }
    473     endif;
     473endif;
    474474
    475475if ( ! function_exists( 'coca_bais_global_assets' ) ) :
     
    513513        );
    514514    }
    515     endif;
    516 
    517     // Admin css.
    518     add_action( 'admin_head', __NAMESPACE__ . '\coca_bais_inline_css_all_admin' );
    519 
    520     /**
    521      * Add inline CSS styles for admin area.
    522      *
    523      * @return void
    524      */
     515endif;
     516
     517// Admin css.
     518add_action( 'admin_head', __NAMESPACE__ . '\coca_bais_inline_css_all_admin' );
     519/**
     520 * Add inline CSS styles for admin area.
     521 *
     522 * @return void
     523 */
    525524function coca_bais_inline_css_all_admin() {
    526525    ?>
    527         <style>
    528             .notice-warning .coca-bais-major-update-warning__separator {
    529                 border: 1px solid #ffb900;
    530             }
    531             .coca-bais-major-update-warning__separator {
    532                 margin: 15px -12px;
    533             }
    534             .coca-bais-major-update-warning {
    535                 display: flex;
    536                 margin-block-end: 5px;
    537                 max-width: 1000px;
    538             }
    539             .notice-warning .coca-bais-major-update-warning__icon {
    540                 color: #f56e28;
    541             }
    542             .coca-bais-major-update-warning__icon {
    543                 font-size: 17px;
    544                 margin-inline-end: 9px;
    545                 margin-inline-start: 2px;
    546             }
    547             .coca-bais-major-update-warning__title {
    548                 font-weight: 600;
    549                 margin-block-end: 10px;
    550             }
    551             .coca-bais-major-update-warning+p {
    552                 display: none !important;
    553             };
    554         </style>
     526    <style>
     527        .notice-warning .coca-bais-major-update-warning__separator {
     528            border: 1px solid #ffb900;
     529        }
     530        .coca-bais-major-update-warning__separator {
     531            margin: 15px -12px;
     532        }
     533        .coca-bais-major-update-warning {
     534            display: flex;
     535            margin-block-end: 5px;
     536            max-width: 1000px;
     537        }
     538        .notice-warning .coca-bais-major-update-warning__icon {
     539            color: #f56e28;
     540        }
     541        .coca-bais-major-update-warning__icon {
     542            font-size: 17px;
     543            margin-inline-end: 9px;
     544            margin-inline-start: 2px;
     545        }
     546        .coca-bais-major-update-warning__title {
     547            font-weight: 600;
     548            margin-block-end: 10px;
     549        }
     550        .coca-bais-major-update-warning+p {
     551            display: none !important;
     552        };
     553    </style>
    555554    <?php
    556555}
    557556
    558     // Add custom update message for the plugin.
    559     add_filter( 'in_plugin_update_message-wp-before-after-image-slider-pro/wp-before-after-image-slider-pro.php', __NAMESPACE__ . '\wpbais_append_custom_update_message', 1000, 2 );
    560 
    561     /**
    562      * Append custom update message for the plugin.
    563      *
    564      * @param array  $plugin_data An array of plugin metadata.
    565      * @param object $response An object of metadata about the available plugin update.
    566      * @return void
    567      */
     557// Add custom update message for the plugin.
     558add_filter( 'in_plugin_update_message-wp-before-after-image-slider-pro/wp-before-after-image-slider-pro.php', __NAMESPACE__ . '\wpbais_append_custom_update_message', 1000, 2 );
     559/**
     560 * Append custom update message for the plugin.
     561 *
     562 * @param array  $plugin_data An array of plugin metadata.
     563 * @param object $response An object of metadata about the available plugin update.
     564 * @return void
     565 */
    568566function wpbais_append_custom_update_message( $plugin_data, $response ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    569567    ?>
    570         <hr class="coca-bais-major-update-warning__separator" />
    571         <div class="coca-bais-major-update-warning">
    572             <div class="coca-bais-major-update-warning__icon">
    573                 <i class="eicon-info-circle"></i>
     568    <hr class="coca-bais-major-update-warning__separator" />
     569    <div class="coca-bais-major-update-warning">
     570        <div class="coca-bais-major-update-warning__icon">
     571            <i class="eicon-info-circle"></i>
     572        </div>
     573        <div>
     574            <div class="coca-bais-major-update-warning__title">
     575                <?php echo esc_html__( 'Compatibility Alert!', 'wp-before-after-image-slider-pro' ); ?>
    574576            </div>
    575             <div>
    576                 <div class="coca-bais-major-update-warning__title">
    577                 <?php echo esc_html__( 'Compatibility Alert!', 'wp-before-after-image-slider-pro' ); ?>
    578                 </div>
    579                 <div class="coca-bais-major-update-warning__message">
    580                     We have released a new UI update. You are using an older version of Before After Image Slider. Please update to the latest version to access new UI and ensure full compatibility.
    581                 </div>
     577            <div class="coca-bais-major-update-warning__message">
     578                We have released a new UI update. You are using an older version of Before After Image Slider. Please update to the latest version to access new UI and ensure full compatibility.
    582579            </div>
    583580        </div>
    584         <?php
     581    </div>
     582    <?php
    585583}
    586584
    587     // Add the admin_init action hook for redirect with high priority.
    588     add_action( 'admin_init', __NAMESPACE__ . '\coca_bais_redirect_after_activation', 1 );
    589 
    590     /**
    591     * Redirect to dashboard after plugin activation.
    592     */
     585// Add the admin_init action hook for redirect with high priority.
     586add_action( 'admin_init', __NAMESPACE__ . '\coca_bais_redirect_after_activation', 1 );
     587
     588/**
     589 * Redirect to dashboard after plugin activation.
     590 */
    593591function coca_bais_redirect_after_activation() {
    594592    if ( get_option( 'coca_bais_do_activation_redirect', false ) ) {
Note: See TracChangeset for help on using the changeset viewer.