Template_Modifications::get_api_authorize_fields( TECEvent_AutomatorZapierApi $api, TECEvent_AutomatorZapierUrl $url )
Adds an API authorize fields to events->settings->api.
Contents
Parameters
- $api
-
(TECEvent_AutomatorZapierApi) (Required) An instance of an API handler.
- $url
-
(TECEvent_AutomatorZapierUrl) (Required) The URLs handler for the integration.
Return
(string) HTML for the authorize fields.
Source
File: src/Event_Automator/Zapier/Template_Modifications.php
public function get_api_authorize_fields( Api $api, Url $url ) { /** @var \Tribe__Cache $cache */ $cache = tribe( 'cache' ); $message = $cache->get_transient( static::$option_prefix . '_api_message' ); if ( $message ) { $cache->delete_transient( static::$option_prefix . '_api_message' ); } $args = [ 'api' => $api, 'url' => $url, 'message' => $message, 'users' => $api->get_users_dropdown(), ]; return $this->admin_template->template( static::$api_id . '/api/authorize-fields', $args, false ); }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |