Page_API::add_page( string $nonce )
Add a Facebook Page fields using ajax.
Contents
Parameters
- $nonce
-
(string) (Required) The add action nonce to check.
Return
(string) An html message for success or failure when adding.
Source
File: src/Tribe/Meetings/Facebook/Page_API.php
public function add_page( $nonce ) {
if ( ! $this->check_ajax_nonce( Settings::$add_action, $nonce ) ) {
return false;
}
$message = _x(
'Facebook Page fields added.',
'Facebook Page new fields are added message.',
'events-virtual'
);
tribe( Template_Modifications::class )->get_settings_message_template( $message );
// Add empty fields template
tribe( Template_Modifications::class )->get_page_fields(
$this->get_unique_id(),
[
'name' => '',
'page_id' => '',
'access_token' => '',
'expiration' => '',
]
);
wp_die();
}
Changelog
| Version | Description |
|---|---|
| 1.7.0 | Introduced. |