FACEBOOK_PAGE_PUBLISH_LINK::setup_action()
Setup Action.
Return Return
(Uncanny_Automatorvoid.)
Source Source
File: src/integrations/facebook/actions/facebook-page-publish-link.php
protected function setup_action() { $this->set_integration( 'FACEBOOK' ); $this->set_action_code( 'FACEBOOK_PAGE_PUBLISH_LINK' ); $this->set_action_meta( 'FACEBOOK_PAGE_PUBLISH_LINK_PAGE' ); $this->set_is_pro( false ); $this->set_requires_user( false ); /* translators: Action - WordPress */ $this->set_sentence( sprintf( esc_attr__( 'Share a link with a message to {{a Facebook page:%1$s}}', 'uncanny-automator' ), $this->get_action_meta() ) ); /* translators: Action - WordPress */ $this->set_readable_sentence( esc_attr__( 'Share a link with a message to {{a Facebook page}}', 'uncanny-automator' ) ); $options_group = array( $this->get_action_meta() => array( // The facebook page dropdown. 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, ), // The link field. array( 'option_code' => 'FACEBOOK_PAGE_PUBLISH_LINK_URL', /* translators: Email field */ 'label' => esc_attr__( 'External link URL', 'uncanny-automator' ), 'placeholder' => esc_attr__( 'https://', 'uncanny-automator' ), 'description' => esc_attr__( "Enter the URL of the site you want to share to Facebook. Start with 'https://' to share an external link.", 'uncanny-automator' ), 'input_type' => 'url', 'supports_custom_value' => false, 'required' => true, ), // The message field. array( 'option_code' => 'FACEBOOK_PAGE_PUBLISH_LINK_MESSAGE', /* translators: Email field */ 'label' => esc_attr__( 'Message', 'uncanny-automator' ), 'input_type' => 'textarea', 'required' => true, ), ), ); $this->set_options_group( $options_group ); $this->register_action(); }
Expand full source code Collapse full source code View on Github