ActionScheduler_wpPostStore::filter_insert_post_data
Filter insert post data.
Method of the class: ActionScheduler_wpPostStore{}
No Hooks.
Returns
Array.
Usage
$ActionScheduler_wpPostStore = new ActionScheduler_wpPostStore(); $ActionScheduler_wpPostStore->filter_insert_post_data( $postdata );
- $postdata(array) (required)
- Post data to filter.
ActionScheduler_wpPostStore::filter_insert_post_data() ActionScheduler wpPostStore::filter insert post data code WC 10.9.4
public function filter_insert_post_data( $postdata ) {
if ( self::POST_TYPE === $postdata['post_type'] ) {
$postdata['post_author'] = 0;
if ( 'future' === $postdata['post_status'] ) {
$postdata['post_status'] = 'publish';
}
}
return $postdata;
}