ActionScheduler_wpPostStore::create_post_array() protected WC 1.0
{} It's a method of the class: ActionScheduler_wpPostStore{}
No Hooks.
Return
Null. Nothing.
Usage
// protected - for code of main (parent) or child class $result = $this->create_post_array( $action, $scheduled_date );
- $action(ActionScheduler_Action) (required)
- -
- $scheduled_date(DateTime)
- -
Default: NULL
Code of ActionScheduler_wpPostStore::create_post_array() ActionScheduler wpPostStore::create post array WC 5.0.0
protected function create_post_array( ActionScheduler_Action $action, DateTime $scheduled_date = NULL ) {
$post = array(
'post_type' => self::POST_TYPE,
'post_title' => $action->get_hook(),
'post_content' => json_encode($action->get_args()),
'post_status' => ( $action->is_finished() ? 'publish' : 'pending' ),
'post_date_gmt' => $this->get_scheduled_date_string( $action, $scheduled_date ),
'post_date' => $this->get_scheduled_date_string_local( $action, $scheduled_date ),
);
return $post;
}