Example #1
0
/**
 * Show the Integrations page content
 * @return null
 */
function gnt_integrations_page_content()
{
    $integrations = gnt_get_integrations();
    $integration_settings = gnt_get_integration_settings();
    // Save the settings
    if (isset($_POST['submit']) && check_admin_referer('gnt_save_integrations')) {
        gnt_save_integration_settings($_POST);
        gnt_force_redirect($_POST['_wp_http_referer']);
    }
    include_once GET_NOTIFIED_PLUGIN_DIR . 'views/integrations.php';
}
 /**
  * Test to make sure the integrations we get are an array
  * @return null
  */
 function test_register_integration()
 {
     gnt_register_integration('test', array('name' => 'Test Integration'));
     $integrations = gnt_get_integrations();
     $this->assertTrue(array_key_exists('test', $integrations));
 }