Server IP : 104.21.14.48 / Your IP : 3.21.98.78 [ Web Server : Apache System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64 User : root ( 0) PHP Version : 8.0.30.2 Disable Function : NONE Domains : 0 Domains MySQL : ON | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/wp-content/plugins/gravityforms/includes/embed-form/config/ |
Upload File : |
<?php namespace Gravity_Forms\Gravity_Forms\Embed_Form\Config; use Gravity_Forms\Gravity_Forms\Config\GF_Config; use Gravity_Forms\Gravity_Forms\Embed_Form\Endpoints\GF_Embed_Endpoint_Create_With_Block; use Gravity_Forms\Gravity_Forms\Embed_Form\Endpoints\GF_Embed_Endpoint_Get_Posts; /** * Config items for the Embed Forms REST Endpoints. * * @since 2.6 */ class GF_Embed_Endpoints_Config extends GF_Config { protected $script_to_localize = 'gform_gravityforms_admin_vendors'; protected $name = 'gform_admin_config'; protected $overwrite = false; /** * Determine if the config should enqueue its data. * * @since 2.6.2 * * @return bool */ public function should_enqueue() { return \GFCommon::is_form_editor(); } /** * Config data. * * @return array[] */ public function data() { return array( 'components' => array( 'embed_form' => array( 'endpoints' => $this->get_endpoints(), ), ), ); } /** * Get the various endpoints for the Embed UI. * * @since 2.6 * * @return array */ private function get_endpoints() { return array( // Endpoint to get posts for typeahead 'get_posts' => array( 'action' => array( 'value' => 'gf_embed_query_posts', 'default' => 'mock_endpoint', ), 'nonce' => array( 'value' => wp_create_nonce( GF_Embed_Endpoint_Get_Posts::ACTION_NAME ), 'default' => 'nonce', ) ), // Endpoint to create a new page with our block inserted. 'create_post_with_block' => array( 'action' => array( 'value' => GF_Embed_Endpoint_Create_With_Block::ACTION_NAME, 'default' => 'mock_endpoint', ), 'nonce' => array( 'value' => wp_create_nonce( GF_Embed_Endpoint_Create_With_Block::ACTION_NAME ), 'default' => 'nonce', ) ) ); } }