Exemplo n.º 1
1
/**
 * Create Options page
 *
 * @uses add_theme_page()
 * @uses add_action()
 *
 * @since 1.0.0
 */
function optionsframework_add_admin()
{
    $of_page = add_object_page('North', 'North', 'manage_options', 'optionsframework', 'optionsframework_options_page');
    // Add framework functionaily to the head individually
    add_action("admin_enqueue_scripts", 'of_load_only');
    add_action("admin_enqueue_scripts", 'of_style_only');
}
 function add_menu()
 {
     add_object_page(__('Contact Forms Settings', 'tfuse'), __("Contact Forms", 'tfuse'), 'publish_pages', 'tf_contact_forms_list', array($this, 'list_forms'));
     add_submenu_page('tf_contact_forms_list', __('All Contact Forms', 'tfuse'), __('All Contact Forms', 'tfuse'), 'publish_pages', 'tf_contact_forms_list', array($this, 'list_forms'));
     add_submenu_page('tf_contact_forms_list', __('Add New', 'tfuse'), __('Add New', 'tfuse'), 'publish_pages', 'tf_contact_form', array($this, 'show_add_form'));
     add_submenu_page('tf_contact_forms_list', __('General Settings', 'tfuse'), __('General Settings', 'tfuse'), 'publish_pages', 'tf_contact_forms_gensett', array($this, 'list_gen_options'));
 }
 public function add_cms_menu()
 {
     add_submenu_page($this->root, 'モジュール', 'モジュール', 'administrator', __FILE__, array($this, 'manage_module_page'));
     add_object_page('WP SiteManager', 'WP SiteManager', 'administrator', __FILE__, array($this, 'manage_module_page'));
     //		add_submenu_page( $this->root, '一般設定', '一般設定', 'administrator', basename( __FILE__ ) . '-general', array( $this, 'general_page' ) );
     add_submenu_page($this->root, 'SEO & SMO', 'SEO & SMO', 'administrator', basename(__FILE__) . '-access', array($this, 'access_page'));
 }
/**
 * Add the Framework to the menu
 */
function zilla_menu()
{
    $zilla_options = get_option('zilla_framework_options');
    $icon = ZILLA_URL . '/images/favicon.png';
    // Theme Options page
    add_object_page($zilla_options['theme_name'], $zilla_options['theme_name'], 'update_core', 'zillaframework', 'zilla_options_page', $icon);
    add_submenu_page('zillaframework', __('Theme Options', 'zilla'), __('Theme Options', 'zilla'), 'update_core', 'zillaframework', 'zilla_options_page');
    // Update Theme page
    $menu_title = __('Theme Updates', 'zilla');
    if ($xml = zilla_get_theme_changelog()) {
        $theme_version = '';
        if (function_exists('wp_get_theme')) {
            if (is_child_theme()) {
                $temp_obj = wp_get_theme();
                $theme_obj = wp_get_theme($temp_obj->get('Template'));
            } else {
                $theme_obj = wp_get_theme();
            }
            $theme_version = $theme_obj->get('Version');
        } else {
            $template_path = get_template_directory();
            $theme_data = get_theme_data($template_path . '/style.css');
            $theme_version = $theme_data['Version'];
        }
        if (version_compare($theme_version, $xml->latest) == -1) {
            $menu_title = __('Theme Updates <span class="update-plugins count-1"><span class="update-count">1</span></span>', 'zilla');
        }
    }
    add_submenu_page('zillaframework', __('Theme Updates', 'zilla'), $menu_title, 'update_core', 'zillaframework-update', 'zilla_update_page');
    // Theme Collection page
    add_submenu_page('zillaframework', __('More Themes', 'zilla'), __('More Themes', 'zilla'), 'update_core', 'zillaframework-themes', 'zilla_themes_page');
    // Support link/page
    add_submenu_page('zillaframework', __('Support Forums', 'zilla'), __('Support Forums', 'zilla'), 'update_core', 'zillaframework-support', 'zilla_support_page');
}
Exemplo n.º 5
0
 /**
  * Initialise menu items, notices, etc.
  */
 function init()
 {
     global $wp_version;
     if (version_compare($wp_version, "2.7-alpha", '>')) {
         add_object_page(__('Ads', 'advman'), __('Ads', 'advman'), 8, 'advman-manage', array('Advman_Admin', 'process'));
         add_submenu_page('advman-manage', __('Edit Ads', 'advman'), __('Edit', 'advman'), 8, 'advman-manage', array('Advman_Admin', 'process'));
         add_submenu_page('advman-manage', __('Create New Ad', 'advman'), __('Create New', 'advman'), 8, 'advman-create', array('Advman_Admin', 'create'));
         add_options_page(__('Ads', 'advman'), __('Ads', 'advman'), 8, 'advman-settings', array('Advman_Admin', 'settings'));
     } else {
         add_menu_page(__('Ads', 'advman'), __('Ads', 'advman'), 8, 'advman-manage', array('Advman_Admin', 'process'));
         add_submenu_page('advman-manage', __('Edit Ads', 'advman'), __('Edit', 'advman'), 8, 'advman-manage', array('Advman_Admin', 'process'));
         add_submenu_page('advman-manage', __('Create New Ad', 'advman'), __('Create New', 'advman'), 8, 'advman-create', array('Advman_Admin', 'create'));
         add_options_page(__('Ads', 'advman'), __('Ads', 'advman'), 8, 'advman-settings', array('Advman_Admin', 'settings'));
     }
     add_action('admin_print_scripts', array('Advman_Admin', 'add_scripts'));
     add_action('admin_notices', array('Advman_Admin', 'display_notices'), 1);
     add_action('admin_footer', array('Advman_Admin', 'display_editor'));
     $mode = OX_Tools::sanitize_post_var('advman-mode');
     if ($mode == 'notice') {
         $action = OX_Tools::sanitize_post_var('advman-action');
         $yes = OX_Tools::sanitize_post_var('advman-notice-confirm-yes');
         switch ($action) {
             case 'optimise':
                 Advman_Admin::set_auto_optimise(!empty($yes));
                 Advman_Admin::remove_notice('optimise');
                 break;
             case 'activate advertising-manager':
                 Advman_Admin::remove_notice('activate advertising-manager');
                 break;
         }
     }
 }
