Changeset 52406
- Timestamp:
- 12/21/2021 08:04:54 PM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/common.js
r52285 r52406 1310 1310 1311 1311 /** 1312 * Handles tab keypresses in theme and plugin editor textareas.1312 * Handles tab keypresses in theme and plugin file editor textareas. 1313 1313 * 1314 1314 * @param {Event} e The event object. -
trunk/src/wp-admin/css/common.css
r51891 r52406 3146 3146 } 3147 3147 3148 /* Theme/Plugin Editor */3148 /* Theme/Plugin file editor */ 3149 3149 .alignleft h2 { 3150 3150 margin: 0; … … 3199 3199 3200 3200 /* 3201 * Styles for Theme and Plugin editors.3201 * Styles for Theme and Plugin file editors. 3202 3202 */ 3203 3203 -
trunk/src/wp-admin/includes/deprecated.php
r52285 r52406 204 204 205 205 /** 206 * Adds JavaScript required to make CodePress work on the theme/plugin editors.206 * Adds JavaScript required to make CodePress work on the theme/plugin file editors. 207 207 * 208 208 * @since 2.8.0 -
trunk/src/wp-admin/includes/file.php
r52351 r52406 224 224 225 225 /** 226 * Filters the list of file types allowed for editing in the plugin editor.226 * Filters the list of file types allowed for editing in the plugin file editor. 227 227 * 228 228 * @since 2.8.0 … … 283 283 284 284 /** 285 * Filters the list of file types allowed for editing in the theme editor.285 * Filters the list of file types allowed for editing in the theme file editor. 286 286 * 287 287 * @since 4.4.0 -
trunk/src/wp-admin/includes/misc.php
r51837 r52406 310 310 311 311 /** 312 * Update the "recently-edited" file for the plugin or theme editor.312 * Update the "recently-edited" file for the plugin or theme file editor. 313 313 * 314 314 * @since 1.5.0 … … 333 333 334 334 /** 335 * Makes a tree structure for the theme editor's file list.335 * Makes a tree structure for the theme file editor's file list. 336 336 * 337 337 * @since 4.9.0 … … 355 355 356 356 /** 357 * Outputs the formatted file list for the theme editor.357 * Outputs the formatted file list for the theme file editor. 358 358 * 359 359 * @since 4.9.0 … … 426 426 427 427 /** 428 * Makes a tree structure for the plugin editor's file list.428 * Makes a tree structure for the plugin file editor's file list. 429 429 * 430 430 * @since 4.9.0 … … 448 448 449 449 /** 450 * Outputs the formatted file list for the plugin editor.450 * Outputs the formatted file list for the plugin file editor. 451 451 * 452 452 * @since 4.9.0 -
trunk/src/wp-admin/includes/theme.php
r52371 r52406 147 147 148 148 /** 149 * Tidies a filename for url display by the theme editor.149 * Tidies a filename for url display by the theme file editor. 150 150 * 151 151 * @since 2.9.0 -
trunk/src/wp-admin/menu.php
r52330 r52406 242 242 unset( $appearance_cap ); 243 243 244 // Add 'Theme Editor' to the bottom of the Appearancemenu.244 // Add 'Theme File Editor' to the bottom of the Appearance (non-block themes) or Tools (block themes) menu. 245 245 if ( ! is_multisite() ) { 246 246 // Must use API on the admin_menu hook, direct modification is only possible on/before the _admin_menu hook. … … 248 248 } 249 249 /** 250 * Adds the 'Theme Editor' link to the bottom of the Appearance or Tools menu. 250 * Adds the 'Theme File Editor' menu item to the bottom of the Appearance (non-block themes) 251 * or Tools (block themes) menu. 251 252 * 252 253 * @access private 253 254 * @since 3.0.0 254 * @since 5.9.0 'Theme Editor' link has moved to the Tools menu when a block theme is active. 255 * @since 5.9.0 Renamed 'Theme Editor' to 'Theme File Editor'. 256 * Relocates to Tools for block themes. 255 257 */ 256 258 function _add_themes_utility_last() { 257 259 add_submenu_page( 258 260 wp_is_block_theme() ? 'tools.php' : 'themes.php', 259 __( 'Theme Editor' ),260 __( 'Theme Editor' ),261 __( 'Theme File Editor' ), 262 __( 'Theme File Editor' ), 261 263 'edit_themes', 262 264 'theme-editor.php' 265 ); 266 } 267 268 /** 269 * Adds the 'Plugin File Editor' menu item after the 'Themes File Editor' in Tools 270 * for block themes. 271 * 272 * @access private 273 * @since 5.9.0 274 */ 275 function _add_plugin_file_editor_to_tools() { 276 if ( ! wp_is_block_theme() ) { 277 return; 278 } 279 add_submenu_page( 280 'tools.php', 281 __( 'Plugin File Editor' ), 282 __( 'Plugin File Editor' ), 283 'edit_plugins', 284 'plugin-editor.php' 263 285 ); 264 286 } … … 284 306 /* translators: Add new plugin. */ 285 307 $submenu['plugins.php'][10] = array( _x( 'Add New', 'plugin' ), 'install_plugins', 'plugin-install.php' ); 286 $submenu['plugins.php'][15] = array( __( 'Plugin Editor' ), 'edit_plugins', 'plugin-editor.php' ); 308 if ( wp_is_block_theme() ) { 309 // Place the menu item below the Theme File Editor menu item. 310 add_action( 'admin_menu', '_add_plugin_file_editor_to_tools', 101 ); 311 } else { 312 $submenu['plugins.php'][15] = array( __( 'Plugin File Editor' ), 'edit_plugins', 'plugin-editor.php' ); 313 } 287 314 } 288 315 -
trunk/src/wp-admin/network/menu.php
r47198 r52406 80 80 $submenu['themes.php'][5] = array( __( 'Installed Themes' ), 'manage_network_themes', 'themes.php' ); 81 81 $submenu['themes.php'][10] = array( _x( 'Add New', 'theme' ), 'install_themes', 'theme-install.php' ); 82 $submenu['themes.php'][15] = array( __( 'Theme Editor' ), 'edit_themes', 'theme-editor.php' );82 $submenu['themes.php'][15] = array( __( 'Theme File Editor' ), 'edit_themes', 'theme-editor.php' ); 83 83 84 84 if ( current_user_can( 'update_plugins' ) && $update_data['counts']['plugins'] ) { … … 105 105 $submenu['plugins.php'][5] = array( __( 'Installed Plugins' ), 'manage_network_plugins', 'plugins.php' ); 106 106 $submenu['plugins.php'][10] = array( _x( 'Add New', 'plugin' ), 'install_plugins', 'plugin-install.php' ); 107 $submenu['plugins.php'][15] = array( __( 'Plugin Editor' ), 'edit_plugins', 'plugin-editor.php' );107 $submenu['plugins.php'][15] = array( __( 'Plugin File Editor' ), 'edit_plugins', 'plugin-editor.php' ); 108 108 109 109 $menu[25] = array( __( 'Settings' ), 'manage_network_options', 'settings.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'dashicons-admin-settings' ); -
trunk/src/wp-admin/network/plugin-editor.php
r47198 r52406 1 1 <?php 2 2 /** 3 * Plugin editor network administration panel.3 * Plugin file editor network administration panel. 4 4 * 5 5 * @package WordPress -
trunk/src/wp-admin/network/theme-editor.php
r47198 r52406 1 1 <?php 2 2 /** 3 * Theme editor network administration panel.3 * Theme file editor network administration panel. 4 4 * 5 5 * @package WordPress -
trunk/src/wp-admin/plugin-editor.php
r51979 r52406 1 1 <?php 2 2 /** 3 * Edit plugin editor administration panel.3 * Edit plugin file editor administration panel. 4 4 * 5 5 * @package WordPress … … 125 125 'title' => __( 'Overview' ), 126 126 'content' => 127 '<p>' . __( 'You can use the plugin editor to make changes to any of your plugins’ individual PHP files. Be aware that if you make changes, plugins updates will overwrite your customizations.' ) . '</p>' .127 '<p>' . __( 'You can use the plugin file editor to make changes to any of your plugins’ individual PHP files. Be aware that if you make changes, plugins updates will overwrite your customizations.' ) . '</p>' . 128 128 '<p>' . __( 'Choose a plugin to edit from the dropdown menu and click the Select button. Click once on any file name to load it in the editor, and make your changes. Don’t forget to save your changes (Update File) when you’re finished.' ) . '</p>' . 129 129 '<p>' . __( 'The Documentation menu below the editor lists the PHP functions recognized in the plugin file. Clicking Look Up takes you to a web page about that particular function.' ) . '</p>' . -
trunk/src/wp-admin/theme-editor.php
r52330 r52406 1 1 <?php 2 2 /** 3 * Theme editor administration panel.3 * Theme file editor administration panel. 4 4 * 5 5 * @package WordPress … … 28 28 'title' => __( 'Overview' ), 29 29 'content' => 30 '<p>' . __( 'You can use the theme editor to edit the individual CSS and PHP files which make up your theme.' ) . '</p>' .30 '<p>' . __( 'You can use the theme file editor to edit the individual CSS and PHP files which make up your theme.' ) . '</p>' . 31 31 '<p>' . __( 'Begin by choosing a theme to edit from the dropdown menu and clicking the Select button. A list then appears of the theme’s template files. Clicking once on any file name causes the file to appear in the large Editor box.' ) . '</p>' . 32 32 '<p>' . __( 'For PHP files, you can use the Documentation dropdown to select from functions recognized in that file. Look Up takes you to a web page with reference material about that particular function.' ) . '</p>' . -
trunk/src/wp-includes/general-template.php
r52136 r52406 3579 3579 * @type string $type The MIME type of the file to be edited. 3580 3580 * @type string $file Filename to be edited. Extension is used to sniff the type. Can be supplied as alternative to `$type` param. 3581 * @type WP_Theme $theme Theme being edited when on the me editor.3582 * @type string $plugin Plugin being edited when on plugineditor.3581 * @type WP_Theme $theme Theme being edited when on the theme file editor. 3582 * @type string $plugin Plugin being edited when on the plugin file editor. 3583 3583 * @type array $codemirror Additional CodeMirror setting overrides. 3584 3584 * @type array $csslint CSSLint rule overrides. … … 3670 3670 * @type string $type The MIME type of the file to be edited. 3671 3671 * @type string $file Filename to be edited. Extension is used to sniff the type. Can be supplied as alternative to `$type` param. 3672 * @type WP_Theme $theme Theme being edited when on the me editor.3673 * @type string $plugin Plugin being edited when on plugineditor.3672 * @type WP_Theme $theme Theme being edited when on the theme file editor. 3673 * @type string $plugin Plugin being edited when on the plugin file editor. 3674 3674 * @type array $codemirror Additional CodeMirror setting overrides. 3675 3675 * @type array $csslint CSSLint rule overrides. … … 4007 4007 * @type string $type The MIME type of the file to be edited. 4008 4008 * @type string $file Filename being edited. 4009 * @type WP_Theme $theme Theme being edited when on the me editor.4010 * @type string $plugin Plugin being edited when on plugineditor.4009 * @type WP_Theme $theme Theme being edited when on the theme file editor. 4010 * @type string $plugin Plugin being edited when on the plugin file editor. 4011 4011 * @type array $codemirror Additional CodeMirror setting overrides. 4012 4012 * @type array $csslint CSSLint rule overrides.
Note: See TracChangeset
for help on using the changeset viewer.