Changeset 2883000
- Timestamp:
- 03/19/2023 08:39:06 PM (3 years ago)
- Location:
- show-hidecollapse-expand/trunk
- Files:
-
- 2 edited
-
PluginContext.php (modified) (5 diffs)
-
bg_show_hide.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
show-hidecollapse-expand/trunk/PluginContext.php
r2843664 r2883000 50 50 } 51 51 public function getEffectsEnabledOption() { 52 return $this->_effectsEnabled;52 return esc_html($this->_effectsEnabled); 53 53 } 54 54 … … 57 57 } 58 58 public function getAnimationEffect() { 59 return $this->_animationEffect;59 return esc_html($this->_animationEffect); 60 60 } 61 61 … … 64 64 } 65 65 public function getAnimationSpeed() { 66 return $this->_animationSpeed;66 return esc_html($this->_animationSpeed); 67 67 } 68 68 … … 71 71 } 72 72 public function getStickToBottom() { 73 return $this->_stickToBottom;73 return esc_html($this->_stickToBottom); 74 74 } 75 75 … … 78 78 } 79 79 public function getPreset1() { 80 return $this->_preset1;80 return esc_html($this->_preset1); 81 81 } 82 82 -
show-hidecollapse-expand/trunk/bg_show_hide.php
r2882995 r2883000 160 160 function bg_filter_shortcode_presets( $content = null) { 161 161 if ( strstr($content, '[bg_collapse_preset1') || strstr($content, strtoupper('[bg_collapse_preset1')) ) { 162 $content = str_replace('bg_collapse_preset1', 'bg_collapse '.str_replace('\"', '"', get_option('bg_shce_preset1',' ')), $content);162 $content = str_replace('bg_collapse_preset1', 'bg_collapse '.str_replace('\"', '"',esc_html(get_option('bg_shce_preset1',' '))), $content); 163 163 } 164 164 return $content; … … 203 203 $bg_inline_css = esc_attr($a["inline_css"]); 204 204 $bg_custom_class = esc_attr($a["custom_class"]); 205 $bg_button_or_link_sticks_to_content_bottom = get_option('bg_shce_stickToBottom', '0');205 $bg_button_or_link_sticks_to_content_bottom = esc_html(get_option('bg_shce_stickToBottom', '0')); 206 206 $showmore_btn = ""; 207 207 $bg_button_or_link = false; … … 292 292 ); 293 293 294 wp_localize_script( "bg-show-hide-script", 'BG_SHCE_USE_EFFECTS', get_option('bg_shce_effectsEnabled','0'));295 wp_localize_script( "bg-show-hide-script", 'BG_SHCE_TOGGLE_SPEED', get_option('bg_shce_animationSpeed','400'));294 wp_localize_script( "bg-show-hide-script", 'BG_SHCE_USE_EFFECTS', esc_html(get_option('bg_shce_effectsEnabled','0'))); 295 wp_localize_script( "bg-show-hide-script", 'BG_SHCE_TOGGLE_SPEED', esc_html(get_option('bg_shce_animationSpeed','400'))); 296 296 wp_localize_script( "bg-show-hide-script", 'BG_SHCE_TOGGLE_OPTIONS', 'none'); 297 wp_localize_script( "bg-show-hide-script", 'BG_SHCE_TOGGLE_EFFECT', get_option('bg_shce_animationEffect','blind'));297 wp_localize_script( "bg-show-hide-script", 'BG_SHCE_TOGGLE_EFFECT', esc_html(get_option('bg_shce_animationEffect','blind'))); 298 298 299 299 } … … 338 338 $pluginContext = new bg_show_hide_PluginContext( ); 339 339 $pluginContext->setAdminPostUrl( admin_url( 'admin-post.php' ) ); 340 $pluginContext->setRedirectValue( $_SERVER['REQUEST_URI']);340 $pluginContext->setRedirectValue( esc_url($_SERVER['REQUEST_URI']) ); 341 341 $pluginContext->setPluginName( "Show-Hide/Collapse-Expand"); 342 342 $pluginContext->setPluginSlug( "bg_show_hide"); 343 $pluginContext->setEffectsEnabledOption( get_option('bg_shce_effectsEnabled','0') );344 $pluginContext->setAnimationEffect( get_option('bg_shce_animationEffect','blind') );345 $pluginContext->setAnimationSpeed( get_option('bg_shce_animationSpeed', 400) );346 $pluginContext->setStickToBottom( get_option('bg_shce_stickToBottom', '0') );347 $pluginContext->setPreset1( get_option('bg_shce_preset1', 'view="link" icon="arrow" color="#0071bb" collapse_text="Click to close" inline_css="font-weight:bold;"') );343 $pluginContext->setEffectsEnabledOption( esc_html(get_option('bg_shce_effectsEnabled','0')) ); 344 $pluginContext->setAnimationEffect( esc_html(get_option('bg_shce_animationEffect','blind')) ); 345 $pluginContext->setAnimationSpeed( esc_html(get_option('bg_shce_animationSpeed', 400)) ); 346 $pluginContext->setStickToBottom( esc_html(get_option('bg_shce_stickToBottom', '0')) ); 347 $pluginContext->setPreset1( esc_html(get_option('bg_shce_preset1', 'view="link" icon="arrow" color="#0071bb" collapse_text="Click to close" inline_css="font-weight:bold;"')) ); 348 348 349 349 $activeTabName = "settings"; … … 415 415 plugins_url( BG_SHCE_TMCE_STYLESHEET_FILE_URL, __FILE__ ) ); 416 416 417 wp_localize_script( "jquery", "BG_SHCE_PRESET1", array( get_option('bg_shce_preset1',' ')));417 wp_localize_script( "jquery", "BG_SHCE_PRESET1", array(esc_html(get_option('bg_shce_preset1',' ')))); 418 418 419 419 }
Note: See TracChangeset
for help on using the changeset viewer.