Exemplo n.º 6
0
function GOTMLS_menu()
{
    if (GOTMLS_user_can() && GOTMLS_get_nonce() && isset($_POST["GOTMLS_menu_group"]) && is_numeric($_POST["GOTMLS_menu_group"])) {
        $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["menu_group"] = $_POST["GOTMLS_menu_group"];
        update_option('GOTMLS_settings_array', $GLOBALS["GOTMLS"]["tmp"]["settings_array"]);
    }
    $GOTMLS_Full_plugin_logo_URL = GOTMLS_images_path . 'GOTMLS-16x16.gif';
    $base_page = "GOTMLS-settings";
    $base_function = "GOTMLS_settings";
    $pluginTitle = "Anti-Malware";
    $pageTitle = "{$pluginTitle} " . GOTMLS_Scan_Settings_LANGUAGE;
    if (!function_exists("add_object_page") || $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["menu_group"]) {
        $my_admin_page = add_menu_page($pageTitle, $pluginTitle, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, $base_function, $GOTMLS_Full_plugin_logo_URL);
    } else {
        $my_admin_page = add_object_page($pageTitle, $pluginTitle, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, $base_function, $GOTMLS_Full_plugin_logo_URL);
    }
    add_action('load-' . $my_admin_page, 'GOTMLS_admin_add_help_tab');
    add_submenu_page($base_page, "{$pluginTitle} " . GOTMLS_Scan_Settings_LANGUAGE, GOTMLS_Scan_Settings_LANGUAGE, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, $base_function);
    if (is_dir(dirname(__FILE__) . "/../../../wp-includes") && is_dir(dirname(__FILE__) . "/../../../wp-admin")) {
        add_submenu_page($base_page, "{$pluginTitle} " . GOTMLS_Run_Quick_Scan_LANGUAGE, GOTMLS_Run_Quick_Scan_LANGUAGE . " (WP Core)", $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], "{$base_page}&scan_type=Quick+Scan&" . GOTMLS_set_nonce(__FUNCTION__ . "76"), $base_function);
    }
    if (is_dir(dirname(__FILE__) . "/../../../wp-content/plugins")) {
        add_submenu_page($base_page, "{$pluginTitle} " . GOTMLS_Run_Quick_Scan_LANGUAGE, GOTMLS_Run_Quick_Scan_LANGUAGE . " (plugins)", $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], "{$base_page}&scan_type=Quick+Scan&scan_only[]=wp-content/plugins&" . GOTMLS_set_nonce(__FUNCTION__ . "78"), $base_function);
    }
    if (is_dir(dirname(__FILE__) . "/../../../wp-content/themes")) {
        add_submenu_page($base_page, "{$pluginTitle} " . GOTMLS_Run_Quick_Scan_LANGUAGE, GOTMLS_Run_Quick_Scan_LANGUAGE . " (themes)", $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], "{$base_page}&scan_type=Quick+Scan&scan_only[]=wp-content/themes&" . GOTMLS_set_nonce(__FUNCTION__ . "80"), $base_function);
    }
    add_submenu_page($base_page, "{$pluginTitle} " . GOTMLS_View_Quarantine_LANGUAGE, GOTMLS_View_Quarantine_LANGUAGE . (($Qs = GOTMLS_get_quarantine(true)) ? ' <span class="awaiting-mod count-' . $Qs . '"><span class="awaiting-mod">' . $Qs . '</span></span>' : ""), $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], "GOTMLS-View-Quarantine", "GOTMLS_View_Quarantine");
}
Exemplo n.º 7
0
function GOTMLS_menu()
{
    GOTMLS_user_can();
    if (isset($_POST["GOTMLS_menu_group"]) && is_numeric($_POST["GOTMLS_menu_group"])) {
        $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["menu_group"] = $_POST["GOTMLS_menu_group"];
        /*		$capabilities = array();
        		if (current_user_can($GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"]))
        			foreach (get_editable_roles() as $role)
        				$capabilities = array_merge($capabilities, $role["capabilities"]);
        		if (isset($_POST["GOTMLS_user_can"]) && in_array($_POST["GOTMLS_user_can"], $capabilities))
        			$GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"] = $_POST["GOTMLS_user_can"];*/
        update_option('GOTMLS_settings_array', $GLOBALS["GOTMLS"]["tmp"]["settings_array"]);
    }
    $GOTMLS_Full_plugin_logo_URL = GOTMLS_images_path . 'GOTMLS-16x16.gif';
    $base_page = "GOTMLS-settings";
    $base_function = "GOTMLS_settings";
    $pluginTitle = "Anti-Malware";
    $pageTitle = "{$pluginTitle} " . GOTMLS_Scan_Settings_LANGUAGE;
    if (!function_exists("add_object_page") || $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["menu_group"]) {
        $my_admin_page = add_menu_page($pageTitle, $pluginTitle, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, $base_function, $GOTMLS_Full_plugin_logo_URL);
    } else {
        $my_admin_page = add_object_page($pageTitle, $pluginTitle, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, $base_function, $GOTMLS_Full_plugin_logo_URL);
    }
    add_action('load-' . $my_admin_page, 'GOTMLS_admin_add_help_tab');
    add_submenu_page($base_page, "{$pluginTitle} " . GOTMLS_Scan_Settings_LANGUAGE, GOTMLS_Scan_Settings_LANGUAGE, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, $base_function);
    add_submenu_page($base_page, "{$pluginTitle} " . GOTMLS_Run_Quick_Scan_LANGUAGE, GOTMLS_Run_Quick_Scan_LANGUAGE, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], "{$base_page}&scan_type=Quick+Scan", $base_function);
    add_submenu_page($base_page, "{$pluginTitle} " . GOTMLS_View_Quarantine_LANGUAGE, GOTMLS_View_Quarantine_LANGUAGE, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], "GOTMLS-View-Quarantine", "GOTMLS_View_Quarantine");
}
Exemplo n.º 8
0
function uyan_add_pages()
{
    add_object_page('友言评论', '社交', 'manage_options', 'uyan', 'uyan_admin', plugin_dir_url(__FILE__) . 'img/uyan_icon.png');
    add_submenu_page('uyan', '安装设置', '设置', 'manage_options', 'uyan_setting', 'uyan_admin');
    add_submenu_page('uyan', '统计分析', '统计', 'manage_options', 'uyan_analysis', 'uyan_admin');
    add_submenu_page('uyan', '数据同步', '同步', 'manage_options', 'uyan_sync', 'uyan_admin');
}
function wpzoom_add_admin()
{
    global $query_string;
    global $options;
    global $shortname;
    if ($_GET['page'] == 'wpzoom_options') {
        if ('save' == $_REQUEST['action']) {
            foreach ($options as $value) {
                update_option($value['id'], $_REQUEST[$value['id']]);
            }
            $send = $_GET['page'];
            header("Location: admin.php?page={$send}&saved=true");
            die;
        } else {
            if ('reset' == $_REQUEST['action']) {
                global $wpdb;
                $query = "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'wpzoom_%'";
                $wpdb->query($query);
                $send = $_GET['page'];
                header("Location: admin.php?page={$send}&reset=true");
                die;
            }
        }
    }
    // $_GET['page'] == 'wpzoom_options'
    // Check all the Options, then if the no options are created for a relative sub-page... it's not created.
    if (function_exists(add_object_page)) {
        add_object_page('WPZOOM &raquo; Theme Options', 'WPZOOM', 12, 'wpzoom_home', 'wpzoom_page_gen', get_bloginfo('template_directory') . '/images/favicon.png');
    } else {
        add_menu_page('WPZOOM &raquo; Theme Options', 'WPZOOM', 12, 'functions.php', 'wpzoom_page_gen', get_bloginfo('template_directory') . '/images/favicon.png');
    }
    add_submenu_page('wpzoom_home', 'Theme Options', 'Theme Options', 8, 'wpzoom_options', 'mytheme_admin');
    add_submenu_page('wpzoom_home', 'WPZOOM News', 'WPZOOM News', 8, 'wpzoom_news', 'wpzoom_more_news_page');
    add_submenu_page('wpzoom_home', 'WPZOOM Themes', 'WPZOOM Themes', 8, 'wpzoom_themes', 'wpzoom_more_themes_page');
}
Exemplo n.º 10
0
 function populateMenu()
 {
     //--- add main menu --
     add_object_page(__('Products'), __('Products'), 1, 'product_list', array(&$this, 'pageProductList'), WEB_BASE_URL . "/images/icon4.gif");
     //-- add sub menu --
     add_submenu_page('product_list', __('Add Products'), __('Add Products'), 1, 'add_product', array(&$this, 'pageAddProduct'));
 }
