WordPress.org

Make WordPress Core

Ticket #41743: 41743.patch

File 41743.patch, 650 bytes (added by ramiy, 2 years ago)

Use informative message in _doing_it_wrong() function

  • wp-includes/widgets.php

     
    10371037        global $wp_widget_factory;
    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        }
    10431044