~ubuntu-branches/debian/sid/wordpress/sid

« back to all changes in this revision

Viewing changes to wp-includes/class-wp-customize-manager.php

  • Committer: Package Import Robot
  • Author(s): Raphaël Hertzog
  • Date: 2013-09-04 23:18:58 UTC
  • mfrom: (1.2.28)
  • Revision ID: package-import@ubuntu.com-20130904231858-nljmn1buzswh63jk
Tags: 3.6+dfsg-1
* New upstream release.
* Improve wp-settings to verify that $_SERVER['HTTP_X_FORWARDED_PROTO']
  exists before accessing it (avoids a PHP notice).
  Thanks to Paul Dreik <slask@pauldreik.se> for the report and the patch.
* Document in README.Debian the need to login to /wp-admin/ to complete
  an upgrade.
* Drop useless debian/README.source
* Drop 008CVE2008-2392.patch since upstream now disables unfiltered
  uploads by default. See http://core.trac.wordpress.org/ticket/10692
* Drop 009CVE2008-6767.patch since the backto parameter is validated
  against a whitelist, and externally triggered upgrades are not a
  security problem as long as they work.
* Update debian/missing-sources with latest versions.
* Update upstream l10n.

Show diffs side-by-side

added added

removed removed

Lines of Context:
310
310
        public function post_value( $setting ) {
311
311
                if ( ! isset( $this->_post_values ) ) {
312
312
                        if ( isset( $_POST['customized'] ) )
313
 
                                $this->_post_values = json_decode( stripslashes( $_POST['customized'] ), true );
 
313
                                $this->_post_values = json_decode( wp_unslash( $_POST['customized'] ), true );
314
314
                        else
315
315
                                $this->_post_values = false;
316
316
                }
512
512
                        $setting->save();
513
513
                }
514
514
 
 
515
                do_action( 'customize_save_after', $this );
 
516
 
515
517
                die;
516
518
        }
517
519
 
897
899
                if ( $menus ) {
898
900
                        $choices = array( 0 => __( '&mdash; Select &mdash;' ) );
899
901
                        foreach ( $menus as $menu ) {
900
 
                                $truncated_name = wp_html_excerpt( $menu->name, 40 );
901
 
                                $truncated_name = ( $truncated_name == $menu->name ) ? $menu->name : trim( $truncated_name ) . '&hellip;';
902
 
                                $choices[ $menu->term_id ] = $truncated_name;
 
902
                                $choices[ $menu->term_id ] = wp_html_excerpt( $menu->name, 40, '&hellip;' );
903
903
                        }
904
904
 
905
905
                        foreach ( $locations as $location => $description ) {
975
975
         * Callback for validating the header_textcolor value.
976
976
         *
977
977
         * Accepts 'blank', and otherwise uses sanitize_hex_color_no_hash().
 
978
         * Returns default text color if hex color is empty.
978
979
         *
979
980
         * @since 3.4.0
980
981
         *
982
983
         * @return string
983
984
         */
984
985
        public function _sanitize_header_textcolor( $color ) {
985
 
                return ( 'blank' === $color ) ? 'blank' : sanitize_hex_color_no_hash( $color );
 
986
                if ( 'blank' === $color )
 
987
                        return 'blank';
 
988
 
 
989
                $color = sanitize_hex_color_no_hash( $color );
 
990
                if ( empty( $color ) )
 
991
                        $color = get_theme_support( 'custom-header', 'default-text-color' );
 
992
 
 
993
                return $color;
986
994
        }
987
995
};
988
996