Exemplo n.º 11
0
 /**
  * Sets up plugin pages and loads their scripts
  *
  * @since 3.0
  *
  */
 static function admin_menu()
 {
     global $wpi_settings, $submenu, $wp_version;
     /* Get capability required for this plugin's menu to be displayed to the user */
     $capability = self::get_capability_by_level($wpi_settings['user_level']);
     $wpi_settings['pages']['main'] = add_object_page(__('Invoice', WPI), 'Invoice', $capability, 'wpi_main', null, 'dashicons-money');
     $overview_page = new \UsabilityDynamics\UI\Page('wpi_main', __('View All', WPI), __('View All', WPI), $capability, 'wpi_main');
     $wpi_settings['pages']['main'] = $overview_page->screen_id;
     $wpi_settings['pages']['edit'] = add_submenu_page('wpi_main', __('Add New', WPI), __('Add New', WPI), $capability, 'wpi_page_manage_invoice', array('WPI_UI', 'page_loader'));
     $wpi_settings['pages']['reports'] = add_submenu_page('wpi_main', __('Reports', WPI), __('Reports', WPI), $capability, 'wpi_page_reports', array('WPI_UI', 'page_loader'));
     $wpi_settings['pages'] = apply_filters('wpi_pages', $wpi_settings['pages']);
     $wpi_settings['pages']['settings'] = add_submenu_page('wpi_main', __('Settings', WPI), __('Settings', WPI), $capability, 'wpi_page_settings', array('WPI_UI', 'page_loader'));
     /* Update screens information */
     WPI_Settings::setOption('pages', $wpi_settings['pages']);
     /* Register meta boxes */
     add_action('add_meta_boxes_' . $wpi_settings['pages']['main'], array(__CLASS__, 'metaboxes_overview'));
     // Add Actions
     add_action('load-' . $wpi_settings['pages']['main'], array(__CLASS__, 'pre_load_overview'));
     add_action('load-' . $wpi_settings['pages']['edit'], array(__CLASS__, 'pre_load_edit_page'));
     add_action('load-' . $wpi_settings['pages']['reports'], array(__CLASS__, 'pre_load_reports_page'));
     add_action('load-' . $wpi_settings['pages']['settings'], array(__CLASS__, 'pre_load_settings_page'));
     //* Load common actions on all WPI pages */
     foreach ($wpi_settings['pages'] as $page_slug) {
         add_action('load-' . $page_slug, array('WPI_UI', 'common_pre_header'));
     }
     // Add Filters
     add_filter('wpi_page_loader_path', array('WPI_UI', "wpi_display_user_selection"), 0, 3);
     add_filter('wpi_pre_header_invoice_page_wpi_page_manage_invoice', array('WPI_UI', "page_manage_invoice_preprocess"));
     add_filter('wpi_overview_filter_types', array(__CLASS__, 'add_wpi_overview_filter_types'));
     add_filter('wpi_overview_filter_statuses', array(__CLASS__, 'add_wpi_overview_filter_statuses'));
 }
