Ejemplo n.º 1
0
 public static function deactivate_key()
 {
     if (PP_MULTISITE && !is_super_admin() && (pp_is_network_activated(PPC_BASENAME) || pp_is_mu_plugin(PPC_FILE))) {
         return;
     }
     require_once dirname(__FILE__) . '/plugin_pp.php';
     $support_key = pp_get_option('support_key');
     $request_vars = array('key' => $support_key[1], 'site' => site_url(''));
     $response = PP_Plugin_Status::callhome('deactivate-key', $request_vars);
     $result = json_decode($response);
     if ($result[0] == "0") {
         pp_delete_option('support_key');
     }
     echo $response;
     exit;
 }
Ejemplo n.º 2
0
 /**
  * Displays a return to plugins page button after installation
  *
  * @author Jonathan Davis
  *
  * @return void
  **/
 function after()
 {
     if (PP_MULTISITE && pp_is_network_activated(PPC_BASENAME)) {
         return;
     }
     if (!empty($_REQUEST['pp_install'])) {
         $url = 'admin.php?page=pp-settings&pp_tab=install';
         $title = __('Reload Press Permit Install Screen', 'pp');
     } else {
         $url = is_network_admin() ? 'network/plugins.php' : 'plugins.php';
         $title = __('Return to Plugins page');
     }
     $this->feedback('<a href="' . admin_url($url) . '" title="' . esc_attr($title) . '" target="_parent" class="button-secondary">' . $title . '</a>');
 }
function pp_use_network_updates()
{
    return PP_MULTISITE && (is_network_admin() || pp_is_network_activated(PPC_BASENAME) || pp_is_mu_plugin(PPC_FILE));
}