mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Widgets: Add a comment in WP_Nav_Menu_Widget::form() to clarify the esc_attr() usage.
The URL to create a new menu from the the Navigation Menu widget can be a `javascript:` link to the Customizer Menus panel, so `esc_attr()` is used here instead of `esc_url()`. Follow-up to [53092]. Props hztyfoon. Fixes #56128. git-svn-id: https://develop.svn.wordpress.org/trunk@53630 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8622af27bb
commit
2a10fc1e5b
@ -171,8 +171,12 @@ class WP_Nav_Menu_Widget extends WP_Widget {
|
||||
$url = admin_url( 'nav-menus.php' );
|
||||
}
|
||||
|
||||
/* translators: %s: URL to create a new menu. */
|
||||
printf( __( 'No menus have been created yet. <a href="%s">Create some</a>.' ), esc_attr( $url ) );
|
||||
printf(
|
||||
/* translators: %s: URL to create a new menu. */
|
||||
__( 'No menus have been created yet. <a href="%s">Create some</a>.' ),
|
||||
// The URL can be a `javascript:` link, so esc_attr() is used here instead of esc_url().
|
||||
esc_attr( $url )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<div class="nav-menu-widget-form-controls" <?php echo $empty_menus_style; ?>>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user