WordPress.org

Make WordPress Core

Changeset 41340


Ignore:
Timestamp:
09/06/2017 09:31:26 PM (10 months ago)
Author:
obenland
Message:

Widgets: Improve _doing_it_wrong message.

Adds more context to help sending developers on the path to success.

Props ramiy.
Fixes 41743.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets.php

    r41327 r41340  
    10381038
    10391039    if ( ! isset( $wp_widget_factory->widgets[ $widget ] ) ) {
    1040         _doing_it_wrong( __FUNCTION__, __( 'Widgets need to be registered before they can be displayed.' ), '4.9.0' );
     1040        /* translators: %s: register_widget() */
     1041        _doing_it_wrong( __FUNCTION__, sprintf( __( 'Widgets need to be registered using %s, before they can be displayed.' ), '<code>register_widget()</code>' ), '4.9.0' );
    10411042        return;
    10421043    }
Note: See TracChangeset for help on using the changeset viewer.