diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index ab73a2746e..c769375b4b 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -1005,8 +1005,10 @@ function network_settings_add_js() { jQuery( function($) { var languageSelect = $( '#WPLANG' ); $( 'form' ).on( 'submit', function() { - // Don't show a spinner for English and installed languages, - // as there is nothing to download. + /* + * Don't show a spinner for English and installed languages, + * as there is nothing to download. + */ if ( ! languageSelect.find( 'option:selected' ).data( 'installed' ) ) { $( '#submit', this ).after( '' ); } diff --git a/wp-admin/includes/nav-menu.php b/wp-admin/includes/nav-menu.php index 9816198996..85998ba1e7 100644 --- a/wp-admin/includes/nav-menu.php +++ b/wp-admin/includes/nav-menu.php @@ -1502,8 +1502,10 @@ function _wp_expand_nav_menu_post_data() { if ( ! is_null( $data ) && $data ) { foreach ( $data as $post_input_data ) { - // For input names that are arrays (e.g. `menu-item-db-id[3][4][5]`), - // derive the array path keys via regex and set the value in $_POST. + /* + * For input names that are arrays (e.g. `menu-item-db-id[3][4][5]`), + * derive the array path keys via regex and set the value in $_POST. + */ preg_match( '#([^\[]*)(\[(.+)\])?#', $post_input_data->name, $matches ); $array_bits = array( $matches[1] ); diff --git a/wp-admin/includes/options.php b/wp-admin/includes/options.php index 0f85441b76..816313ce83 100644 --- a/wp-admin/includes/options.php +++ b/wp-admin/includes/options.php @@ -90,8 +90,10 @@ function options_general_add_js() { var languageSelect = $( '#WPLANG' ); $( 'form' ).on( 'submit', function() { - // Don't show a spinner for English and installed languages, - // as there is nothing to download. + /* + * Don't show a spinner for English and installed languages, + * as there is nothing to download. + */ if ( ! languageSelect.find( 'option:selected' ).data( 'installed' ) ) { $( '#submit', this ).after( '' ); } diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php index 7d2c0fde71..e2c8de32f8 100644 --- a/wp-admin/includes/plugin-install.php +++ b/wp-admin/includes/plugin-install.php @@ -486,8 +486,10 @@ function install_plugin_install_status( $api, $loop = false ) { } } else { $key = array_keys( $installed_plugin ); - // Use the first plugin regardless of the name. - // Could have issues for multiple plugins in one directory if they share different version numbers. + /* + * Use the first plugin regardless of the name. + * Could have issues for multiple plugins in one directory if they share different version numbers. + */ $key = reset( $key ); $update_file = $api->slug . '/' . $key; diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index 1ab53717e7..0e48817361 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -178,8 +178,10 @@ function _get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup 'title' => true, ); - // Name is marked up inside tags. Don't allow these. - // Author is too, but some plugins have used here (omitting Author URI). + /* + * Name is marked up inside tags. Don't allow these. + * Author is too, but some plugins have used here (omitting Author URI). + */ $plugin_data['Name'] = wp_kses( $plugin_data['Name'], $allowed_tags_in_links ); $plugin_data['Author'] = wp_kses( $plugin_data['Author'], $allowed_tags ); @@ -969,8 +971,10 @@ function delete_plugins( $plugins, $deprecated = '' ) { $this_plugin_dir = trailingslashit( dirname( $plugins_dir . $plugin_file ) ); - // If plugin is in its own directory, recursively delete the directory. - // Base check on if plugin includes directory separator AND that it's not the root plugin folder. + /* + * If plugin is in its own directory, recursively delete the directory. + * Base check on if plugin includes directory separator AND that it's not the root plugin folder. + */ if ( strpos( $plugin_file, '/' ) && $this_plugin_dir !== $plugins_dir ) { $deleted = $wp_filesystem->delete( $this_plugin_dir, true ); } else { diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index f8a478dfd9..ed73b8ff5f 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -135,8 +135,10 @@ function _wp_translate_postdata( $update = false, $post_data = null ) { $published_statuses = array( 'publish', 'future' ); - // Posts 'submitted for approval' are submitted to $_POST the same as if they were being published. - // Change status from 'publish' to 'pending' if user lacks permissions to publish or to resave published posts. + /* + * Posts 'submitted for approval' are submitted to $_POST the same as if they were being published. + * Change status from 'publish' to 'pending' if user lacks permissions to publish or to resave published posts. + */ if ( isset( $post_data['post_status'] ) && ( in_array( $post_data['post_status'], $published_statuses, true ) && ! current_user_can( $ptype->cap->publish_posts ) ) @@ -1443,8 +1445,10 @@ function get_sample_permalink( $post, $title = null, $name = null ) { $post->post_name = sanitize_title( $post->post_name ? $post->post_name : $post->post_title, $post->ID ); } - // If the user wants to set a new name -- override the current one. - // Note: if empty name is supplied -- use the title instead, see #6072. + /* + * If the user wants to set a new name -- override the current one. + * Note: if empty name is supplied -- use the title instead, see #6072. + */ if ( ! is_null( $name ) ) { $post->post_name = sanitize_title( $name ? $name : $title, $post->ID ); } @@ -2073,8 +2077,10 @@ function wp_autosave( $post_data ) { // Drafts and auto-drafts are just overwritten by autosave for the same user if the post is not locked. return edit_post( wp_slash( $post_data ) ); } else { - // Non-drafts or other users' drafts are not overwritten. - // The autosave is stored in a special post revision for each user. + /* + * Non-drafts or other users' drafts are not overwritten. + * The autosave is stored in a special post revision for each user. + */ return wp_create_post_autosave( wp_slash( $post_data ) ); } } diff --git a/wp-admin/includes/revision.php b/wp-admin/includes/revision.php index ebc10d8630..530e2fdea2 100644 --- a/wp-admin/includes/revision.php +++ b/wp-admin/includes/revision.php @@ -39,8 +39,10 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) { return false; } - // If comparing revisions, make sure we're dealing with the right post parent. - // The parent post may be a 'revision' when revisions are disabled and we're looking at autosaves. + /* + * If comparing revisions, make sure we are dealing with the right post parent. + * The parent post may be a 'revision' when revisions are disabled and we're looking at autosaves. + */ if ( $compare_from && $compare_from->post_parent !== $post->ID && $compare_from->ID !== $post->ID ) { return false; } @@ -118,8 +120,10 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) { $diff = wp_text_diff( $content_from, $content_to, $args ); if ( ! $diff && 'post_title' === $field ) { - // It's a better user experience to still show the Title, even if it didn't change. - // No, you didn't see this. + /* + * It's a better user experience to still show the Title, even if it didn't change. + * No, you didn't see this. + */ $diff = '