Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Populate_From_Query::publish_trigger( $trigger_id )
Populates the POST array and publishes the trigger.
Contents
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Parameters Parameters
- $trigger_id
(Required)
Return Return
(bool)
Source Source
File: src/core/classes/class-populate-from-query.php
public static function publish_trigger( $trigger_id ) { $_POST['post_ID'] = $trigger_id; $_POST['post_status'] = 'publish'; $trigger_status_changed = self::$recipe->change_post_status( '' ); if ( ! $trigger_status_changed->data['success'] ) { throw new \Exception( "Trigger couldn't be published." ); } return true; }
Expand full source code Collapse full source code View on Github