Exemplo n.º 12
0
 public function admin_menu()
 {
     add_object_page('Theme Options', 'Theme Options', 'manage_options', 'theme-options', array($this, 'theme_options'), $this->admin_icon);
     add_submenu_page('theme-options', 'Theme Options', 'Homepage', 'manage_options', 'theme-options', array($this, 'theme_options'));
     add_submenu_page('theme-options', 'Theme Options', 'Contact Details', 'manage_options', 'theme-options/tab1', array($this, 'theme_options'));
     add_submenu_page('theme-options', 'Theme Options', 'Analytics', 'manage_options', 'theme-options/tab2', array($this, 'theme_options'));
     add_submenu_page('theme-options', 'Theme Options', 'Advanced', 'manage_options', 'theme-options/tab3', array($this, 'theme_options'));
 }
 /**
  * Add a menu page for Builder
  *
  * @since 1.0.0
  */
 public function add_page()
 {
     // Create admin page
     $admin_page = add_object_page($this->args['page_title'], $this->args['menu_title'], $this->args['cap'], $this->id, array($this, 'admin_page'), $this->args['icon'], $this->args['priority']);
     // Add scripts and styles
     add_action('admin_print_styles-' . $admin_page, array($this, 'load_styles'));
     add_action('admin_print_scripts-' . $admin_page, array($this, 'load_scripts'));
 }
