messages = array(); $this->fields = array( 'previous' => __("Previous [Left arrow]", 'keyboard-navigation'), 'next' => __("Next [Right arrow]", 'keyboard-navigation'), 'first' => __("First [Shift-Left arrow]", 'keyboard-navigation'), 'last' => __("Last [Shift-Right arrow]", 'keyboard-navigation'), ); if (isset($_POST['kbnav'])) { if (is_array($_POST['kbnav'])) { if (isset($_POST['kbnav']['_nonce'])) { if (wp_verify_nonce($_POST['kbnav']['_nonce'], 'keyboard-navigation')) { if (isset($_POST['kbnav']['module'])) { $method = "handle_update_" . $_POST['kbnav']['module']; if (method_exists($this, $method)) { $this->{$method}($_POST['kbnav']); } } } } } } } function handle_update_options($info) { $options = array(); foreach (array('selectors', 'highlight') as $field) { if (isset($info[$field])) { $options[$field] = $info[$field]; } } update_option('keyboard-navigation-options', $options); $this->messages[] = __('Options updated.', 'keyboard-navigation'); } function KeyboardNavigation() {} function footer() { $plugin_url_root = pathfinding_get_admin_url() . '/' . pathfinding_get_plugin_path(); ?> '; } } function link_editor() { $plugin_dir_url = plugin_dir_url(__FILE__); $nonce = wp_create_nonce('keyboard-navigation'); $options = get_option('keyboard-navigation-options'); if (!is_array($options)) { $options = array(); } $plugin_data = get_plugin_data(__FILE__); include(dirname(__FILE__) . '/admin.inc'); } } $keyboard_navigation = new KeyboardNavigation(); add_action('init', array(&$keyboard_navigation, 'init')); ?>