SHARE
TWEET

pluign-puvox-removed-53

selnomeria Nov 27th, 2019 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function activate_old($network_wide){
  2.         $actKey = $this->slug.'_activat';
  3.         $show_die=isset($_GET['action']) && $_GET['action']=='error_scrape';
  4.    
  5.         //if activation allowed from only on multisite or singlesite or Both?
  6.         if(!$show_die)
  7.         {
  8.             if (get_site_option($actKey))
  9.             {
  10.                 $show_die=true;
  11.                 delete_site_option($actKey);
  12.             }
  13.             else
  14.             {
  15.                 $show_die= ! $this->if_correct_activable($network_wide) ;
  16.                 if($show_die)
  17.                 {
  18.                     //update_site_option($actKey,true);
  19.                 }
  20.             }
  21.         }
  22.        
  23.         if($show_die) {
  24.             $text= '<h2>('.$this->opts['name'].') '. $this->static_settings['menu_text']['activated_only_from']. ' <b style="color:red;">'.strtoupper($this->opts['allowed_on']).'</b> </h2>';
  25.             //$text .=  '<script>alert("'.strip_tags($text).'");</script>';
  26.             die($text);
  27.         }
  28.         //$this->plugin_updated_hook();
  29.         if(method_exists($this, 'activation_funcs') ) {   $this->activation_funcs();  }
  30.     }
  31.     public function if_correct_activable($network_wide=false)
  32.     {
  33.         return !is_multisite() ? true : ( $this->initial_static_options['allowed_on'] == 'both' ?  true :  (   ($this->initial_static_options['allowed_on'] =='network' && is_network_admin() ) || ( $this->initial_static_options['allowed_on'] =='singlesite' && (!$network_wide && !is_network_admin()) ) ) );
  34.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top