Exemplo n.º 14
0
 function admin_menu()
 {
     // phong.nguyen add main menu (+logo)
     // $main_menu_id = 'edit.php?post_type=egany_fb2wp_post';  // egany_fb2wp_post
     // add_menu_page(__('EGANY Facebook2WP Settings', 'EGANY' ), __('Facebook to WP', 'EGANY' ), 'manage_options', $main_menu_id, null, plugins_url('/assets/images/logo.png', EGANY_PLUGIN_FILE_FB2WP) , 30);
     // add_submenu_page( $main_menu_id, __( 'EGANY Facebook2WP Settings', 'EGANY' ), __( 'Settings', 'EGANY' ), 'manage_options', 'egany_fb2wp-settings', array( $this, 'settings_page' ) );
     add_object_page(__('EGANY Facebook2WP Settings', 'EGANY'), __('Facebook to WP', 'EGANY'), 'manage_options', 'egany_fb2wp-settings', array($this, 'settings_page'), plugins_url('/assets/images/logo.png', EGANY_PLUGIN_FILE_FB2WP));
 }
Exemplo n.º 15
0
function wpcf7_admin_menu()
{
    add_object_page(__('Contact Form 7', 'contact-form-7'), __('Contact', 'contact-form-7'), 'wpcf7_read_contact_forms', 'wpcf7', 'wpcf7_admin_management_page', 'dashicons-email');
    $edit = add_submenu_page('wpcf7', __('Edit Contact Form', 'contact-form-7'), __('Contact Forms', 'contact-form-7'), 'wpcf7_read_contact_forms', 'wpcf7', 'wpcf7_admin_management_page');
    add_action('load-' . $edit, 'wpcf7_load_contact_form_admin');
    $addnew = add_submenu_page('wpcf7', __('Add New Contact Form', 'contact-form-7'), __('Add New', 'contact-form-7'), 'wpcf7_edit_contact_forms', 'wpcf7-new', 'wpcf7_admin_add_new_page');
    add_action('load-' . $addnew, 'wpcf7_load_contact_form_admin');
}
Exemplo n.º 16
0
function flamingo_admin_menu()
{
    add_object_page(__('Flamingo Address Book', 'flamingo'), __('Flamingo', 'flamingo'), 'flamingo_edit_contacts', 'flamingo', 'flamingo_contact_admin_page', 'dashicons-feedback');
    $contact_admin = add_submenu_page('flamingo', __('Flamingo Address Book', 'flamingo'), __('Address Book', 'flamingo'), 'flamingo_edit_contacts', 'flamingo', 'flamingo_contact_admin_page');
    add_action('load-' . $contact_admin, 'flamingo_load_contact_admin');
    $inbound_admin = add_submenu_page('flamingo', __('Flamingo Inbound Messages', 'flamingo'), __('Inbound Messages', 'flamingo'), 'flamingo_edit_inbound_messages', 'flamingo_inbound', 'flamingo_inbound_admin_page');
    add_action('load-' . $inbound_admin, 'flamingo_load_inbound_admin');
}
Exemplo n.º 17
0
 function admin_menu()
 {
     $page_title = __('Sliders', 'ssp');
     $menu_title = __('WP Slider', 'ssp');
     $capability = 'edit_posts';
     $menu_slug = 'edit.php?post_type=' . SLIDER_PLUGIN_SLIDER_POST_TYPE;
     add_object_page($page_title, $menu_title, $capability, $menu_slug);
 }
