} function update($new_instance, $old_instance) { } function form($instance) { } } function uptolike_register_widgets() { register_widget('UptolikeWidget'); } register_activation_hook(__FILE__, 'usb_admin_actions'); add_action('widgets_init', 'uptolike_register_widgets'); add_action('wp_footer', 'headeruptolike', 1); add_action('admin_notices', 'my_choice_notice'); add_action('admin_notices', 'my_widgetcode_notice'); add_action('admin_menu', 'usb_admin_actions'); if (is_admin()) { $options = get_option('my_option_name'); if (array_key_exists('regme', $_REQUEST)) { try_reg(); } if (array_key_exists('choice', $_REQUEST)) { choice_helper($_REQUEST['choice']); } $my_settings_page = new MySettingsPage(); if (is_bool($options) or !array_key_exists('widget_code', $options) or $options['widget_code'] == '') { set_default_code(); } }
function show_reg($info, $page, $menu, $name, $u) { // Slow this right down usleep(1000000); $reg = getparam('Register', false); if ($reg !== NULL) { try_reg($info, $page, $menu, $name, $u); } else { try_reset($info, $page, $menu, $name, $u); } }