From b6d67c15192934dc0a2894ab0039d11ae06b098a Mon Sep 17 00:00:00 2001 From: desrosj Date: Wed, 10 Nov 2021 14:18:06 +0000 Subject: [PATCH] =?UTF-8?q?Docs:=20Avoid=20using=20=E2=80=9CCPT=E2=80=9D?= =?UTF-8?q?=20instead=20of=20=E2=80=9Ccustom=20post=20type=E2=80=9D.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Additionally, when referring to built in Core post types, “custom” is unnecessary. This also adds a period to the end of the `wp_global_styles` post type description. Follow up to [38829], [51003], [52041], [52049], [52062]. See #53399, #54335, #54336. Built from https://develop.svn.wordpress.org/trunk@52110 git-svn-id: http://core.svn.wordpress.org/trunk@51702 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/block-template-utils.php | 2 +- wp-includes/class-wp-theme-json-resolver.php | 10 +++++----- wp-includes/default-filters.php | 2 +- wp-includes/post.php | 2 +- wp-includes/theme.php | 2 +- wp-includes/version.php | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/wp-includes/block-template-utils.php b/wp-includes/block-template-utils.php index e0e64cb6f1..9b248c1453 100644 --- a/wp-includes/block-template-utils.php +++ b/wp-includes/block-template-utils.php @@ -600,7 +600,7 @@ function get_block_templates( $query = array(), $template_type = 'wp_template' ) $wp_query_args['post_name__in'] = $query['slug__in']; } - // This is only needed for the regular templates/template parts CPT listing and editor. + // This is only needed for the regular templates/template parts post type listing and editor. if ( isset( $query['wp_id'] ) ) { $wp_query_args['p'] = $query['wp_id']; } else { diff --git a/wp-includes/class-wp-theme-json-resolver.php b/wp-includes/class-wp-theme-json-resolver.php index ea9e5e677f..8e8ddadcb5 100644 --- a/wp-includes/class-wp-theme-json-resolver.php +++ b/wp-includes/class-wp-theme-json-resolver.php @@ -190,16 +190,16 @@ class WP_Theme_JSON_Resolver { } /** - * Returns the CPT that contains the user's origin config - * for the current theme or a void array if none found. + * Returns the custom post type that contains the user's origin config + * for the current theme or a void array if none are found. * - * It can also create and return a new draft CPT. + * This can also create and return a new draft custom post type. * * @since 5.9.0 * - * @param bool $should_create_cpt Optional. Whether a new CPT should be created if no one was found. + * @param bool $should_create_cpt Optional. Whether a new custom post type should be created if none are found. * False by default. - * @param array $post_status_filter Filter Optional. CPT by post status. + * @param array $post_status_filter Filter Optional. custom post type by post status. * ['publish'] by default, so it only fetches published posts. * * @return array Custom Post Type for the user's origin config. diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index d67a432637..37cd32d5aa 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -662,7 +662,7 @@ add_filter( 'user_has_cap', 'wp_maybe_grant_install_languages_cap', 1 ); add_filter( 'user_has_cap', 'wp_maybe_grant_resume_extensions_caps', 1 ); add_filter( 'user_has_cap', 'wp_maybe_grant_site_health_caps', 1, 4 ); -// Block Templates CPT and Rendering +// Block Templates post type and Rendering add_filter( 'render_block_context', '_block_template_render_without_post_block_context' ); add_filter( 'pre_wp_unique_post_slug', 'wp_filter_wp_template_unique_post_slug', 10, 5 ); add_action( 'save_post_wp_template_part', 'wp_set_unique_slug_on_create_template_part' ); diff --git a/wp-includes/post.php b/wp-includes/post.php index 9b87d3c3c6..75963deb0b 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -450,7 +450,7 @@ function create_initial_post_types() { 'wp_global_styles', array( 'label' => __( 'Global Styles' ), - 'description' => __( 'CPT to store user design tokens' ), + 'description' => __( 'Post type for storing user design tokens.' ), 'public' => false, '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 'show_ui' => false, diff --git a/wp-includes/theme.php b/wp-includes/theme.php index d0471792e1..838fe23596 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1913,7 +1913,7 @@ function wp_get_custom_css( $stylesheet = '' ) { * * @since 4.7.0 * - * @param string $css CSS pulled in from the Custom CSS CPT. + * @param string $css CSS pulled in from the Custom CSS post type. * @param string $stylesheet The theme stylesheet name. */ $css = apply_filters( 'wp_get_custom_css', $css, $stylesheet ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 4d909e54bd..e9e771471e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-52109'; +$wp_version = '5.9-alpha-52110'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.