Exemplo n.º 18
0
 /**
  * Initialise menu items, notices, etc.
  */
 static function init()
 {
     global $wp_version;
     add_object_page(__('Ads', 'advman'), __('Ads', 'advman'), 8, 'advman-list', array('Advman_List', 'process'), ADVMAN_URL . '/images/advman-menu-icon.svg');
     $list_hook = add_submenu_page('advman-list', __('All Ads', 'advman'), __('All Ads', 'advman'), 8, 'advman-list', array('Advman_List', 'process'));
     $analytics_hook = add_submenu_page('advman-list', __('Analytics', 'advman'), __('Analytics', 'advman'), 8, 'advman-analytics', array('Advman_Analytics', 'process'));
     add_submenu_page('advman-list', __('Create New Ad', 'advman'), __('Create New', 'advman'), 8, 'advman-ad-new', array('Advman_Admin', 'create'));
     add_submenu_page(null, __('Edit Ad', 'advman'), __('Edit', 'advman'), 8, 'advman-ad', array('Advman_Admin', 'edit_ad'));
     add_submenu_page(null, __('Preview Ad', 'advman'), __('Preview', 'advman'), 8, 'advman-ad-preview', array('Advman_Admin', 'preview_ad'));
     add_submenu_page(null, __('Edit Network', 'advman'), __('Edit', 'advman'), 8, 'advman-network', array('Advman_Admin', 'edit_network'));
     add_options_page(__('Ads', 'advman'), __('Ads', 'advman'), 8, 'advman-settings', array('Advman_Admin', 'settings'));
     // List items
     if ($list_hook) {
         add_action("load-{$list_hook}", array('Advman_List', 'add_options'));
         add_action("admin_head-{$list_hook}", array('Advman_List', 'add_contextual_help'));
         add_action("admin_head-{$list_hook}", array('Advman_List', 'add_css'));
     }
     // Analytics items
     if ($analytics_hook) {
         add_action("load-{$analytics_hook}", array('Advman_Analytics', 'add_options'));
         add_action("admin_head-{$analytics_hook}", array('Advman_Analytics', 'add_contextual_help'));
         add_action("admin_head-{$analytics_hook}", array('Advman_Analytics', 'add_css'));
     }
     add_action('admin_enqueue_scripts', array('Advman_Admin', 'admin_enqueue_scripts'));
     // Display any notices that exist
     add_action('admin_notices', array('Advman_Admin', 'display_notices'), 1);
     // Add editor plugin to automatically insert an ad into a blog post
     add_action('admin_enqueue_scripts', array('Advman_Admin', 'add_editor_css'));
     add_action('before_wp_tiny_mce', array('Advman_Admin', 'tinymce_menu_script'));
     add_filter('mce_buttons', array('Advman_Admin', 'editor_button'));
     add_filter('mce_external_plugins', array('Advman_Admin', 'register_tinymce_javascript'));
     // Add 'settings' to the plugin activate page
     add_filter('plugin_action_links_advertising-manager/advertising-manager.php', array('Advman_Admin', 'plugin_action_links'));
     // Change footer text on Advertising Manager pages
     add_filter("admin_footer_text", array('Advman_Admin', 'admin_footer_text'));
     // Process any actions
     $action = OX_Tools::sanitize_post_var('advman-action');
     $page = OX_Tools::sanitize_request_var('page');
     // Check to see if the activate action is being fired
     Advman_Admin::notice_action($action);
     switch ($page) {
         case 'advman-ad-new':
             Advman_Admin::import_action($action);
             break;
         case 'advman-ad':
             Advman_Admin::ad_action($action);
             break;
         case 'advman-analytics':
             Advman_Analytics::init();
             break;
         case 'advman-list':
             Advman_List::init();
             break;
         case 'advman-network':
             Advman_Admin::network_action($action);
             break;
     }
 }
Exemplo n.º 19
0
/**
 * wikiembed_options_add_page function.
 * 
 * @access public
 * @return void
 */
function wikiembed_options_add_page()
{
    $awaiting_mod = 4;
    add_object_page("Wiki Embed", "Wiki Embed", "publish_pages", "wiki-embed", "wikiembed_list_page", plugins_url('/wiki-embed/resources/img/icons_menu.gif'), 28);
    $list_page = add_submenu_page("wiki-embed", 'Wiki Embed List', 'Wiki Embed List ', "publish_pages", "wiki-embed", "wikiembed_list_page");
    $settings_page = add_submenu_page("wiki-embed", "Settings", "Settings", "publish_pages", "wikiembed_settings_page", "wikiembed_settings_page");
    add_action('admin_print_styles-' . $list_page, 'wikiembed_admin_styles_list_page');
    add_action('admin_print_styles-' . $settings_page, 'wikiembed_admin_styles_list_page');
}
Exemplo n.º 20
0
function adrotate_dashboard()
{
    add_object_page('AdRotate', 'AdRotate', 'manage_options', 'adrotate', 'adrotate_manage');
    add_submenu_page('adrotate', 'AdRotate > Manage', 'Manage Banners', 'manage_options', 'adrotate', 'adrotate_manage');
    add_submenu_page('adrotate', 'AdRotate > Banner Wizard', 'Banner Wizard', 'manage_options', 'adrotate2', 'adrotate_wizard');
    add_submenu_page('adrotate', 'AdRotate > Add/Edit (Advanced)', 'Add|Edit Banner', 'manage_options', 'adrotate3', 'adrotate_edit');
    add_submenu_page('adrotate', 'AdRotate > Groups', 'Manage Groups', 'manage_options', 'adrotate4', 'adrotate_manage_group');
    add_options_page('AdRotate', 'AdRotate', 'manage_options', 'adrotate5', 'adrotate_options');
}
Exemplo n.º 21
0
function events_dashboard()
{
    global $events_config;
    add_object_page(__('Events', 'wpevents'), __('Events', 'wpevents'), $events_config['addlevel'], 'wp-events', 'events_manage');
    add_submenu_page('wp-events', __('Events', 'wpevents') . ' > ' . __('Manage', 'wpevents'), __('Manage Events', 'wpevents'), $events_config['addlevel'], 'wp-events', 'events_manage');
    add_submenu_page('wp-events', __('Events', 'wpevents') . ' > ' . __('Add/Edit', 'wpevents'), __('Add|Edit Event', 'wpevents'), $events_config['addlevel'], 'wp-events-edit', 'events_schedule');
    add_submenu_page('wp-events', __('Events', 'wpevents') . ' > ' . __('Categories', 'wpevents'), __('Manage Categories', 'wpevents'), $events_config['editlevel'], 'wp-events-category', 'events_categories');
    add_options_page(__('Events', 'wpevents'), __('Events', 'wpevents'), 'manage_options', 'wp-events-settings', 'events_options');
}
 public function templatemerge_plugin_admin_actions()
 {
     add_object_page("Template Merge", "Master Templates", 10, "templatemerge", array('TemplateMerge', 'templatemerge_page'), self::get_base_url() . "/images/form_options.png");
     add_submenu_page("templatemerge", "ParseFields | Template Merge", "Parse Form Fields", 10, "parsefield", array('TemplateMerge', 'parsefield_page'));
     add_submenu_page("templatemerge", "Letter Templates | Template Merge", "Letter Templates", 10, "letters", array('TemplateMerge', 'letter_templates'));
     add_submenu_page("templatemerge", "Invoice Templates | Template Merge", "Invoice Templates", 10, "invoices", array('TemplateMerge', 'invoices_templates'));
     add_submenu_page("templatemerge", "Generated Documents| Template Merge", "Generated Documents", 10, "filelist", array('TemplateMerge', 'filelist_page'));
     add_submenu_page("templatemerge", "Settings | Template Merge", "Settings", 10, "settings", array('TemplateMerge', 'settings_page'));
     //add_menu_page( 'MyDocuments', 'My Documents', 0, "MyDocuments", array('TemplateMerge','mydocuments'), self::get_base_url()."/images/gravity-admin-icon.png", 59 );
 }
