Plugin Directory

Changeset 3386814


Ignore:
Timestamp:
10/30/2025 05:31:38 AM (5 months ago)
Author:
gijo
Message:

Improved validation for the admin-only lazyload margin option

Location:
nazy-load
Files:
24 added
4 edited

Legend:

Unmodified
Added
Removed
  • nazy-load/trunk/flying-images.php

    r3272496 r3386814  
    66 * Author: WP Speed Matters
    77 * Author URI: https://wpspeedmatters.com/
    8  * Version: 2.4.14
     8 * Version: 2.4.15
    99 * Text Domain: nazy-load
    1010 */
     
    1717// Define constant with current version
    1818if (!defined('FLYING_IMAGES_VERSION')) {
    19     define('FLYING_IMAGES_VERSION', '2.4.14');
     19    define('FLYING_IMAGES_VERSION', '2.4.15');
    2020}
    2121
  • nazy-load/trunk/inject-js.php

    r2729024 r3386814  
    44function flying_images_inject_js() {
    55
     6  if (get_option('flying_images_enable_lazyloading') != true) return;
     7
    68  $lazy_method = esc_attr(get_option('flying_images_lazymethod'));
    7   $lazy_margin = esc_attr(get_option('flying_images_margin'));
     9  $lazy_margin = absint( get_option( 'flying_images_margin', 0 ) );
    810
    9   if (get_option('flying_images_enable_lazyloading') != true) return;
    1011
    1112    ?>
  • nazy-load/trunk/readme.txt

    r3272488 r3386814  
    77Tested up to: 6.8
    88Requires PHP: 5.6
    9 Stable tag: 2.4.14
     9Stable tag: 2.4.15
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6262
    6363== Changelog ==
     64
     65= 2.4.15 =
     66- Improved validation for the admin-only lazyload margin option.
    6467
    6568= 2.4.14 =
  • nazy-load/trunk/settings/lazyload.php

    r2729024 r3386814  
    55        update_option('flying_images_enable_lazyloading', sanitize_text_field($_POST['enable_lazyloading']));
    66        update_option('flying_images_lazymethod', sanitize_text_field($_POST['lazymethod']));
    7         update_option('flying_images_margin', sanitize_text_field($_POST['margin']));
     7
     8        $margin = isset($_POST['margin']) ? absint($_POST['margin']) : 0;
     9        update_option('flying_images_margin', $margin);
     10       
    811        $keywords = trim($_POST['exclude_keywords']) ? array_map('trim', explode("\n", str_replace("\r", "", sanitize_textarea_field($_POST['exclude_keywords'])))) : [];
    912        update_option('flying_images_exclude_keywords', $keywords);
Note: See TracChangeset for help on using the changeset viewer.