[wp-trac] [WordPress Trac] #41743: Using the_widget on a widget that has not been registered results in an undefined index notice.
WordPress Trac
noreply at wordpress.org
Sun Sep 3 11:22:29 UTC 2017
#41743: Using the_widget on a widget that has not been registered results in an
undefined index notice.
--------------------------------------+-----------------------
Reporter: SeBsZ | Owner: obenland
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.9
Component: Widgets | Version: 2.8
Severity: normal | Resolution: fixed
Keywords: good-first-bug has-patch | Focuses:
--------------------------------------+-----------------------
Comment (by ramiy):
@obenland,
The text can be more informative. We can explain how to register widgets.
It is done in other messages for developers.
Just replace:
{{{
_doing_it_wrong( __FUNCTION__, __( 'Widgets need to be registered before
they can be displayed.' ), '4.9.0' );
}}}
With:
{{{
/* 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' );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41743#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list