FACEBOOK_PAGE_PUBLISH_POST::setup_action()
Setup SENDEMAIL Automator Action.
Return Return
(Uncanny_Automatorvoid.)
Source Source
File: src/integrations/facebook/actions/facebook-page-publish-post.php
protected function setup_action() { $this->set_integration( 'FACEBOOK' ); $this->set_action_code( 'FACEBOOK_PAGE_PUBLISH_POST' ); $this->set_action_meta( 'FACEBOOK_PAGE_PUBLISH_POST_META' ); $this->set_is_pro( false ); $this->set_requires_user( false ); /* translators: Action - WordPress */ $this->set_sentence( sprintf( esc_attr__( 'Publish a post to {{a Facebook page:%1$s}}', 'uncanny-automator' ), $this->get_action_meta() ) ); /* translators: Action - WordPress */ $this->set_readable_sentence( esc_attr__( 'Publish a post to {{a Facebook page}}', 'uncanny-automator' ) ); $options = array( $this->get_action_meta() => array( // Email From Field. array( 'option_code' => $this->get_action_meta(), /* translators: Email field */ 'label' => esc_attr__( 'Select a Facebook Page', 'uncanny-automator' ), 'input_type' => 'select', 'is_ajax' => true, 'endpoint' => $this->fb_pages_wp_ajax_endpoint, 'supports_custom_value' => false, 'required' => true, ), array( 'option_code' => 'FACEBOOK_PAGE_MESSAGE', 'input_type' => 'textarea', 'label' => esc_attr__( 'Message', 'uncanny-automator' ), 'description' => esc_attr__( 'Enter the message that you want to post on Facebook. Please take note that this action might fail when posting the same messages within short intervals.', 'uncanny-automator' ), 'required' => true, ), ), ); $this->set_options_group( $options ); $this->register_action(); }
Expand full source code Collapse full source code View on Github