Plugin Directory

Changeset 808842


Ignore:
Timestamp:
11/22/2013 01:30:31 PM (12 years ago)
Author:
marquex
Message:

Absolute paths that leaded to the outdated browser error
Fixed: Stripped slashes for the pre/post widget/title fields

Location:
custom-sidebars/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • custom-sidebars/trunk/customsidebars.php

    r781366 r808842  
    44Plugin URI: http://wordpress.org/plugins/custom-sidebars/
    55Description: 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
     6Version: 1.3.1
    77Author: WPMUDEV
    88Author URI: http://premium.wpmudev.org/
     
    440440   
    441441    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__ ) );       
    450449    }
    451450   
     
    483482   
    484483    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/");
    487485    }
    488486   
     
    711709   
    712710    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']));
    715713        if(empty($name) OR empty($description))
    716714            $this->setError(__('You have to fill all the fields to create a new sidebar.','custom-sidebars'));
     
    767765   
    768766    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']));
    776774       
    777775        $sidebars = $this->getCustomSidebars();
     
    10331031                'success' => true,
    10341032                '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'])),
    10371035                'id' => $this->sidebar_prefix . sanitize_html_class(sanitize_title_with_dashes($_POST['sidebar_name']))
    10381036            );
  • custom-sidebars/trunk/readme.txt

    r781366 r808842  
    110110== Changelog ==
    111111
     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
    112116= 1.3 =
    113117*       Fixed: A lot of warnings with the PHP debug mode on
Note: See TracChangeset for help on using the changeset viewer.