Gravity_Flow_Step_Feed_Post_Update
Class Gravity_Flow_Step_Feed_Post_Update
Source: includes/steps/class-step-feed-post-update.php:19
Details
- Kind:
class - Namespace:
(global) - Extends:
Gravity_Flow_Step_Feed_Add_On
Properties
| Property | Type | Description |
|---|---|---|
$_step_type | string | The step type. |
$_class_name | string | The name of the class used by the add-on. |
Methods
| Method | Description |
|---|---|
is_supported() | Determines if this step can be used on this site. APC v1.0+ is required. |
get_label() | Returns the step label. |
get_icon_url() | Returns the HTML for the step icon. |
get_settings() | Returns an array of settings for this step type. |
process_feed() | Processes the given feed for the add-on. |
prepare_updated_post() | Prepare the updated post with values from step settings. |
post_not_updated() | Revise the note which is added to timeline when post does not exist for update. |
get_update_post_id() | Returns the ID of the post previously created by the current feed. |
update_post() | Updates the supplied post based on the given feed configuration. |
Method Reference
is_supported()
public function is_supported()
Determines if this step can be used on this site. APC v1.0+ is required.
Returns
bool
Since: 2.7.9
Source: includes/steps/class-step-feed-post-update.php:47
get_label()
public function get_label()
Returns the step label.
Returns
string
Since: 2.7.9
Source: includes/steps/class-step-feed-post-update.php:58
get_icon_url()
public function get_icon_url()
Returns the HTML for the step icon.
Returns
string
Since: 2.7.9
Source: includes/steps/class-step-feed-post-update.php:69
get_settings()
public function get_settings()
Returns an array of settings for this step type.
Returns
array
Since: 2.7.9
Source: includes/steps/class-step-feed-post-update.php:80
process_feed()
public function process_feed( $feed )
Processes the given feed for the add-on.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$feed | array | The add-on feed properties. |
Returns
bool— Is feed processing complete?
Since: 2.7.9
Source: includes/steps/class-step-feed-post-update.php:133
prepare_updated_post()
public function prepare_updated_post( $post, $feed, $entry )
Prepare the updated post with values from step settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$post | array | The post array being updated. | |
$feed | array | The feed being processed. | |
$entry | array | The entry linked to the post. |
Returns
array— $post The post array being updated.
Since: 2.7.9
Source: includes/steps/class-step-feed-post-update.php:166
post_not_updated()
public function post_not_updated( $note, $entry_id, $user_id, $user_name, $step )
Revise the note which is added to timeline when post does not exist for update.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$note | string | The message to be added to the timeline. | |
$entry_id | int | The entry of the current step. | |
$user_id | bool | int | The ID of user performing the current step action. | |
$user_name | string | The username of user performing the current step action. | |
$step | bool | Gravity_Flow_Step | If it is a step based action the current step. |
Returns
bool|string
Since: 2.7.9
Source: includes/steps/class-step-feed-post-update.php:187
get_update_post_id()
public function get_update_post_id( $feed_id )
Returns the ID of the post previously created by the current feed.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$feed_id | int | The current feed ID. |
Returns
int|null
Since: 2.7.9
Source: includes/steps/class-step-feed-post-update.php:204
update_post()
public function update_post( $post, $feed )
Updates the supplied post based on the given feed configuration.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$post | array | The post to be updated. | |
$feed | array | The feed being processed. |
Since: 2.7.9
Source: includes/steps/class-step-feed-post-update.php:233