Exemplo n.º 23
0
function smartSeo_settings_page_init()
{
    global $smartSeo;
    /* get plugin information. */
    $utils = $smartSeo->utils;
    /* Create the theme settings page. */
    add_object_page('Page Title', $utils['shortname'], 2, 'smartSeo', 'smartSeo_create_settings_page', PLUGIN_URI . $utils['icon']);
    add_submenu_page('smartSeo', 'AdminMenu', 'Configuration', 'administrator', 'smartSeo', 'smartSeo_create_settings_page');
    //add_submenu_page('smartSeo', 'Suport', 'Support', 'administrator', 'support', 'smartSeo_create_support_page');
}
Exemplo n.º 24
0
function optionsframework_add_admin()
{
    // $of_page = add_menu_page('themes.php', THEMENAME, 'Theme Options', 'edit_theme_options', 'optionsframework','optionsframework_options_page'); // Default
    $of_page = add_object_page('Touchfolio', 'Touchfolio', 'edit_theme_options', 'optionsframework', 'optionsframework_options_page', ADMIN_DIR . 'images/rabbit.png');
    // Add framework functionaily to the head individually
    add_action("admin_print_scripts-{$of_page}", 'of_load_only');
    add_action("admin_print_styles-{$of_page}", 'of_style_only');
    add_action("admin_print_styles-{$of_page}", 'optionsframework_mlu_css', 0);
    add_action("admin_print_scripts-{$of_page}", 'optionsframework_mlu_js', 0);
}
Exemplo n.º 25
0
 /**
  * WPZOOM custom menu for wp-admin
  */
 public function register_admin_pages()
 {
     add_object_page('Page Title', 'WPZOOM', 'manage_options', 'wpzoom_options', array($this, 'admin'), 'none');
     add_submenu_page('wpzoom_options', 'WPZOOM', 'Theme Options', 'manage_options', 'wpzoom_options', array($this, 'admin'));
     if (option::is_on('framework_update_enable')) {
         add_submenu_page('wpzoom_options', 'Update Framework', 'Update Framework', 'update_themes', 'wpzoom_update', array($this, 'update'));
     }
     if (option::is_on('framework_newthemes_enable') && !wpzoom::$tf) {
         add_submenu_page('wpzoom_options', 'New Themes', 'New Themes', 'manage_options', 'wpzoom_themes', array($this, 'themes'));
     }
 }
Exemplo n.º 26
0
function templ_add_admin_menu()
{
    $menu_title = apply_filters('templ_admin_menu_title_filter', __('Theme Settings', 'templatic'));
    if (function_exists(add_object_page)) {
        add_object_page("Admin Menu", $menu_title, TEMPL_ACCESS_USER, 'templatic_wp_admin_menu', 'design', TT_ADMIN_FOLDER_URL . 'images/favicon.ico');
        // title of new sidebar
    } else {
        add_menu_page("Admin Menu", $menu_title, TEMPL_ACCESS_USER, 'templatic_wp_admin_menu', 'design', TT_ADMIN_FOLDER_URL . 'images/favicon.ico');
        // title of new sidebar
    }
}
Exemplo n.º 27
0
 /**
  * WPZOOM custom menu for wp-admin
  */
 public static function register_admin_pages()
 {
     add_object_page('Page Title', 'WPZOOM', 'manage_options', 'wpzoom_options', 'WPZOOM_Admin::admin', WPZOOM::$assetsPath . '/images/shortcode-icon.png');
     add_submenu_page('wpzoom_options', 'WPZOOM', 'Theme Options', 'manage_options', 'wpzoom_options', array(__CLASS__, 'admin'));
     if (option::is_on('framework_update_enable')) {
         add_submenu_page('wpzoom_options', 'Update Framework', 'Update Framework', 'update_themes', 'wpzoom_update', array(__CLASS__, 'update'));
     }
     if (option::is_on('framework_newthemes_enable') && !wpzoom::$tf) {
         add_submenu_page('wpzoom_options', 'New Themes', 'New Themes', 'manage_options', 'wpzoom_themes', array(__CLASS__, 'themes'));
     }
 }
