/** * This function is called when the plugin gets activated. Sets default * Options to the database */ public static function on_activate() { $o = get_option('arv_fb24_opt', array()); $def = arvlbSHARED::getDefaults(); if (empty($o)) { update_option('arv_fb24_opt', $def); } return; }
function __construct() { parent::__construct('arv_fb24_opt', arvlbSHARED::getDefaults()); }
/** * Constructor, initializes options */ function __construct() { $this->options = get_option('arv_fb24_opt', arvlbSHARED::getDefaults()); add_action('wp_enqueue_scripts', array($this, 'addScript')); }