Skip to content

Commit

Permalink
Update template and template parts labels (#61146)
Browse files Browse the repository at this point in the history
Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: youknowriad <[email protected]>
  • Loading branch information
4 people authored Apr 26, 2024
1 parent 329ca6e commit 0b185ea
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lib/compat/wordpress-6.6/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,27 @@ function gutenberg_add_excerpt_support_to_wp_block() {
}

add_action( 'init', 'gutenberg_add_excerpt_support_to_wp_block' );

/**
* Updates the labels for the template post type.
*
* @param object $labels Object with labels for the post type as member variables.
* @return object Object with all the labels as member variables.
*/
function gutenberg_update_wp_template_labels( $labels ) {
$labels->item_updated = __( 'Template updated.', 'gutenberg' );
return $labels;
}
add_filter( 'post_type_labels_wp_template', 'gutenberg_update_wp_template_labels', 10, 1 );

/**
* Updates the labels for the template parts post type.
*
* @param object $labels Object with labels for the post type as member variables.
* @return object Object with all the labels as member variables.
*/
function gutenberg_update_wp_template__part_labels( $labels ) {
$labels->item_updated = __( 'Template part updated.', 'gutenberg' );
return $labels;
}
add_filter( 'post_type_labels_wp_template_part', 'gutenberg_update_wp_template__part_labels', 10, 1 );

1 comment on commit 0b185ea

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 0b185ea.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/8849583323
📝 Reported issues:

Please sign in to comment.