Docs: Update syntax for some multi-line comments per the documentation standards.
Follow-up to [51003], [51149]. See #52628. Built from https://develop.svn.wordpress.org/trunk@51168 git-svn-id: http://core.svn.wordpress.org/trunk@50777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5ffd5d6e9b
commit
b27fbee0f3
|
@ -23,11 +23,14 @@ function locate_block_template( $template, $type, array $templates ) {
|
||||||
global $_wp_current_template_content;
|
global $_wp_current_template_content;
|
||||||
|
|
||||||
if ( $template ) {
|
if ( $template ) {
|
||||||
// locate_template() has found a PHP template at the path specified by $template.
|
/*
|
||||||
// That means that we have a fallback candidate if we cannot find a block template
|
* locate_template() has found a PHP template at the path specified by $template.
|
||||||
// with higher specificity.
|
* That means that we have a fallback candidate if we cannot find a block template
|
||||||
// Thus, before looking for matching block themes, we shorten our list of candidate
|
* with higher specificity.
|
||||||
// templates accordingly.
|
*
|
||||||
|
* Thus, before looking for matching block themes, we shorten our list of candidate
|
||||||
|
* templates accordingly.
|
||||||
|
*/
|
||||||
|
|
||||||
// Locate the index of $template (without the theme directory path) in $templates.
|
// Locate the index of $template (without the theme directory path) in $templates.
|
||||||
$relative_template_path = str_replace(
|
$relative_template_path = str_replace(
|
||||||
|
@ -218,11 +221,10 @@ function _strip_template_file_suffix( $template_file ) {
|
||||||
*/
|
*/
|
||||||
function _block_template_render_without_post_block_context( $context ) {
|
function _block_template_render_without_post_block_context( $context ) {
|
||||||
/*
|
/*
|
||||||
* When loading a template directly and not through a page
|
* When loading a template directly and not through a page that resolves it,
|
||||||
* that resolves it, the top-level post ID and type context get set to that
|
* the top-level post ID and type context get set to that of the template.
|
||||||
* of the template. Templates are just the structure of a site, and
|
* Templates are just the structure of a site, and they should not be available
|
||||||
* they should not be available as post context because blocks like Post
|
* as post context because blocks like Post Content would recurse infinitely.
|
||||||
* Content would recurse infinitely.
|
|
||||||
*/
|
*/
|
||||||
if ( isset( $context['postType'] ) && 'wp_template' === $context['postType'] ) {
|
if ( isset( $context['postType'] ) && 'wp_template' === $context['postType'] ) {
|
||||||
unset( $context['postId'] );
|
unset( $context['postId'] );
|
||||||
|
|
|
@ -1098,9 +1098,11 @@ class WP_Theme_JSON {
|
||||||
$incoming_data = $incoming->get_raw_data();
|
$incoming_data = $incoming->get_raw_data();
|
||||||
$this->theme_json = array_replace_recursive( $this->theme_json, $incoming_data );
|
$this->theme_json = array_replace_recursive( $this->theme_json, $incoming_data );
|
||||||
|
|
||||||
// The array_replace_recursive algorithm merges at the leaf level.
|
/*
|
||||||
// For leaf values that are arrays it will use the numeric indexes for replacement.
|
* The array_replace_recursive() algorithm merges at the leaf level.
|
||||||
// In those cases, we want to replace the existing with the incoming value, if it exists.
|
* For leaf values that are arrays it will use the numeric indexes for replacement.
|
||||||
|
* In those cases, we want to replace the existing with the incoming value, if it exists.
|
||||||
|
*/
|
||||||
$to_replace = array();
|
$to_replace = array();
|
||||||
$to_replace[] = array( 'custom' );
|
$to_replace[] = array( 'custom' );
|
||||||
$to_replace[] = array( 'spacing', 'units' );
|
$to_replace[] = array( 'spacing', 'units' );
|
||||||
|
|
|
@ -22,12 +22,13 @@ function wp_filter_wp_template_unique_post_slug( $override_slug, $slug, $post_ID
|
||||||
$override_slug = $slug;
|
$override_slug = $slug;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Template slugs must be unique within the same theme.
|
/*
|
||||||
// TODO - Figure out how to update this to work for a multi-theme
|
* Template slugs must be unique within the same theme.
|
||||||
// environment. Unfortunately using `get_the_terms` for the 'wp-theme'
|
* TODO - Figure out how to update this to work for a multi-theme environment.
|
||||||
// term does not work in the case of new entities since is too early in
|
* Unfortunately using `get_the_terms()` for the 'wp-theme' term does not work
|
||||||
// the process to have been saved to the entity. So for now we use the
|
* in the case of new entities since is too early in the process to have been saved
|
||||||
// currently activated theme for creation.
|
* to the entity. So for now we use the currently activated theme for creation.
|
||||||
|
*/
|
||||||
$theme = wp_get_theme()->get_stylesheet();
|
$theme = wp_get_theme()->get_stylesheet();
|
||||||
$terms = get_the_terms( $post_ID, 'wp_theme' );
|
$terms = get_the_terms( $post_ID, 'wp_theme' );
|
||||||
if ( $terms && ! is_wp_error( $terms ) ) {
|
if ( $terms && ! is_wp_error( $terms ) ) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.8-beta2-51167';
|
$wp_version = '5.8-beta2-51168';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue