FACEBOOK_PAGE_PUBLISH_PHOTO::setup_action()
Setup the action.
Return Return
(Uncanny_Automatorvoid.)
Source Source
File: src/integrations/facebook/actions/facebook-page-publish-photo.php
protected function setup_action() { $this->set_integration( 'FACEBOOK' ); $this->set_action_code( 'FACEBOOK_PAGE_PUBLISH_PHOTO' ); $this->set_action_meta( 'FACEBOOK_PAGE_PUBLISH_PHOTO_META' ); $this->set_is_pro( false ); $this->set_requires_user( false ); /* translators: Action - WordPress */ $this->set_sentence( sprintf( esc_attr__( 'Share a photo to {{a Facebook page:%1$s}}', 'uncanny-automator' ), $this->get_action_meta() ) ); /* translators: Action - WordPress */ $this->set_readable_sentence( esc_attr__( 'Share a photo to {{a Facebook page}}', 'uncanny-automator' ) ); $options_group = array( $this->get_action_meta() => array( // The facebook pages 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, ), // The photo url field. array( 'option_code' => 'FACEBOOK_PAGE_PUBLISH_PHOTO_IMAGE_URL', /* translators: Email field */ 'label' => esc_attr__( 'Image URL', 'uncanny-automator' ), 'placeholder' => esc_attr__( 'https://examplewebsite.com/path/to/image.jpg', 'uncanny-automator' ), 'input_type' => 'url', 'required' => true, 'description' => esc_attr__( 'Enter the URL of the image you wish to share. The URL must be publicly accessible.', 'uncanny-automator' ), ), ), ); $this->set_options_group( $options_group ); $this->register_action(); }
Expand full source code Collapse full source code View on Github