Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter philbert_mcpleb

    (@philbert_mcpleb)

    Just been able to try the changes you suggested. they seem to be working well. Many thanks

    Thread Starter philbert_mcpleb

    (@philbert_mcpleb)

    thanks for that, i can’t test it for a few days as i have no home internet until my ISP fixes it. i will let you know how i get on.

    Thread Starter philbert_mcpleb

    (@philbert_mcpleb)

    here are the functions that activate and deactivate the plugin.

    register_activation_hook(__File__, array('WP_download_manager', 'activate'));
    register_deactivation_hook(__File__, array('WP_download_manager', 'deactivate'));
    //add actions for the types of pages to display
    add_action('admin_menu', 'WP_download_manager_admin');
    
    	function activate()
    		{
    		//stuff plugin should do on activation goes here
    		$data = array('title' => "WPDM_option");
    		if ( ! get_option('WPDM_option'))
    		{ add_option('WPDM_option' , $data); }
    		else
    		{ update_option('WPDM_option' , $data); }
    		}
    
    	function deactivate()
    		{
    		//deactivation commands go here
    		delete_option('WPDM_option');
    		}
Viewing 3 replies - 1 through 3 (of 3 total)