Make WordPress Core

Ticket #20876: 20876.patch

File 20876.patch, 1.1 KB (added by ocean90, 14 years ago)
  • wp-includes/class-wp-customize-manager.php

     
    3131                require( ABSPATH . WPINC . '/class-wp-customize-section.php' );
    3232                require( ABSPATH . WPINC . '/class-wp-customize-control.php' );
    3333
     34                add_filter( 'wp_die_handler', array( $this, 'wp_die_handler' ) );
     35
    3436                add_action( 'setup_theme',  array( $this, 'setup_theme' ) );
    3537                add_action( 'wp_loaded',    array( $this, 'wp_loaded' ) );
    3638
     
    5355        }
    5456
    5557        /**
     58         * Return the AJAX wp_die() handler if it's a customized request.
     59         *
     60         * @since 3.4.0
     61         */
     62        public function wp_die_handler() {
     63                if ( isset( $_POST['customized'] ) )
     64                        return '_ajax_wp_die_handler';
     65
     66                return '_default_wp_die_handler';
     67        }
     68
     69        /**
    5670         * Update theme modifications for the current theme.
    5771         * Note: Candidate core function.
    5872         * http://core.trac.wordpress.org/ticket/20091
     
    967981                return '#' . $unhashed;
    968982
    969983        return $color;
    970 }
    971  No newline at end of file
     984}