Changeset 3408323
- Timestamp:
- 12/02/2025 05:38:41 PM (3 months ago)
- Location:
- wp-snow-effect
- Files:
-
- 42 added
- 6 edited
-
tags/1.1.17 (added)
-
tags/1.1.17/LICENSE.txt (added)
-
tags/1.1.17/README.txt (added)
-
tags/1.1.17/admin (added)
-
tags/1.1.17/admin/class-wp-snow-effect-admin.php (added)
-
tags/1.1.17/admin/css (added)
-
tags/1.1.17/admin/css/wp-snow-effect-admin.css (added)
-
tags/1.1.17/admin/img (added)
-
tags/1.1.17/admin/img/info.png (added)
-
tags/1.1.17/admin/index.php (added)
-
tags/1.1.17/admin/js (added)
-
tags/1.1.17/admin/js/wp-snow-effect-admin.js (added)
-
tags/1.1.17/admin/js/wp-snow-effect-admin.min.js (added)
-
tags/1.1.17/admin/partials (added)
-
tags/1.1.17/admin/partials/wp-snow-effect-admin-display.php (added)
-
tags/1.1.17/admin/settings (added)
-
tags/1.1.17/admin/settings/settings.php (added)
-
tags/1.1.17/includes (added)
-
tags/1.1.17/includes/class-wp-snow-effect-activator.php (added)
-
tags/1.1.17/includes/class-wp-snow-effect-deactivator.php (added)
-
tags/1.1.17/includes/class-wp-snow-effect-i18n.php (added)
-
tags/1.1.17/includes/class-wp-snow-effect-loader.php (added)
-
tags/1.1.17/includes/class-wp-snow-effect.php (added)
-
tags/1.1.17/includes/index.php (added)
-
tags/1.1.17/includes/wp-settings-framework.php (added)
-
tags/1.1.17/index.php (added)
-
tags/1.1.17/languages (added)
-
tags/1.1.17/languages/wp-snow-effect.pot (added)
-
tags/1.1.17/public (added)
-
tags/1.1.17/public/class-wp-snow-effect-public.php (added)
-
tags/1.1.17/public/css (added)
-
tags/1.1.17/public/css/wp-snow-effect-public.css (added)
-
tags/1.1.17/public/index.php (added)
-
tags/1.1.17/public/js (added)
-
tags/1.1.17/public/js/jsnow.js (added)
-
tags/1.1.17/public/js/jsnow.min.js (added)
-
tags/1.1.17/public/js/wp-snow-effect-public.js (added)
-
tags/1.1.17/public/js/wp-snow-effect-public.min.js (added)
-
tags/1.1.17/public/partials (added)
-
tags/1.1.17/public/partials/wp-snow-effect-public-display.php (added)
-
tags/1.1.17/uninstall.php (added)
-
tags/1.1.17/wp-snow-effect.php (added)
-
trunk/README.txt (modified) (3 diffs)
-
trunk/admin/class-wp-snow-effect-admin.php (modified) (3 diffs)
-
trunk/admin/settings/settings.php (modified) (1 diff)
-
trunk/includes/wp-settings-framework.php (modified) (14 diffs)
-
trunk/public/class-wp-snow-effect-public.php (modified) (1 diff)
-
trunk/wp-snow-effect.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-snow-effect/trunk/README.txt
r3402437 r3408323 2 2 Contributors: WPManiax 3 3 Donate link: http://www.wpmaniax.com/ 4 Tags: snow effect, christmas, christmas snow, falling snow, holiday, holiday snow, jquery snow, jsnow, let it snow, snow, snow balls, snow effect, snow effects, Snow Flakes, snowball, snowflake, snowing, super snow, supersnow, wp snow4 Tags: Christmas, snow, holiday, snow effect, snowflake 5 5 Requires at least: 3.6 6 Tested up to: 6.8 .36 Tested up to: 6.8 7 7 Requires PHP: 5.6 8 Stable tag: 1.1.1 68 Stable tag: 1.1.17 9 9 License:GPL2 10 10 … … 61 61 == Changelog == 62 62 63 = 1.1.17 = 64 * fixed security issues and warnings 65 63 66 = 1.1.16 = 64 67 * tested compatibility for WordPress 6.8.3 … … 128 131 129 132 == Upgrade Notice == 133 134 = 1.1.17 = 135 * fixed security issues and warnings 130 136 131 137 = 1.1.16 = -
wp-snow-effect/trunk/admin/class-wp-snow-effect-admin.php
r1783110 r3408323 89 89 $this->wpsf->add_settings_page(array( 90 90 'parent_slug' => 'options-general.php', 91 'page_title' => __('WP Snow Effect' ),92 'menu_title' => __('WP Snow Effect' )91 'page_title' => __('WP Snow Effect', 'wp-snow-effect'), 92 'menu_title' => __('WP Snow Effect', 'wp-snow-effect') 93 93 )); 94 94 } … … 123 123 if ($notices = get_option('wp_snow_effect_admin_notices')) { 124 124 foreach ($notices as $notice) { 125 echo "<div class='updated'><p> $notice</p></div>";125 echo "<div class='updated'><p>" . wp_kses_post( $notice ) . "</p></div>"; 126 126 } 127 127 delete_option('wp_snow_effect_admin_notices'); … … 158 158 $nobug = ""; 159 159 160 // phpcs:ignore WordPress.Security.NonceVerification.Recommended 160 161 if ( isset( $_GET['wpsenobug'] ) ) { 161 $nobug = esc_attr( $_GET['wpsenobug'] ); 162 // phpcs:ignore WordPress.Security.NonceVerification.Recommended 163 $nobug = sanitize_text_field( wp_unslash( $_GET['wpsenobug'] ) ); 162 164 } 163 165 -
wp-snow-effect/trunk/admin/settings/settings.php
r2432601 r3408323 21 21 */ 22 22 23 add_filter('wpsf_register_settings_snoweffect', ' snoweffect_settings');23 add_filter('wpsf_register_settings_snoweffect', 'wp_snow_effect_settings'); 24 24 25 function snoweffect_settings($wpsf_settings)25 function wp_snow_effect_settings($wpsf_settings) 26 26 { 27 27 -
wp-snow-effect/trunk/includes/wp-settings-framework.php
r2065636 r3408323 83 83 add_action( 'wpsf_do_settings_sections_'.$this->option_group, array( $this, 'do_tabless_settings_sections'), 10 ); 84 84 85 // phpcs:ignore WordPress.Security.NonceVerification.Recommended 85 86 if( isset( $_GET['page'] ) && $_GET['page'] === $this->settings_page['slug'] ) { 86 87 … … 116 117 117 118 if( !is_array($this->settings_wrapper) ){ 118 return new WP_Error( 'broke', __( 'WPSF settings must be an array' ) );119 return new WP_Error( 'broke', __( 'WPSF settings must be an array', 'wp-snow-effect' ) ); 119 120 } 120 121 … … 210 211 <div class="wrap"> 211 212 <div id="icon-options-general" class="icon32"></div> 212 <h2><?php echo $this->settings_page['title']; ?></h2>213 <h2><?php echo esc_html( $this->settings_page['title'] ); ?></h2> 213 214 <?php 214 215 // Output your settings form … … 252 253 public function settings_validate( $input ) { 253 254 255 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound 254 256 return apply_filters( $this->option_group .'_settings_validate', $input ); 255 257 … … 269 271 if($section['section_id'] == $args['id']){ 270 272 271 if(isset($section['section_description']) && $section['section_description']) echo '<p class="wpsf-section-description">'. $section['section_description'].'</p>';273 if(isset($section['section_description']) && $section['section_description']) echo '<p class="wpsf-section-description">'. wp_kses_post( $section['section_description'] ) .'</p>'; 272 274 break; 273 275 … … 350 352 switch( $type ){ 351 353 case 'text': 352 $val = esc_attr(stripslashes($val));353 echo '<input type="text" name="'. $this->option_group .'_settings['. $el_id .']" id="'. $el_id .'" value="'. $val .'" placeholder="'. $placeholder .'" class="regular-text '. $class.'" />';354 if($desc) echo '<p class="description">'. $desc.'</p>';354 $val = stripslashes($val); 355 echo '<input type="text" name="'. esc_attr( $this->option_group ) .'_settings['. esc_attr( $el_id ) .']" id="'. esc_attr( $el_id ) .'" value="'. esc_attr( $val ) .'" placeholder="'. esc_attr( $placeholder ) .'" class="regular-text '. esc_attr( $class ) .'" />'; 356 if($desc) echo '<p class="description">'. wp_kses_post( $desc ) .'</p>'; 355 357 break; 356 358 case 'password': 357 $val = esc_attr(stripslashes($val));358 echo '<input type="password" name="'. $this->option_group .'_settings['. $el_id .']" id="'. $el_id .'" value="'. $val .'" placeholder="'. $placeholder .'" class="regular-text '. $class.'" />';359 if($desc) echo '<p class="description">'. $desc.'</p>';359 $val = stripslashes($val); 360 echo '<input type="password" name="'. esc_attr( $this->option_group ) .'_settings['. esc_attr( $el_id ) .']" id="'. esc_attr( $el_id ) .'" value="'. esc_attr( $val ) .'" placeholder="'. esc_attr( $placeholder ) .'" class="regular-text '. esc_attr( $class ) .'" />'; 361 if($desc) echo '<p class="description">'. wp_kses_post( $desc ) .'</p>'; 360 362 break; 361 363 case 'textarea': 362 $val = esc_html(stripslashes($val));363 echo '<textarea name="'. $this->option_group .'_settings['. $el_id .']" id="'. $el_id .'" placeholder="'. $placeholder .'" rows="5" cols="60" class="'. $class .'">'. $val.'</textarea>';364 if($desc) echo '<p class="description">'. $desc.'</p>';364 $val = stripslashes($val); 365 echo '<textarea name="'. esc_attr( $this->option_group ) .'_settings['. esc_attr( $el_id ) .']" id="'. esc_attr( $el_id ) .'" placeholder="'. esc_attr( $placeholder ) .'" rows="5" cols="60" class="'. esc_attr( $class ) .'">'. esc_textarea( $val ) .'</textarea>'; 366 if($desc) echo '<p class="description">'. wp_kses_post( $desc ) .'</p>'; 365 367 break; 366 368 case 'select': 367 $val = esc_ html(esc_attr($val));368 echo '<select name="'. $this->option_group .'_settings['. $el_id .']" id="'. $el_id .'" class="'. $class.'">';369 $val = esc_attr($val); 370 echo '<select name="'. esc_attr( $this->option_group ) .'_settings['. esc_attr( $el_id ) .']" id="'. esc_attr( $el_id ) .'" class="'. esc_attr( $class ) .'">'; 369 371 foreach($choices as $ckey=>$cval){ 370 echo '<option value="'. $ckey .'"'. (($ckey == $val) ? ' selected="selected"' : '') .'>'. $cval.'</option>';372 echo '<option value="'. esc_attr( $ckey ) .'"'. selected( $ckey, $val, false ) .'>'. esc_html( $cval ) .'</option>'; 371 373 } 372 374 echo '</select>'; 373 if($desc) echo '<p class="description">'. $desc.'</p>';375 if($desc) echo '<p class="description">'. wp_kses_post( $desc ) .'</p>'; 374 376 break; 375 377 case 'radio': 376 $val = esc_ html(esc_attr($val));378 $val = esc_attr($val); 377 379 foreach($choices as $ckey=>$cval){ 378 echo '<label><input type="radio" name="'. $this->option_group .'_settings['. $el_id .']" id="'. $el_id .'_'. $ckey .'" value="'. $ckey .'" class="'. $class .'"'. (($ckey == $val) ? ' checked="checked"' : '') .' /> '. $cval.'</label><br />';380 echo '<label><input type="radio" name="'. esc_attr( $this->option_group ) .'_settings['. esc_attr( $el_id ) .']" id="'. esc_attr( $el_id .'_'. $ckey ) .'" value="'. esc_attr( $ckey ) .'" class="'. esc_attr( $class ) .'"'. checked( $ckey, $val, false ) .' /> '. esc_html( $cval ) .'</label><br />'; 379 381 } 380 if($desc) echo '<p class="description">'. $desc.'</p>';382 if($desc) echo '<p class="description">'. wp_kses_post( $desc ) .'</p>'; 381 383 break; 382 384 case 'checkbox': 383 $val = esc_attr(stripslashes($val));384 echo '<input type="hidden" name="'. $this->option_group .'_settings['. $el_id.']" value="0" />';385 echo '<label><input type="checkbox" name="'. $this->option_group .'_settings['. $el_id .']" id="'. $el_id .'" value="1" class="'. $class .'"'. (($val) ? ' checked="checked"' : '') .' /> '. $desc.'</label>';385 $val = stripslashes($val); 386 echo '<input type="hidden" name="'. esc_attr( $this->option_group ) .'_settings['. esc_attr( $el_id ) .']" value="0" />'; 387 echo '<label><input type="checkbox" name="'. esc_attr( $this->option_group ) .'_settings['. esc_attr( $el_id ) .']" id="'. esc_attr( $el_id ) .'" value="1" class="'. esc_attr( $class ) .'"'. checked( $val, 1, false ) .' /> '. wp_kses_post( $desc ) .'</label>'; 386 388 break; 387 389 case 'checkboxes': … … 390 392 if(isset($options[$el_id .'_'. $ckey])) $val = $options[$el_id .'_'. $ckey]; 391 393 elseif(is_array($std) && in_array($ckey, $std)) $val = $ckey; 392 $val = esc_ html(esc_attr($val));393 echo '<input type="hidden" name="'. $this->option_group .'_settings['. $el_id .'_'. $ckey.']" value="0" />';394 echo '<label><input type="checkbox" name="'. $this->option_group .'_settings['. $el_id .'_'. $ckey .']" id="'. $el_id .'_'. $ckey .'" value="'. $ckey .'" class="'. $class .'"'. (($ckey == $val) ? ' checked="checked"' : '') .' /> '. $cval.'</label><br />';394 $val = esc_attr($val); 395 echo '<input type="hidden" name="'. esc_attr( $this->option_group ) .'_settings['. esc_attr( $el_id .'_'. $ckey ) .']" value="0" />'; 396 echo '<label><input type="checkbox" name="'. esc_attr( $this->option_group ) .'_settings['. esc_attr( $el_id .'_'. $ckey ) .']" id="'. esc_attr( $el_id .'_'. $ckey ) .'" value="'. esc_attr( $ckey ) .'" class="'. esc_attr( $class ) .'"'. checked( $ckey, $val, false ) .' /> '. esc_html( $cval ) .'</label><br />'; 395 397 } 396 if($desc) echo '<p class="description">'. $desc.'</p>';398 if($desc) echo '<p class="description">'. wp_kses_post( $desc ) .'</p>'; 397 399 break; 398 400 case 'color': 399 $val = esc_attr(stripslashes($val));401 $val = stripslashes($val); 400 402 echo '<div style="position:relative;">'; 401 echo '<input type="text" name="'. $this->option_group .'_settings['. $el_id .']" id="'. $el_id .'" value="'. $val .'" class="'. $class.'" />';402 echo '<div id="'. $el_id.'_cp" style="position:absolute;top:0;left:190px;background:#fff;z-index:9999;"></div>';403 if($desc) echo '<p class="description">'. $desc.'</p>';403 echo '<input type="text" name="'. esc_attr( $this->option_group ) .'_settings['. esc_attr( $el_id ) .']" id="'. esc_attr( $el_id ) .'" value="'. esc_attr( $val ) .'" class="'. esc_attr( $class ) .'" />'; 404 echo '<div id="'. esc_attr( $el_id ) .'_cp" style="position:absolute;top:0;left:190px;background:#fff;z-index:9999;"></div>'; 405 if($desc) echo '<p class="description">'. wp_kses_post( $desc ) .'</p>'; 404 406 echo '<script type="text/javascript"> 405 407 jQuery(document).ready(function($){ 406 var colorPicker = $("#'. $el_id.'_cp");407 colorPicker.farbtastic("#'. $el_id.'");408 var colorPicker = $("#'. esc_attr( $el_id ) .'_cp"); 409 colorPicker.farbtastic("#'. esc_attr( $el_id ) .'"); 408 410 colorPicker.hide(); 409 $("#'. $el_id.'").live("focus", function(){411 $("#'. esc_attr( $el_id ) .'").live("focus", function(){ 410 412 colorPicker.show(); 411 413 }); 412 $("#'. $el_id.'").live("blur", function(){414 $("#'. esc_attr( $el_id ) .'").live("blur", function(){ 413 415 colorPicker.hide(); 414 416 if($(this).val() == "") $(this).val("#"); … … 418 420 break; 419 421 case 'file': 420 $val = esc_attr($val);421 echo '<input type="text" name="'. $this->option_group .'_settings['. $el_id .']" id="'. $el_id .'" value="'. $val .'" class="regular-text '. $class.'" /> ';422 echo '<input type="button" class="button wpsf-browse" id="'. $el_id.'_button" value="Browse" />';422 $val = $val; 423 echo '<input type="text" name="'. esc_attr( $this->option_group ) .'_settings['. esc_attr( $el_id ) .']" id="'. esc_attr( $el_id ) .'" value="'. esc_attr( $val ) .'" class="regular-text '. esc_attr( $class ) .'" /> '; 424 echo '<input type="button" class="button wpsf-browse" id="'. esc_attr( $el_id ) .'_button" value="Browse" />'; 423 425 echo '<script type="text/javascript"> 424 426 jQuery(document).ready(function($){ 425 $("#'. $el_id.'_button").click(function() {427 $("#'. esc_attr( $el_id ) .'_button").click(function() { 426 428 tb_show("", "media-upload.php?post_id=0&type=image&TB_iframe=true"); 427 429 window.original_send_to_editor = window.send_to_editor; 428 430 window.send_to_editor = function(html) { 429 431 var imgurl = $("img",html).attr("src"); 430 $("#'. $el_id.'").val(imgurl);432 $("#'. esc_attr( $el_id ) .'").val(imgurl); 431 433 tb_remove(); 432 434 window.send_to_editor = window.original_send_to_editor; … … 439 441 case 'editor': 440 442 wp_editor( $val, $el_id, array( 'textarea_name' => $this->option_group .'_settings['. $el_id .']' ) ); 441 if($desc) echo '<p class="description">'. $desc.'</p>';443 if($desc) echo '<p class="description">'. wp_kses_post( $desc ) .'</p>'; 442 444 break; 443 445 case 'custom': 444 echo $std;446 echo wp_kses_post( $std ); 445 447 break; 446 448 default: … … 465 467 <?php do_action( 'wpsf_do_settings_sections_'.$this->option_group ); ?> 466 468 467 <p class="submit"><input type="submit" class="button-primary" value="<?php _e( 'Save Changes' ); ?>" /></p>469 <p class="submit"><input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes', 'wp-snow-effect' ); ?>" /></p> 468 470 </form> 469 471 <?php … … 491 493 foreach ( $this->tabs as $tab_data ) { 492 494 ?> 493 <div id="tab-<?php echo $tab_data['id']; ?>" class="wpsf-tab wpsf-tab--<?php echo $tab_data['id']; ?> <?php if($i == 0) echo 'wpsf-tab--active'; ?>">495 <div id="tab-<?php echo esc_attr( $tab_data['id'] ); ?>" class="wpsf-tab wpsf-tab--<?php echo esc_attr( $tab_data['id'] ); ?> <?php if($i == 0) echo 'wpsf-tab--active'; ?>"> 494 496 <div class="postbox"> 495 497 <?php do_settings_sections( sprintf( '%s_%s', $this->option_group, $tab_data['id'] ) ); ?> … … 509 511 do_action( 'wpsf_before_tab_links_'.$this->option_group ); 510 512 511 if ( function_exists('screen_icon') ) screen_icon();513 // if ( function_exists('screen_icon') ) screen_icon(); 512 514 ?> 513 515 <h2 class="nav-tab-wrapper"> … … 517 519 $active = $i == 0 ? 'nav-tab-active' : ''; 518 520 ?> 519 <a class="nav-tab wpsf-tab-link <?php echo $active; ?>" href="#tab-<?php echo $tab_data['id']; ?>"><?php echo $tab_data['title']; ?></a>521 <a class="nav-tab wpsf-tab-link <?php echo esc_attr( $active ); ?>" href="#tab-<?php echo esc_attr( $tab_data['id'] ); ?>"><?php echo esc_html( $tab_data['title'] ); ?></a> 520 522 <?php 521 523 $i++; … … 653 655 */ 654 656 public function open_tab_wrapper( $section ) { 655 echo '<pre>'; print_r($section['tab_id']); echo '</pre>';657 // echo '<pre>'; print_r($section['tab_id']); echo '</pre>'; 656 658 } 657 659 -
wp-snow-effect/trunk/public/class-wp-snow-effect-public.php
r2432601 r3408323 101 101 * class. 102 102 */ 103 wp_enqueue_script('jsnow', plugin_dir_url(__FILE__) . 'js/jsnow.js', array('jquery'), '1.5' );104 wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/wp-snow-effect-public.js', array('jquery'), $this->version, false);103 wp_enqueue_script('jsnow', plugin_dir_url(__FILE__) . 'js/jsnow.js', array('jquery'), '1.5', true); 104 wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/wp-snow-effect-public.js', array('jquery'), $this->version, true); 105 105 106 106 $show = true; -
wp-snow-effect/trunk/wp-snow-effect.php
r3402437 r3408323 17 17 * Plugin URI: http://www.wpmaniax.com/seasonal-plugins 18 18 * Description: Add nice looking animation effect of falling snow to your Wordpress site and enjoy winter. 19 * Version: 1.1.1 619 * Version: 1.1.17 20 20 * Author: WPManiax 21 21 * Author URI: http://www.wpmaniax.com … … 35 35 * This action is documented in includes/class-wp-snow-effect-activator.php 36 36 */ 37 function activate_wp_snow_effect()37 function wp_snow_effect_activate() 38 38 { 39 39 require_once plugin_dir_path(__FILE__) . 'includes/class-wp-snow-effect-activator.php'; … … 45 45 * This action is documented in includes/class-wp-snow-effect-deactivator.php 46 46 */ 47 function deactivate_wp_snow_effect()47 function wp_snow_effect_deactivate() 48 48 { 49 49 require_once plugin_dir_path(__FILE__) . 'includes/class-wp-snow-effect-deactivator.php'; … … 51 51 } 52 52 53 register_activation_hook(__FILE__, ' activate_wp_snow_effect');54 register_deactivation_hook(__FILE__, ' deactivate_wp_snow_effect');53 register_activation_hook(__FILE__, 'wp_snow_effect_activate'); 54 register_deactivation_hook(__FILE__, 'wp_snow_effect_deactivate'); 55 55 56 56 … … 70 70 * @since 1.0.0 71 71 */ 72 function run_wp_snow_effect()72 function wp_snow_effect_run() 73 73 { 74 74 … … 76 76 $plugin->run(); 77 77 } 78 run_wp_snow_effect();78 wp_snow_effect_run();
Note: See TracChangeset
for help on using the changeset viewer.