Skip to content

Commit

Permalink
Docs: Fix multi-line inline comments in WP_REST_Templates_Controller.
Browse files Browse the repository at this point in the history
Converts single inline comment formatting into multi-line inline comment formatting, per the coding standards.

Ref: https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments

Follow-up to [58303], [57366].

See #61608.
Built from https://develop.svn.wordpress.org/trunk@58707


git-svn-id: https://core.svn.wordpress.org/trunk@58109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
hellofromtonya committed Jul 11, 2024
1 parent f0a0530 commit 067a9de
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,10 @@ protected function prepare_item_for_database( $request ) {
* @return WP_REST_Response Response object.
*/
public function prepare_item_for_response( $item, $request ) {
// Resolve pattern blocks so they don't need to be resolved client-side
// in the editor, improving performance.
/*
* Resolve pattern blocks so they don't need to be resolved client-side
* in the editor, improving performance.
*/
$blocks = parse_blocks( $item->content );
$blocks = resolve_pattern_blocks( $blocks );
$item->content = serialize_blocks( $blocks );
Expand Down Expand Up @@ -806,11 +808,13 @@ public function prepare_item_for_response( $item, $request ) {
*/
private static function get_wp_templates_original_source_field( $template_object ) {
if ( 'wp_template' === $template_object->type || 'wp_template_part' === $template_object->type ) {
// Added by theme.
// Template originally provided by a theme, but customized by a user.
// Templates originally didn't have the 'origin' field so identify
// older customized templates by checking for no origin and a 'theme'
// or 'custom' source.
/*
* Added by theme.
* Template originally provided by a theme, but customized by a user.
* Templates originally didn't have the 'origin' field so identify
* older customized templates by checking for no origin and a 'theme'
* or 'custom' source.
*/
if ( $template_object->has_theme_file &&
( 'theme' === $template_object->origin || (
empty( $template_object->origin ) && in_array(
Expand All @@ -831,10 +835,12 @@ private static function get_wp_templates_original_source_field( $template_object
return 'plugin';
}

// Added by site.
// Template was created from scratch, but has no author. Author support
// was only added to templates in WordPress 5.9. Fallback to showing the
// site logo and title.
/*
* Added by site.
* Template was created from scratch, but has no author. Author support
* was only added to templates in WordPress 5.9. Fallback to showing the
* site logo and title.
*/
if ( empty( $template_object->has_theme_file ) && 'custom' === $template_object->source && empty( $template_object->author ) ) {
return 'site';
}
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7-alpha-58706';
$wp_version = '6.7-alpha-58707';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 067a9de

Please sign in to comment.