options = &EL_Options::get_instance(); $this->functions = &EL_Admin_Functions::get_instance(); } public function show_settings () { if(!current_user_can('manage_options')) { wp_die(__('You do not have sufficient permissions to access this page.')); } $out = ''; if(!isset($_GET['tab'])) { $_GET['tab'] = 'general'; } // check for changed settings if(isset($_GET['settings-updated'])) { // show "settings saved" message $out .= '

'.__('Settings saved.','event-list').'

'; // check feed rewrite status and update it if required if('feed' == $_GET['tab']) { require_once(EL_PATH.'includes/feed.php'); EL_Feed::get_instance()->update_feed_rewrite_status(); } } // normal output $out.= '

'.__('Event List Settings','event-list').'

'; $out .= $this->show_tabs($_GET['tab']); $out .= '
'; $out .= $this->functions->show_option_form($_GET['tab']); $out .= '
'; echo $out; } /* public function embed_settings_scripts() { wp_enqueue_script('eventlist_admin_settings_js', EL_URL.'admin/js/admin_settings.js'); } */ private function show_tabs($current = 'category') { $tabs = array('general' => __('General','event-list'), 'frontend' => __('Frontend Settings','event-list'), 'admin' => __('Admin Page Settings','event-list'), 'feed' => __('Feed Settings','event-list')); $out = ''; return $out; } public function embed_settings_scripts() { wp_enqueue_style('eventlist_admin_settings', EL_URL.'admin/css/admin_settings.css'); } } ?>