Changeset 52232 for trunk/src/wp-admin/menu.php
- Timestamp:
- 11/23/2021 05:38:45 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/menu.php
r52178 r52232 213 213 'site-editor.php', 214 214 ); 215 216 $submenu['themes.php'][7] = array(217 __( 'Styles' ),218 'edit_theme_options',219 'site-editor.php?styles=open',220 );221 215 } 222 216 … … 225 219 if ( ! wp_is_block_template_theme() || has_action( 'customize_register' ) ) { 226 220 $customize_url = add_query_arg( 'return', urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), 'customize.php' ); 227 $position = wp_is_block_template_theme() ? 8: 6;221 $position = wp_is_block_template_theme() ? 7 : 6; 228 222 229 223 $submenu['themes.php'][ $position ] = array( __( 'Customize' ), 'customize', esc_url( $customize_url ), '', 'hide-if-no-customize' ); … … 250 244 // Add 'Theme Editor' to the bottom of the Appearance menu. 251 245 if ( ! is_multisite() ) { 246 // Must use API on the admin_menu hook, direct modification is only possible on/before the _admin_menu hook. 252 247 add_action( 'admin_menu', '_add_themes_utility_last', 101 ); 253 248 } 254 249 /** 255 * Adds the 'Theme Editor' link to the bottom of the Appearance menu.250 * Adds the 'Theme Editor' link to the bottom of the Appearance or Tools menu. 256 251 * 257 252 * @access private 258 253 * @since 3.0.0 254 * @since 5.9.0 'Theme Editor' link has moved to the Tools menu when a block theme is active. 259 255 */ 260 256 function _add_themes_utility_last() { 261 // Must use API on the admin_menu hook, direct modification is only possible on/before the _admin_menu hook. 262 add_submenu_page( 'themes.php', __( 'Theme Editor' ), __( 'Theme Editor' ), 'edit_themes', 'theme-editor.php' ); 257 add_submenu_page( 258 wp_is_block_template_theme() ? 'tools.php' : 'themes.php', 259 __( 'Theme Editor' ), 260 __( 'Theme Editor' ), 261 'edit_themes', 262 'theme-editor.php' 263 ); 263 264 } 264 265
Note: See TracChangeset
for help on using the changeset viewer.