Renders the API Keys table
Since: 1.1
Inheritance: extends WP_List_Table
Exemplo n.º 1
0
/**
 * Display the API Keys
 *
 * @since       2.0
 * @return      void
 */
function give_api_callback()
{
    if (!current_user_can('manage_give_settings')) {
        return;
    }
    do_action('give_tools_api_keys_before');
    require_once GIVE_PLUGIN_DIR . 'includes/admin/class-api-keys-table.php';
    $api_keys_table = new Give_API_Keys_Table();
    $api_keys_table->prepare_items();
    $api_keys_table->display();
    ?>
	<p>
		<?php 
    printf(__('API keys allow users to use the <a href="%s">Give REST API</a> to retrieve donation data in JSON or XML for external applications or devices, such as <a href="%s">Zapier</a>.', 'give'), 'https://givewp.com/documentation/give-api-reference/', 'https://givewp.com/addons/zapier/');
    ?>
	</p>

	<style>
		.give_forms_page_give-settings .give-submit-wrap {
			display: none; /* Hide Save settings button on System Info Tab (not needed) */
		}
	</style>
	<?php 
    do_action('give_tools_api_keys_after');
}
Exemplo n.º 2
0
/**
 * Display the API Keys
 *
 * @since       1.0
 * @return      void
 */
function give_api_callback()
{
    if (!current_user_can('manage_give_settings')) {
        return;
    }
    /**
     * Fires before displaying API keys.
     *
     * @since 1.0
     */
    do_action('give_tools_api_keys_before');
    require_once GIVE_PLUGIN_DIR . 'includes/admin/class-api-keys-table.php';
    $api_keys_table = new Give_API_Keys_Table();
    $api_keys_table->prepare_items();
    $api_keys_table->display();
    ?>
	<span class="cmb2-metabox-description api-description">
		<?php 
    echo sprintf(__('You can create API keys for individual users within their profile edit screen. API keys allow users to use the <a href="%1$s" target="_blank">Give REST API</a> to retrieve donation data in JSON or XML for external applications or devices, such as <a href="%2$s" target="_blank">Zapier</a>.', 'give'), esc_url('https://givewp.com/documentation/give-api-reference/'), esc_url('https://givewp.com/addons/zapier/'));
    ?>
	</span>
	<?php 
    /**
     * Fires after displaying API keys.
     *
     * @since 1.0
     */
    do_action('give_tools_api_keys_after');
}