Make WordPress Core

Ticket #26876: 26876.2.diff

File 26876.2.diff, 675 bytes (added by MikeHansenMe, 11 years ago)

Refreshed

  • src/wp-includes/widgets.php

     
    211211         * @access private
    212212         */
    213213        public function _register() {
    214                 $settings = $this->get_settings();
     214                $settings = false;
    215215                $empty = true;
    216216
     217                // Prefetch settings only for widgets that are used (whether active or inactive)
     218                if ( is_active_widget( false, false, $this->id_base, false ) ) {
     219                        $settings = $this->get_settings();
     220                }
     221
    217222                if ( is_array($settings) ) {
    218223                        foreach ( array_keys($settings) as $number ) {
    219224                                if ( is_numeric($number) ) {