Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update: Followups to the template and template_lock rest api addition. #62696

Conversation

jorgefilipecosta
Copy link
Member

This PR does some follow-ups to #62488.

Namely improvement of the description in the schema as suggested by @mcsf.
Adds the missing backport changelog referred to by @ellatrix.

Testing

I added the following test code to a PHP file:

function myplugin_register_template() {
    $post_type_object = get_post_type_object( 'page' );
    $post_type_object->template = array(
        array( 'core/image' ),
    );
	$post_type_object->template_lock = 'all';
}
add_action( 'init', 'myplugin_register_template' );

I opened the site editor and pasted:
wp.data.select('core').getPostType( 'page' );

I verified that the template and tempalte_lock properties are still included in the response as expected.

@jorgefilipecosta jorgefilipecosta added the [Type] Enhancement A suggestion for improvement. label Jun 20, 2024
Copy link

github-actions bot commented Jun 20, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@jorgefilipecosta jorgefilipecosta force-pushed the update/followups-to-the-template-and-template_lock-rest-api-addition branch from 995e114 to 55643b2 Compare June 20, 2024 11:22
@jorgefilipecosta jorgefilipecosta merged commit b3fc5b4 into trunk Jun 20, 2024
62 checks passed
@jorgefilipecosta jorgefilipecosta deleted the update/followups-to-the-template-and-template_lock-rest-api-addition branch June 20, 2024 12:18
@github-actions github-actions bot added this to the Gutenberg 18.7 milestone Jun 20, 2024
@ellatrix ellatrix added the Backport to WP 6.6 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Jun 25, 2024
ellatrix added a commit that referenced this pull request Jun 25, 2024
#62696)

Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
@ellatrix
Copy link
Member

I just cherry-picked this PR to the try/6.6-rc-1 branch to get it included in the next release: 93919ed

@ellatrix ellatrix added Backported to WP Core Pull request that has been successfully merged into WP Core and removed Backport to WP 6.6 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta labels Jun 25, 2024
ellatrix added a commit that referenced this pull request Jun 25, 2024
#62696)

Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
ellatrix added a commit that referenced this pull request Jun 25, 2024
#62696)

Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported to WP Core Pull request that has been successfully merged into WP Core [Type] Enhancement A suggestion for improvement.
2 participants