ACF_Local_Meta::pre_load_post_id
pre_load_post_id
Injects the local post_id.
Method of the class: ACF_Local_Meta{}
No Hooks.
Returns
Mixed.
Usage
$ACF_Local_Meta = new ACF_Local_Meta(); $ACF_Local_Meta->pre_load_post_id( $null, $post_id );
- $null(null) (required)
- An empty parameter. Return a non null value to short-circuit the function.
- $post_id(mixed) (required)
- The post_id for this data.
Changelog
| Since 5.8.0 | Introduced. |
ACF_Local_Meta::pre_load_post_id() ACF Local Meta::pre load post id code ACF 6.0.4
function pre_load_post_id( $null, $post_id ) {
if ( ! $post_id && $this->post_id ) {
return $this->post_id;
}
return $null;
}