Ejemplo n.º 1
0
 function __construct($slug = '')
 {
     $adz_stripe_settings = \adz_stripe_donations\Settings::get_instance('adz_stripe_settings');
     $this->stripe_public_key = $adz_stripe_settings->get('adz_stripe_public_key');
     $this->stripe_private_key = $adz_stripe_settings->get('adz_stripe_private_key');
     parent::__construct($slug);
 }
/**
 * Callback for the admin menu items
 */
function adz_stripe_admin_menu()
{
    $adz_stripe_settings = \adz_stripe_donations\Settings::get_instance('adz_stripe_settings');
    $reports = \adz_stripe_donations\Reports::get_instance('adz_stripe_donor_reports');
    add_menu_page("Manage Stripe Options", "Manage Stripe Options", 'manage_options', 'adz_stripe_options', 'adz_stripe_admin_landing_page');
    add_submenu_page('adz_stripe_options', 'Stripe Settings', 'Stripe Settings', 'manage_options', $adz_stripe_settings->get_slug(), array($adz_stripe_settings, 'options_form'));
    add_submenu_page('adz_stripe_options', 'Donation reports', 'Donation Reports', 'manage_options', $reports->get_slug(), array($reports, 'list_donors'));
}