mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +00:00
Widgets: Improve _doing_it_wrong message.
Adds more context to help sending developers on the path to success. Props ramiy. Fixes 41743. git-svn-id: https://develop.svn.wordpress.org/trunk@41340 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1037,7 +1037,8 @@ function the_widget( $widget, $instance = array(), $args = array() ) {
|
||||
global $wp_widget_factory;
|
||||
|
||||
if ( ! isset( $wp_widget_factory->widgets[ $widget ] ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Widgets need to be registered before they can be displayed.' ), '4.9.0' );
|
||||
/* translators: %s: register_widget() */
|
||||
_doing_it_wrong( __FUNCTION__, sprintf( __( 'Widgets need to be registered using %s, before they can be displayed.' ), '<code>register_widget()</code>' ), '4.9.0' );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user