[wp-trac] [WordPress Trac] #56718: register_post_meta not being initialized default value right away
WordPress Trac
noreply at wordpress.org
Mon Oct 3 10:08:29 UTC 2022
#56718: register_post_meta not being initialized default value right away
--------------------------------+------------------------------
Reporter: kaimaniiii | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version: 5.5
Severity: normal | Resolution:
Keywords: dev-feedback | Focuses:
--------------------------------+------------------------------
Changes (by spacedmonkey):
* keywords: => dev-feedback
* version: 6.0.2 => 5.5
* component: General => Options, Meta APIs
* severity: critical => normal
Comment:
Thanks for your ticket @kaimaniiii.
However, I think the issue here is a very simply one.
Consider this line.
{{{#!php
add_action( 'rest_api_init',
'autoload_register_meta_post_core_feature_image', 9999 );
}}}
This only registers the meta on the rest api init. If you try to load meta
in another context like on the front end or in a rss, this meta would be
registered. If you can it to simple be the following, it should fix the
issue.
{{{#!php
add_action( 'init', 'autoload_register_meta_post_core_feature_image', 9999
);
}}}
I will await your response, but otherwise I believe there is no issue
here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56718#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list