Skip to main content

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

PropertyTypeDescription
$_step_typestringThe step type.
$_class_namestringThe name of the class used by the add-on.

Methods

MethodDescription
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

NameTypeDefaultDescription
$feedarrayThe 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

NameTypeDefaultDescription
$postarrayThe post array being updated.
$feedarrayThe feed being processed.
$entryarrayThe 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

NameTypeDefaultDescription
$notestringThe message to be added to the timeline.
$entry_idintThe entry of the current step.
$user_idbool | intThe ID of user performing the current step action.
$user_namestringThe username of user performing the current step action.
$stepbool | Gravity_Flow_StepIf 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

NameTypeDefaultDescription
$feed_idintThe 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

NameTypeDefaultDescription
$postarrayThe post to be updated.
$feedarrayThe feed being processed.

Since: 2.7.9

Source: includes/steps/class-step-feed-post-update.php:233