Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Ok so i've been messing with this for awhile...and it simply wont work...here is the plugin:

Dir: .../wp-content/plugins/oop/

File: oop.php

<?php
/*
Plugin Name: OOP
Plugin URI: http://www.domain.com/
Description: oop tests
Version: 1.0.0
Author: Jason
Author URI: http://www.domain.com/
*/
function oop_test(){
  add_option('oop_test','testing');
}
function oop_disp(){
  $test = get_option('oop_test');
  if($test !== false){
    echo $test;
  }else{
    echo 'Activation hook failed';
  }
}
register_activation_hook( __FILE__, 'oop_test' );
add_action('admin_head','oop_disp');
?>

Simple right?...well I can't get it to work...indecently, I have other plugins that use the same register_activation_hook( __FILE__, 'some_func' ); and it works fine??? Thanks in advance for any thoughts on this!

share|improve this question
2  
its working just fine, if its not working for you then may be some other plugin removing the option? – Hameedullah Khan Jan 2 '12 at 19:52
@Hameedullah hmmm...well i tried it with only that plugin, and still no go...but also I tried reinstalling an existing plugin that had worked before, and now it's activation hook is not being called either...Jason – user11619 Jan 2 '12 at 20:28

closed as too localized by toscho Jul 17 '12 at 23:30

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.