Exemplo n.º 28
0
/** create_admin_menu()
  * Objective:
  *		Hook to create theme option page at back end.
**/
function create_admin_menu() {
	
	$role = get_role('administrator');
	if(!$role->has_cap('manage_theme')) $role->add_cap('manage_theme');

    if( function_exists('add_object_page') ) 
		 add_object_page (IAMD_THEME_NAME.' - '.__('settings','dt_themes'),IAMD_THEME_NAME,'manage_theme','parent','dttheme_options_page');
		 
	if(function_exists('add_submenu_page'))
	 	add_submenu_page ('parent',IAMD_THEME_NAME.' - '.__("options",'dt_themes'),__('Options','dt_themes'),'manage_theme','parent','dttheme_options_page');		
}
Exemplo n.º 29
0
/** 
 * function optionsframework_add_admin - Load static framework options pages
 * Credits to Devin too for using some coding from his framework https://github.com/devinsays
 */
function optionsframework_add_admin()
{
    global $iva_options, $icon;
    /**
     * Save Options Settings
     */
    if (isset($_REQUEST['page']) && $_REQUEST['page'] == 'optionsframework') {
        if (isset($_REQUEST['atp_save']) && 'reset' == $_REQUEST['atp_save']) {
            atp_reset_options($iva_options, 'optionsframework');
            header("Location: admin.php?page=optionsframework&reset=true");
            die;
        }
    }
    /**
     * Add a top level menu page in the 'objects' section
     *
     * @param string 'THEMENAME' The text to be displayed in the title tags of the page when the menu is selected
     * @param string 'THEMENAME' The text to be used for the menu
     * @param string 'edit_theme_options' The capability required for this menu to be displayed to the user.
     * @param string 'optionsframework' The slug name to refer to this menu by (should be unique for this menu)
     * @param callback 'optionsframework_options_page' The function to be called to output the content for this page.
     * @param string '$icon' The url to the icon to be used for this menu
     *
     * @return string The resulting page's hook_suffix
     */
    if (function_exists('add_object_page')) {
        $icon = THEME_URI . '/framework/admin/images/theme-icon.png';
        // Icon for theme admin menu
        add_object_page(THEMENAME, THEMENAME, 'edit_theme_options', 'optionsframework', 'optionsframework_options_page', $icon);
    }
    /**
     * Add a sub menu page
     *
     * @param string 'optionsframework' The slug name for the parent menu (or the file name of a standard WordPress admin page)
     * @param string 'THEMENAME' The text to be displayed in the title tags of the page when the menu is selected
     * @param string 'Theme Options' The text to be used for the menu
     * @param string 'edit_theme_options' The capability required for this menu to be displayed to the user.
     * @param string 'optionsframework' The slug name to refer to this menu by (should be unique for this menu)
     * @param callback 'optionsframework_options_page' The function to be called to output the content for this page.
     *
     * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required.
     */
    $atp_page = add_submenu_page('optionsframework', THEMENAME, 'Theme Options', 'edit_theme_options', 'optionsframework', 'optionsframework_options_page');
    // Default
    $advance = add_submenu_page('optionsframework', 'Advance', 'Import/Export', 'edit_theme_options', 'advance', 'optionsframework_options_page');
    // Theme B
    /** 
     * Hooks a function on to a specific action.
     * Runs in the HTML header so a admin framework can add JavaScript scripts to all admin pages.
     */
    add_action("admin_print_scripts-{$atp_page}", 'atp_load_only');
    add_action("admin_print_scripts-{$advance}", 'atp_load_only');
}
/** 
 * Create Admin menu
 */
function grahlie_admin_menu()
{
    $grahlie_options = get_option('grahlie_framework_options');
    $icon = GRAHLIE_URL . '/images/favicon.png';
    // Add menu item, main menu = sub menu
    add_object_page($grahlie_options['theme_name'], $grahlie_options['theme_name'], 'administrator', 'grahlieframework', 'grahlie_admin_page', $icon);
    add_submenu_page('grahlieframework', __('Theme Options', 'grahlie'), __('Theme Options', 'grahlie'), 'administrator', 'grahlieframework', 'grahlie_admin_page');
}