Plugin Directory

Changeset 2660479

Timestamp:
01/20/2022 02:37:15 AM (3 years ago)
Author:
MyThemeShop
Message:

Update to version 1.0.10 from GitHub

Location:
wp-notification-bars
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-notification-bars/tags/1.0.10/admin/class-wp-notification-bars-admin.php

    r2658291 r2660479  
    728728
    729729            // Sanitize fields.
    730             $my_data = $this->sanitize_data( $_POST['mtsnb_fields'] );
     730            $my_data = sanitize_data( $_POST['mtsnb_fields'] );
    731731
    732732            // Update the meta field in the database.
    733733            update_post_meta( $post_id, '_mtsnb_data', $my_data );
    734         }
    735 
    736         /**
    737          * Sanitize meta fields recursively.
    738          *
    739          * @param mixed $value Original value.
    740          *
    741          * @return mixed Sanitized value.
    742          */
    743         public function sanitize_data( $data ) {
    744             if ( defined( 'MTSNBF_UNFILTERED_HTML' ) && MTSNBF_UNFILTERED_HTML ) {
    745                 return $data;
    746             }
    747 
    748             $sanitized_data = array();
    749 
    750             $default_sanitize = 'sanitize_text_field';
    751             $sanitize_map     = array(
    752                 'active_tab'       => 'sanitize_text_field',
    753                 'button'           => 'sanitize_text_field',
    754                 'content_width'    => 'absint',
    755                 'css_position'     => 'sanitize_text_field',
    756                 'content_type'     => 'sanitize_text_field',
    757                 'basic_link_style' => 'sanitize_text_field',
    758                 'basic_text'       => 'wp_kses_post',
    759                 'basic_link_url'   => 'esc_url',
    760                 'custom_content'   => 'wp_kses_post',
    761                 'bg_color'         => 'sanitize_hex_color',
    762                 'txt_color'        => 'sanitize_hex_color',
    763                 'link_color'       => 'sanitize_hex_color',
    764                 'font_size'        => 'absint',
    765             );
    766 
    767             foreach ( $data as $key => $value ) {
    768                 if ( is_array( $value ) ) {
    769                     $sanitized_data[ $key ] = $this->sanitize_data( $value );
    770                 } elseif ( isset( $sanitize_map[ $key ] ) ) {
    771                     $sanitized_data[ $key ] = call_user_func( $sanitize_map[ $key ], $value );
    772                 } else {
    773                     $sanitized_data[ $key ] = call_user_func( $default_sanitize, $value );
    774                 }
    775             }
    776 
    777             return $sanitized_data;
    778734        }
    779735
  • wp-notification-bars/tags/1.0.10/includes/class-wp-notification-bars-shared.php

    r2658291 r2660479  
    192192                $this->bar_output( $this->bar_id, $this->bar_data );
    193193            }
     194
     195
     196
     197
     198
     199
     200
     201
     202
     203
     204
     205
     206
     207
     208
     209
     210
     211
     212
     213
     214
     215
     216
     217
     218
     219
     220
     221
     222
     223
     224
     225
     226
     227
     228
     229
     230
     231
     232
     233
     234
     235
     236
     237
     238
    194239        }
    195240
     
    293338            }
    294339
    295             // fix slashes
    296             foreach ( $meta_values as $key => $value ) {
    297 
    298                 if ( is_string( $value ) ) {
    299 
    300                     $meta_values[ $key ] = stripslashes( $value );
    301                 }
    302             }
     340            $meta_values = self::sanitize_data( $meta_values );
    303341
    304342            $this->bar_output( $id, $meta_values );
     
    529567                if ( isset( $_COOKIE['mtsnb_referrer'] ) ) {
    530568
    531                     // Stored referrer url
    532                     $referer = esc_url( $_COOKIE['mtsnb_referrer'] );
     569                    // Store
     570                    $referer = esc_url( $_COOKIE['mtsnb_referrer'] );
    533571                }
    534572            }
  • wp-notification-bars/tags/1.0.10/includes/class-wp-notification-bars.php

    r2658291 r2660479  
    7070
    7171        $this->plugin_name = 'wp-notification-bars';
    72         $this->version     = '1.0.9';
     72        $this->version     = '1.0.';
    7373
    7474        $this->load_dependencies();
  • wp-notification-bars/tags/1.0.10/readme.txt

    r2658291 r2660479  
    44Tags: notification, alert, notification bar, welcome google visitor, welcome facebook visitor, attention bar, floating bar, message, notice, sticky header, offer bar, hello bar
    55Requires at least: 3.0.1
    6 Tested up to: 5.8.2
    7 Stable tag: 1.0.9
     6Tested up to: 5.8.
     7Stable tag: 1.0.
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7575== Changelog ==
    7676
     77
     78
     79
    7780= 1.0.9 =
    7881* Security improvements
  • wp-notification-bars/trunk/admin/class-wp-notification-bars-admin.php

    r2658291 r2660479  
    728728
    729729            // Sanitize fields.
    730             $my_data = $this->sanitize_data( $_POST['mtsnb_fields'] );
     730            $my_data = sanitize_data( $_POST['mtsnb_fields'] );
    731731
    732732            // Update the meta field in the database.
    733733            update_post_meta( $post_id, '_mtsnb_data', $my_data );
    734         }
    735 
    736         /**
    737          * Sanitize meta fields recursively.
    738          *
    739          * @param mixed $value Original value.
    740          *
    741          * @return mixed Sanitized value.
    742          */
    743         public function sanitize_data( $data ) {
    744             if ( defined( 'MTSNBF_UNFILTERED_HTML' ) && MTSNBF_UNFILTERED_HTML ) {
    745                 return $data;
    746             }
    747 
    748             $sanitized_data = array();
    749 
    750             $default_sanitize = 'sanitize_text_field';
    751             $sanitize_map     = array(
    752                 'active_tab'       => 'sanitize_text_field',
    753                 'button'           => 'sanitize_text_field',
    754                 'content_width'    => 'absint',
    755                 'css_position'     => 'sanitize_text_field',
    756                 'content_type'     => 'sanitize_text_field',
    757                 'basic_link_style' => 'sanitize_text_field',
    758                 'basic_text'       => 'wp_kses_post',
    759                 'basic_link_url'   => 'esc_url',
    760                 'custom_content'   => 'wp_kses_post',
    761                 'bg_color'         => 'sanitize_hex_color',
    762                 'txt_color'        => 'sanitize_hex_color',
    763                 'link_color'       => 'sanitize_hex_color',
    764                 'font_size'        => 'absint',
    765             );
    766 
    767             foreach ( $data as $key => $value ) {
    768                 if ( is_array( $value ) ) {
    769                     $sanitized_data[ $key ] = $this->sanitize_data( $value );
    770                 } elseif ( isset( $sanitize_map[ $key ] ) ) {
    771                     $sanitized_data[ $key ] = call_user_func( $sanitize_map[ $key ], $value );
    772                 } else {
    773                     $sanitized_data[ $key ] = call_user_func( $default_sanitize, $value );
    774                 }
    775             }
    776 
    777             return $sanitized_data;
    778734        }
    779735
  • wp-notification-bars/trunk/includes/class-wp-notification-bars-shared.php

    r2658291 r2660479  
    192192                $this->bar_output( $this->bar_id, $this->bar_data );
    193193            }
     194
     195
     196
     197
     198
     199
     200
     201
     202
     203
     204
     205
     206
     207
     208
     209
     210
     211
     212
     213
     214
     215
     216
     217
     218
     219
     220
     221
     222
     223
     224
     225
     226
     227
     228
     229
     230
     231
     232
     233
     234
     235
     236
     237
     238
    194239        }
    195240
     
    293338            }
    294339
    295             // fix slashes
    296             foreach ( $meta_values as $key => $value ) {
    297 
    298                 if ( is_string( $value ) ) {
    299 
    300                     $meta_values[ $key ] = stripslashes( $value );
    301                 }
    302             }
     340            $meta_values = self::sanitize_data( $meta_values );
    303341
    304342            $this->bar_output( $id, $meta_values );
     
    529567                if ( isset( $_COOKIE['mtsnb_referrer'] ) ) {
    530568
    531                     // Stored referrer url
    532                     $referer = esc_url( $_COOKIE['mtsnb_referrer'] );
     569                    // Store
     570                    $referer = esc_url( $_COOKIE['mtsnb_referrer'] );
    533571                }
    534572            }
  • wp-notification-bars/trunk/includes/class-wp-notification-bars.php

    r2658291 r2660479  
    7070
    7171        $this->plugin_name = 'wp-notification-bars';
    72         $this->version     = '1.0.9';
     72        $this->version     = '1.0.';
    7373
    7474        $this->load_dependencies();
  • wp-notification-bars/trunk/readme.txt

    r2658291 r2660479  
    44Tags: notification, alert, notification bar, welcome google visitor, welcome facebook visitor, attention bar, floating bar, message, notice, sticky header, offer bar, hello bar
    55Requires at least: 3.0.1
    6 Tested up to: 5.8.2
    7 Stable tag: 1.0.9
     6Tested up to: 5.8.
     7Stable tag: 1.0.
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7575== Changelog ==
    7676
     77
     78
     79
    7780= 1.0.9 =
    7881* Security improvements
Note: See TracChangeset for help on using the changeset viewer.