We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
After bfbcc92 (#19498, #15114), fetching a REST API field like meta._wp_page_template no longer works.
meta._wp_page_template
mu-plugin
register_post_meta( 'page', '_wp_page_template', array( 'show_in_rest' => true, ) );
Edit
function test() { const args = { _fields: [ 'id', 'slug', 'meta._wp_page_template', ], }; const test = useSelect( ( select ) => { return select( 'core' ).getEntityRecords( 'postType', 'page', args ); }, [] ); console.log( null !== test ? test[ 0 ][ 'meta' ] : test ); }
git checkout bfbcc92a207dd6813967bf1eff667f0a1e1bcc56~1
git checkout bfbcc92a207dd6813967bf1eff667f0a1e1bcc56
null
cc @youknowriad , @aduth , @mcsf
The text was updated successfully, but these errors were encountered:
_fields
Successfully merging a pull request may close this issue.
After bfbcc92 (#19498, #15114), fetching a REST API field like
meta._wp_page_template
no longer works.Reproduction Steps
mu-plugin
:Edit
function:git checkout bfbcc92a207dd6813967bf1eff667f0a1e1bcc56~1
and reload. You should see the meta data available in the console.git checkout bfbcc92a207dd6813967bf1eff667f0a1e1bcc56
, and reload. You should only seenull
in the console.cc @youknowriad , @aduth , @mcsf
The text was updated successfully, but these errors were encountered: