Forums

register_activation_hook does NOTHING! (1 post)

  1. Jenst
    Member
    Posted 3 years ago #

    How hard can it be? If I activate my plugin called testing.php OR deactivate my plugin it should print "DO SOMETHING!!!". It does nothing. Why not? What did I miss?

    <?php
    /*
    Plugin Name: My test
    Plugin URI: http://www.jenst.se
    Description: My little test
    Version: 1
    Author: Jens T&ouml;rnell
    Author URI: http://www.jenst.se
    */
    
    register_activation_hook(__FILE__, 'testing_activate' );
    register_deactivation_hook(__FILE__, 'testing_activate');
    
    function testing_activate()
    {
    	echo 'DO SOMETHING!!!';
    }
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic