Make WordPress Core

Ticket #35242: 35242.2.diff

File 35242.2.diff, 1.1 KB (added by DrewAPicture, 9 years ago)
  • src/wp-includes/class-wp-customize-manager.php

     
    12021202                        'widgets',
    12031203                        'nav_menus',
    12041204                );
     1205
    12051206                if ( in_array( $id, $core_panels, true ) ) {
    1206                         $url = 'https://core.trac.wordpress.org/ticket/33552#comment:12';
    1207                         _doing_it_wrong(
    1208                                 __METHOD__,
    1209                                 sprintf( __( 'Removing %1$s manually will cause PHP warnings. Use the <code>customize_loaded_components</code> filter instead. See <a href="%2$s">%2$s</a>.' ), $id, $url ),
    1210                                 '4.5'
     1207                        /* translators: 1: panel id, 2: filter reference URL, 3: filter name */
     1208                        $message = sprintf( __( 'Removing %1$s manually will cause PHP warnings. Use the <a href="%2$s">%3$s</a> filter instead.' ),
     1209                                $id,
     1210                                esc_url( 'https://developer.wordpress.org/reference/hooks/customize_loaded_components/' ),
     1211                                '<code>customize_loaded_components</code>'
    12111212                        );
     1213
     1214                        _doing_it_wrong( __METHOD__, $message, '4.5' );
    12121215                }
    12131216                unset( $this->panels[ $id ] );
    12141217        }