Changeset 808842
- Timestamp:
- 11/22/2013 01:30:31 PM (12 years ago)
- Location:
- custom-sidebars/trunk
- Files:
-
- 2 edited
-
customsidebars.php (modified) (6 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
custom-sidebars/trunk/customsidebars.php
r781366 r808842 4 4 Plugin URI: http://wordpress.org/plugins/custom-sidebars/ 5 5 Description: Allows to create your own widgetized areas and custom sidebars, and select what sidebars to use for each post or page. 6 Version: 1.3 6 Version: 1.3.1 7 7 Author: WPMUDEV 8 8 Author URI: http://premium.wpmudev.org/ … … 440 440 441 441 function addStyles($hook){ 442 $dir = basename(dirname(__FILE__)); 443 if( 'widgets.php' == $hook || 'appearance_page_customsidebars' == $hook){ 444 wp_enqueue_script( 'cs_script', plugins_url('/cs.js', __FILE__) ); 445 wp_enqueue_script('thickbox',null,array('jquery')); 446 wp_enqueue_style('thickbox.css', '/'.WPINC.'/js/thickbox/thickbox.css', null, '1.0'); 447 } 448 wp_enqueue_style('cs_style', "/wp-content/plugins/$dir/cs_style.css" ); 449 442 $dir = basename(dirname(__FILE__)); 443 if( 'widgets.php' == $hook || 'appearance_page_customsidebars' == $hook){ 444 wp_enqueue_script( 'cs_script', plugins_url('/cs.js', __FILE__) ); 445 wp_enqueue_script('thickbox', null, array('jquery')); 446 wp_enqueue_style('thickbox.css', includes_url() . 'js/thickbox/thickbox.css', null, '1.0'); 447 } 448 wp_enqueue_style( 'cs_style', plugins_url( 'cs_style.css', __FILE__ ) ); 450 449 } 451 450 … … 483 482 484 483 function loadTextDomain(){ 485 $dir = basename(dirname(__FILE__))."/lang"; 486 load_plugin_textdomain( 'custom-sidebars', 'wp-content/plugins/'.$dir, $dir); 484 load_plugin_textdomain( 'custom-sidebars', false, dirname(plugin_basename( __FILE__ )) . "/lang/"); 487 485 } 488 486 … … 711 709 712 710 function storeSidebar(){ 713 $name = trim($_POST['sidebar_name']);714 $description = trim($_POST['sidebar_description']);711 $name = stripslashes(trim($_POST['sidebar_name'])); 712 $description = stripslashes(trim($_POST['sidebar_description'])); 715 713 if(empty($name) OR empty($description)) 716 714 $this->setError(__('You have to fill all the fields to create a new sidebar.','custom-sidebars')); … … 767 765 768 766 function updateSidebar(){ 769 $id = trim($_POST['cs_id']);770 $name = trim($_POST['sidebar_name']);771 $description = trim($_POST['sidebar_description']);772 $before_widget = trim($_POST['cs_before_widget']);773 $after_widget = trim($_POST['cs_after_widget']);774 $before_title = trim($_POST['cs_before_title']);775 $after_title = trim($_POST['cs_after_title']);767 $id = stripslashes(trim($_POST['cs_id'])); 768 $name = stripslashes(trim($_POST['sidebar_name'])); 769 $description = stripslashes(trim($_POST['sidebar_description'])); 770 $before_widget = stripslashes(trim($_POST['cs_before_widget'])); 771 $after_widget = stripslashes(trim($_POST['cs_after_widget'])); 772 $before_title = stripslashes(trim($_POST['cs_before_title'])); 773 $after_title = stripslashes(trim($_POST['cs_after_title'])); 776 774 777 775 $sidebars = $this->getCustomSidebars(); … … 1033 1031 'success' => true, 1034 1032 'message' => __('The sidebar has been created successfully.','custom-sidebars'), 1035 'name' => trim($_POST['sidebar_name']),1036 'description' => trim($_POST['sidebar_description']),1033 'name' => stripslashes(trim($_POST['sidebar_name'])), 1034 'description' => stripslashes(trim($_POST['sidebar_description'])), 1037 1035 'id' => $this->sidebar_prefix . sanitize_html_class(sanitize_title_with_dashes($_POST['sidebar_name'])) 1038 1036 ); -
custom-sidebars/trunk/readme.txt
r781366 r808842 110 110 == Changelog == 111 111 112 = 1.3.1 = 113 * Fixed: Absolute paths that leaded to the outdated browser error 114 * Fixed: Stripped slashes for the pre/post widget/title fields 115 112 116 = 1.3 = 113 117 * Fixed: A lot of warnings with the PHP debug mode on
Note: See TracChangeset
for help on using the changeset viewer.