[wp-trac] [WordPress Trac] #45779: probable issue in Plugin activation hook

WordPress Trac noreply at wordpress.org
Thu Dec 27 13:56:42 UTC 2018


#45779: probable issue in Plugin activation hook
--------------------------+------------------------------
 Reporter:  tazotodua     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by tazotodua):

 and this is the temporary solution how i handle that problem at this
 moment:


 {{{

         public function activate($network_wide){
                 $die= $network_wide || is_network_admin();
                 $show_die=false;
                 if(  get_option("opt1", false) ) {
                         delete_option("opt1");
                         $show_die=true;
                 }
                 if($die) {
                         update_option("opt1",true);
                         $show_die=true;
                 }
                 if($show_die) {
                         $text= '<h2>Hi, dont activate from
 NETWORK!!!!!!</h2>';
                         die($text
 .'<script>alert("'.strip_tags($text).'");</script>');
                 }
         }
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45779#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list