public function admin_menu()
 {
     $this->user_created_pages = SerializeStringToArray(get_option($this->prefix('user_created_pages')));
     if ($this->user_created_pages && count($this->user_created_pages) >= 1) {
         foreach ($this->user_created_pages as $page) {
             if (isset($page['page_slug']) && isset($page['page_title']) && isset($page['parent_menu'])) {
                 if ($page['parent_menu'] == 'new_menu') {
                     add_menu_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
                 } elseif ($page['parent_menu'] == 'dashboard') {
                     add_dashboard_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
                 } elseif ($page['parent_menu'] == 'posts') {
                     add_posts_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
                 } elseif ($page['parent_menu'] == 'media') {
                     add_media_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
                 } elseif ($page['parent_menu'] == 'pages') {
                     add_pages_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
                 } elseif ($page['parent_menu'] == 'comments') {
                     add_comments_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
                 } elseif ($page['parent_menu'] == 'theme') {
                     add_theme_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
                 } elseif ($page['parent_menu'] == 'plugins') {
                     add_plugins_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
                 } elseif ($page['parent_menu'] == 'users') {
                     add_users_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
                 } elseif ($page['parent_menu'] == 'management') {
                     add_management_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
                 } elseif ($page['parent_menu'] == 'options') {
                     add_options_page($page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
                 } elseif (array_key_exists($page['parent_menu'], $user_pages)) {
                     add_submenu_page($page['parent_menu'], $page['page_title'], $page['page_title'], 'manage_options', $page['page_slug'], array($this, 'user_created_menu_pages'));
                 }
             }
         }
     }
 }
 function admin_menu()
 {
     if ($this->user_allowed()) {
         add_media_page(__('Add From Server', 'add-from-server'), __('Add From Server', 'add-from-server'), 'read', 'add-from-server', array($this, 'menu_page'));
     }
     add_options_page(__('Add From Server', 'add-from-server'), __('Add From Server', 'add-from-server'), 'manage_options', 'add-from-server-settings', array($this, 'options_page'));
 }
Example #3
0
/**
 *
 * RETINA DASHBOARD
 *
 */
function wr2x_admin_menu_dashboard()
{
    $refresh = isset($_GET['refresh']) ? $_GET['refresh'] : 0;
    $clearlogs = isset($_GET['clearlogs']) ? $_GET['clearlogs'] : 0;
    $ignore = isset($_GET['ignore']) ? $_GET['ignore'] : false;
    if ($ignore) {
        if (!wr2x_is_pro()) {
            echo "<div class='error' style='margin-top: 20px;'><p>";
            _e("Ignore is a Pro feature.", 'wp-retina-2x');
            echo "</p></div>";
        } else {
            wr2x_add_ignore($ignore);
        }
    }
    if ($refresh) {
        wr2x_calculate_issues();
    }
    if ($clearlogs) {
        if (file_exists(plugin_dir_path(__FILE__) . '/wp-retina-2x.log')) {
            unlink(plugin_dir_path(__FILE__) . '/wp-retina-2x.log');
        }
    }
    $flagged = count(wr2x_get_issues());
    $warning_title = __("Retina images", 'wp-retina-2x');
    $menu_label = sprintf(__('Retina %s'), "<span class='update-plugins count-{$flagged}' title='{$warning_title}'><span class='update-count'>" . number_format_i18n($flagged) . "</span></span>");
    add_media_page('Retina', $menu_label, 'manage_options', 'wp-retina-2x', 'wpr2x_wp_retina_2x');
}
Example #4
0
function s3admin_menu()
{
    //Add upload form Submenu
    add_media_page('S3 Upload Form', 'S3 Upload Form', 'administrator', 's3_uploader', 's3form_content');
    add_media_page(' S3 Bucket Contents', 'S3 Bucket Contents', 'administrator', 's3uploader', 's3bucket_content');
    //Add settings submenu
    add_options_page('Amazon S3 Video Upload Settings', 'S3 Upload Settings', 'manage_options', 'S3 Upload Form', 's3settings');
}
function gdml_media_actions()
{
    if (!is_admin()) {
        wp_die("You are not authorized to view this page");
    } else {
        add_media_page("Google Drive Media Library", "Google Drive Media Library", 1, "google-drive-media-library-management", "gdml_media");
        add_action('admin_enqueue_scripts', 'gdml_adminScript');
    }
}
 /**
  * Add Bulk option settings page
  */
 function screen()
 {
     $admin_page_suffix = add_media_page('Bulk WP Smush.it', 'WP Smush.it', 'edit_others_posts', 'wp-smushit-bulk', array($this, 'ui'));
     //Register Debug page only if WP_SMPRO_DEBUG is defined and true
     if (defined('WP_SMUSHIT_DEBUG') && WP_SMUSHIT_DEBUG) {
         add_media_page('WP Smush.it Error Log', 'Error Log', 'edit_others_posts', 'wp-smushit-errorlog', array($this, 'create_admin_error_log_page'));
     }
     // enqueue js only on this screen
     add_action('admin_print_scripts-' . $admin_page_suffix, array($this, 'enqueue'));
 }
Example #7
0
 function admin_menu()
 {
     if (!function_exists('submit_button')) {
         return;
     }
     if ($this->user_allowed()) {
         add_media_page(__('Add From Server', 'add-from-server'), __('Add From Server', 'add-from-server'), 'read', 'add-from-server', array(&$this, 'menu_page'));
     }
     add_options_page(__('Add From Server Settings', 'add-from-server'), __('Add From Server', 'add-from-server'), 'manage_options', 'add-from-server-settings', array(&$this, 'options_page'));
 }
 function create_menus()
 {
     add_media_page(__('Galleries', 'foogallery'), __('Galleries', 'foogallery'), 'upload_files', 'edit.php?post_type=' . FOOGALLERY_CPT_GALLERY);
     add_media_page(__('Add Gallery', 'foogallery'), __('Add Gallery', 'foogallery'), 'upload_files', 'post-new.php?post_type=' . FOOGALLERY_CPT_GALLERY);
     $api = new FooGallery_Extensions_API();
     if ($api->is_active('albums')) {
         add_media_page(__('Albums', 'foogallery'), __('Albums', 'foogallery'), 'upload_files', 'edit.php?post_type=' . FOOGALLERY_CPT_ALBUM);
         add_media_page(__('Add Album', 'foogallery'), __('Add Album', 'foogallery'), 'upload_files', 'post-new.php?post_type=' . FOOGALLERY_CPT_ALBUM);
     }
 }
Example #9
0
/**
 * Create the settings menu item in the WordPress admin navigation and 
 * link it to the plugin settings page
 */
function bulk_resize_create_menu()
{
    if (BULK_RESIZE_SUPER_ADMIN_ONLY) {
        if (is_super_admin()) {
            add_media_page('Bulk Resize Images', 'Bulk Resize', 'add_users', 'bulk_resize_admin', 'bulk_resize_settings_page');
        }
    } else {
        add_media_page('Bulk Resize Images', 'Bulk Resize', 'add_users', 'bulk_resize_admin', 'bulk_resize_settings_page');
    }
}
function oaf_create_submenu()
{
    add_dashboard_page('OAF Settings', 'OAF Settings', 'manage_options', 'oaf_create_submenu_plugin', 'oaf_create_submenu_function');
    add_posts_page('OAF Settings', 'OAF Settings', 'manage_options', 'oaf_create_submenu_plugin', 'oaf_create_submenu_function');
    add_media_page('OAF Settings', 'OAF Settings', 'manage_options', 'oaf_create_submenu_plugin', 'oaf_create_submenu_function');
    add_pages_page('OAF Settings', 'OAF Settings', 'manage_options', 'oaf_create_submenu_plugin', 'oaf_create_submenu_function');
    add_comments_page('OAF Settings', 'OAF Settings', 'manage_options', 'oaf_create_submenu_plugin', 'oaf_create_submenu_function');
    add_theme_page('OAF Settings', 'OAF Settings', 'manage_options', 'oaf_create_submenu_plugin', 'oaf_create_submenu_function');
    add_users_page('OAF Settings', 'OAF Settings', 'manage_options', 'oaf_create_submenu_plugin', 'oaf_create_submenu_function');
    add_management_page('OAF Settings', 'OAF Settings', 'manage_options', 'oaf_create_submenu_plugin', 'oaf_create_submenu_function');
    add_options_page('OAF Settings', 'OAF Settings', 'manage_options', 'oaf_create_submenu_plugin', 'oaf_create_submenu_function');
}
 public function admin_menu()
 {
     // NEEDS: menu_page()
     // NEEDS: options_page()
     if (!function_exists('submit_button')) {
         return;
     }
     if (current_user_can('upload_files')) {
         add_media_page(__('Dropbox Sideload', 'dropbox-sideload'), __('Dropbox Sideload', 'dropbox-sideload'), 'read', 'dropbox-sideload', array(&$this, 'menu_page'));
     }
     if (current_user_can('manage_options')) {
         add_options_page(__('Dropbox Sideload Options', 'dropbox-sideload'), __('Dropbox Sideload Options', 'dropbox-sideload'), 'read', 'dropbox-sideload', array(&$this, 'options_page'));
     }
 }
Example #12
0
 function my_admin_menu()
 {
     //create a main admin panel
     //create a sub admin panel link above
     add_menu_page('Bandi Summary', 'Bandi Summary', 'administrator', 9, array(&$this, 'overview'));
     //These functions adds sub menu for different kinds of admin panel on back end
     add_options_page('Mahesh Options', 'Mahesh  Plugin', 'administrator', basename(__FILE__), array(&$this, 'my_plugin_options'));
     add_posts_page('Mahesh posts', 'Mahesh  Plugin', 'administrator', basename(__FILE__), array(&$this, 'my_plugin_posts'));
     add_media_page('Mahesh media', 'Mahesh  Plugin', 'administrator', basename(__FILE__), array(&$this, 'my_plugin_media'));
     add_pages_page('Mahesh pages', 'Mahesh  Plugin', 'administrator', basename(__FILE__), array(&$this, 'my_plugin_pages'));
     add_users_page('Mahesh users', 'Mahesh  Plugin', 'administrator', basename(__FILE__), array(&$this, 'my_plugin_users'));
     add_management_page('Bandi', 'Mahesh  Plugin', 'administrator', basename(__FILE__), array(&$this, 'my_plugin_tools'));
     add_theme_page('Bandi', 'Mahesh  Plugin', 'administrator', basename(__FILE__), array(&$this, 'my_plugin_themes'));
 }
/**
 *
 * RETINA DASHBOARD
 *
 */
function wr2x_admin_menu_dashboard()
{
    $refresh = isset($_GET['refresh']) ? $_GET['refresh'] : 0;
    $ignore = isset($_GET['ignore']) ? $_GET['ignore'] : false;
    if ($ignore) {
        wr2x_add_ignore($ignore);
    }
    if ($refresh) {
        wr2x_calculate_issues();
    }
    $flagged = count(wr2x_get_issues());
    $warning_title = __("Retina images", 'wp-retina-2x');
    $menu_label = sprintf(__('WP Retina 2x %s'), "<span class='update-plugins count-{$flagged}' title='{$warning_title}'><span class='update-count'>" . number_format_i18n($flagged) . "</span></span>");
    add_media_page('WP Retina 2x', $menu_label, 'manage_options', 'wp-retina-2x', 'wpr2x_wp_retina_2x');
}
Example #14
0
 function init()
 {
     // set the title for
     $this->menu_title = __('Galleri', 'sthlm_gallery');
     // check if theme has thumbnail support else activate for sthlm_gallery post_type
     if (!current_theme_supports('post-thumbnails')) {
         add_theme_support('post-thumbnails', array('sthlm_gallery'));
     }
     $admin_page = add_media_page($this->title, $this->menu_title, $this->capability, $this->menu_slug, array(&$this, 'gallery_page'));
     // javascript på andmin sidan och med variablen ovan använder scripet bara på den sidan
     add_action('admin_print_scripts-' . $admin_page, array(&$this, 'js_admin'));
     // admin css
     add_action('admin_print_styles-' . $admin_page, array(&$this, 'css_admin'));
     // js on all admin pages
     //add_action('admin_print_scripts', array(&$this,'js_admin_edit'));
 }
 /**
  * Add Bulk option settings page
  */
 function screen()
 {
     global $hook_suffix;
     $admin_page_suffix = add_media_page('Bulk WP Smush', 'WP Smush', 'edit_others_posts', 'wp-smush-bulk', array($this, 'ui'));
     // enqueue js only on this screen
     add_action('admin_print_scripts-' . $admin_page_suffix, array($this, 'enqueue'));
     // Enqueue js on media screen
     add_action('admin_print_scripts-upload.php', array($this, 'enqueue'));
     // Enqueue js on Post screen (Edit screen for media )
     add_action('admin_print_scripts-post.php', array($this, 'enqueue'));
 }
 /**
  * Register the administration menu for this plugin into the WordPress Dashboard menu.
  *
  * @since    1.0.0
  */
 public function add_plugin_admin_menu()
 {
     /*
      * Add a settings page for this plugin to the Settings menu.
      *
      * NOTE:  Alternative menu locations are available via WordPress administration menu functions.
      *
      *        Administration Menus: http://codex.wordpress.org/Administration_Menus
      *
      */
     $this->plugin_screen_hook_suffix = add_options_page(__('Really Big Files', $this->plugin_slug), __('Really Big Files', $this->plugin_slug), 'manage_options', $this->plugin_slug, array($this, 'display_plugin_admin_page'));
     $this->plugin_screen_hook_suffix = add_media_page(__('Really Big Files', $this->plugin_slug), __('Really Big Files', $this->plugin_slug), 'manage_options', $this->plugin_slug, array($this, 'display_plugin_bigfiles_page'));
 }
 public function admin_menu()
 {
     add_media_page(__('Bulk Optimization', 'tiny-compress-images'), esc_html__('Bulk Optimization', 'tiny-compress-images'), 'upload_files', 'tiny-bulk-optimization', $this->get_method('render_bulk_optimization_page'));
 }
Example #18
0
 function admin_menu()
 {
     add_media_page(__('VideoPress Library', 'jetpack'), __('VideoPress', 'jetpack'), 'upload_files', 'videopress-library', array($this, 'admin_menu_library'));
 }
 /**
  * Add Bulk option settings page
  */
 function screen()
 {
     global $admin_page_suffix;
     $admin_page_suffix = add_media_page('Bulk WP Smush', 'WP Smush', 'edit_others_posts', 'wp-smush-bulk', array($this->bulk_ui, 'ui'));
     //For Nextgen gallery Pages, check later in enqueue function
     add_action('admin_enqueue_scripts', array($this, 'enqueue'));
 }
Example #20
0
 public function add_doc_management()
 {
     add_media_page('Manage Documents', 'Documents', 'upload_files', 'managedocs', array($this, 'doc_management_form'));
 }
/**
 *
 * PLUGIN INSTALL / UNINSTALL / SCRIPTS
 *
 */
function wpmc_admin_menu()
{
    load_plugin_textdomain('wp-media-cleaner', false, dirname(plugin_basename(__FILE__)) . '/languages/');
    add_media_page('WP Media Cleaner', 'Media Cleaner', 'manage_options', 'wp-media-cleaner', 'wpmc_screen');
    add_options_page('WP Media Cleaner', 'WP Media Cleaner', 'manage_options', 'wpmc_settings', 'wpmc_settings_page');
}
Example #22
0
 function registerAdminPage()
 {
     add_media_page('ShortPixel Bulk Process', 'Bulk ShortPixel', 'edit_others_posts', 'wp-short-pixel-bulk', array(&$this, 'bulkProcess'));
 }
Example #23
0
 public function admin_menu()
 {
     add_media_page(self::translate('Compress JPEG & PNG Images'), self::translate('Compress All Images'), 'upload_files', 'tiny-bulk-compress', $this->get_method('bulk_compress_page'));
 }
Example #24
0
function mediatags_admin_panels()
{
    // Adds the 'Media-Tags' submenu option under the Media nav
    add_media_page(_x("Media-Tags", 'menu label', MEDIA_TAGS_I18N_DOMAIN), _x("Media-Tags", 'page label', MEDIA_TAGS_I18N_DOMAIN), MEDIATAGS_MANAGE_TERMS_CAP, "edit-tags.php?taxonomy=media-tags&post_type=attachment");
    // Adds the 'Media-Tags' top-level menu panel
    add_menu_page(_x("Media-Tags Settings", 'page label', MEDIA_TAGS_I18N_DOMAIN), _x("Media-Tags", 'menu label', MEDIA_TAGS_I18N_DOMAIN), MEDIATAGS_SETTINGS_CAP, 'mediatags_settings_panel', 'mediatags_settings_panel');
    add_submenu_page('mediatags_settings_panel', _x('Media-Tags Settings', 'page label', MEDIA_TAGS_I18N_DOMAIN), _x('Settings', 'menu label', 'menu label', MEDIA_TAGS_I18N_DOMAIN), MEDIATAGS_SETTINGS_CAP, 'mediatags_settings_panel', 'mediatags_settings_panel');
    add_submenu_page('mediatags_settings_panel', _x('Roles Management', 'page label', MEDIA_TAGS_I18N_DOMAIN), _x('Roles Management', 'menu label', MEDIA_TAGS_I18N_DOMAIN), MEDIATAGS_MANAGE_ROLE_CAP, 'mediatags_roles_panel', 'mediatags_roles_panel');
    add_submenu_page('mediatags_settings_panel', _x('Third Party Settings', 'page label', MEDIA_TAGS_I18N_DOMAIN), _x('Third Party Settings', 'menu label', MEDIA_TAGS_I18N_DOMAIN), MEDIATAGS_SETTINGS_CAP, 'mediatags_thirdparty_panel', 'mediatags_thirdparty_panel');
    add_submenu_page('mediatags_settings_panel', _x('Help', 'page label', MEDIA_TAGS_I18N_DOMAIN), _x('Help', 'menu label', MEDIA_TAGS_I18N_DOMAIN), MEDIATAGS_SETTINGS_CAP, 'mediatags_help_panel', 'mediatags_help_panel');
}
Example #25
0
function gdwpm_menu_media()
{
    add_media_page(NAMA_GDWPM, NAMA_GDWPM, 'activate_plugins', ALMT_GDWPM, 'gdwpm_halaman_media');
    add_action('admin_enqueue_scripts', 'gdwpm_sekrip_buat_mimin');
}
function media_library_menu_item()
{
    add_media_page('How to use the Media Library Shortcode', 'Shortcode', 1, 'shortcode', 'media_library_shortcode_page');
}
 /**
  * Add submenu items
  */
 function add_menu_items()
 {
     add_media_page(__('Manage UGC', 'frontend-uploader'), __('Manage UGC', 'frontend-uploader'), $this->manage_permissions, 'manage_frontend_uploader', array($this, 'admin_list'));
     foreach ((array) $this->settings['enabled_post_types'] as $cpt) {
         if ($cpt == 'post') {
             add_posts_page(__('Manage UGC Posts', 'frontend-uploader'), __('Manage UGC', 'frontend-uploader'), $this->manage_permissions, 'manage_frontend_uploader_posts', array($this, 'admin_posts_list'));
             continue;
         }
         add_submenu_page("edit.php?post_type={$cpt}", __('Manage UGC Posts', 'frontend-uploader'), __('Manage UGC', 'frontend-uploader'), $this->manage_permissions, "manage_frontend_uploader_{$cpt}s", array($this, 'admin_posts_list'));
     }
 }
Example #28
0
function ewww_image_optimizer_admin_menu()
{
    $permissions = apply_filters('ewww_image_optimizer_bulk_permissions', '');
    // adds bulk optimize to the media library menu
    $ewww_bulk_page = add_media_page(esc_html__('Bulk Optimize', EWWW_IMAGE_OPTIMIZER_DOMAIN), esc_html__('Bulk Optimize', EWWW_IMAGE_OPTIMIZER_DOMAIN), $permissions, 'ewww-image-optimizer-bulk', 'ewww_image_optimizer_bulk_preview');
    $ewww_unoptimized_page = add_media_page(esc_html__('Unoptimized Images', EWWW_IMAGE_OPTIMIZER_DOMAIN), esc_html__('Unoptimized Images', EWWW_IMAGE_OPTIMIZER_DOMAIN), $permissions, 'ewww-image-optimizer-unoptimized', 'ewww_image_optimizer_display_unoptimized_media');
    $ewww_webp_migrate_page = add_submenu_page(null, esc_html__('Migrate WebP Images', EWWW_IMAGE_OPTIMIZER_DOMAIN), esc_html__('Migrate WebP Images', EWWW_IMAGE_OPTIMIZER_DOMAIN), $permissions, 'ewww-image-optimizer-webp-migrate', 'ewww_image_optimizer_webp_migrate_preview');
    if (!function_exists('is_plugin_active')) {
        // need to include the plugin library for the is_plugin_active function
        require_once ABSPATH . 'wp-admin/includes/plugin.php';
    }
    if (!is_plugin_active_for_network(EWWW_IMAGE_OPTIMIZER_PLUGIN_FILE_REL)) {
        // add options page to the settings menu
        $ewww_options_page = add_options_page('EWWW Image Optimizer', 'EWWW Image Optimizer', apply_filters('ewww_image_optimizer_admin_permissions', ''), EWWW_IMAGE_OPTIMIZER_PLUGIN_FILE, 'ewww_image_optimizer_options');
    }
    if (ewww_image_optimizer_get_option('ewww_image_optimizer_debug')) {
        add_media_page(esc_html__('Dynamic Image Debugging', EWWW_IMAGE_OPTIMIZER_DOMAIN), esc_html__('Dynamic Image Debugging', EWWW_IMAGE_OPTIMIZER_DOMAIN), $permissions, 'ewww-image-optimizer-dynamic-debug', 'ewww_image_optimizer_dynamic_image_debug');
    }
    if (is_plugin_active('image-store/ImStore.php') || is_plugin_active_for_network('image-store/ImStore.php')) {
        $ims_menu = 'edit.php?post_type=ims_gallery';
        $ewww_ims_page = add_submenu_page($ims_menu, esc_html__('Image Store Optimize', EWWW_IMAGE_OPTIMIZER_DOMAIN), esc_html__('Optimize', EWWW_IMAGE_OPTIMIZER_DOMAIN), 'ims_change_settings', 'ewww-ims-optimize', 'ewww_image_optimizer_ims');
        //		add_action( 'admin_footer-' . $ewww_ims_page, 'ewww_image_optimizer_debug' );
    }
}
Example #29
0
function ewww_image_optimizer_admin_menu()
{
    $permissions = apply_filters('ewww_image_optimizer_bulk_permissions', '');
    // adds bulk optimize to the media library menu
    $ewww_bulk_page = add_media_page(__('Bulk Optimize', EWWW_IMAGE_OPTIMIZER_DOMAIN), __('Bulk Optimize', EWWW_IMAGE_OPTIMIZER_DOMAIN), $permissions, 'ewww-image-optimizer-bulk', 'ewww_image_optimizer_bulk_preview');
    $ewww_unoptimized_page = add_media_page(__('Unoptimized Images', EWWW_IMAGE_OPTIMIZER_DOMAIN), __('Unoptimized Images', EWWW_IMAGE_OPTIMIZER_DOMAIN), $permissions, 'ewww-image-optimizer-unoptimized', 'ewww_image_optimizer_display_unoptimized_media');
    $ewww_webp_migrate_page = add_submenu_page(null, __('Migrate WebP Images', EWWW_IMAGE_OPTIMIZER_DOMAIN), __('Migrate WebP Images', EWWW_IMAGE_OPTIMIZER_DOMAIN), $permissions, 'ewww-image-optimizer-webp-migrate', 'ewww_image_optimizer_webp_migrate_preview');
    add_action('admin_footer-' . $ewww_bulk_page, 'ewww_image_optimizer_debug');
    if (!function_exists('is_plugin_active_for_network') || !is_plugin_active_for_network(plugin_basename(EWWW_IMAGE_OPTIMIZER_PLUGIN_FILE))) {
        // add options page to the settings menu
        $ewww_options_page = add_options_page('EWWW Image Optimizer', 'EWWW Image Optimizer', apply_filters('ewww_image_optimizer_admin_permissions', ''), EWWW_IMAGE_OPTIMIZER_PLUGIN_FILE, 'ewww_image_optimizer_options');
        add_action('admin_footer-' . $ewww_options_page, 'ewww_image_optimizer_debug');
    }
    if (is_plugin_active('image-store/ImStore.php') || is_plugin_active_for_network('image-store/ImStore.php')) {
        $ims_menu = 'edit.php?post_type=ims_gallery';
        $ewww_ims_page = add_submenu_page($ims_menu, __('Image Store Optimize', EWWW_IMAGE_OPTIMIZER_DOMAIN), __('Optimize', EWWW_IMAGE_OPTIMIZER_DOMAIN), 'ims_change_settings', 'ewww-ims-optimize', 'ewww_image_optimizer_ims');
        add_action('admin_footer-' . $ewww_ims_page, 'ewww_image_optimizer_debug');
    }
}
Example #30
0
function fb_add_pages()
{
    if (get_bloginfo('version') >= 2.7) {
        add_media_page('Media &rsaquo; Fotobook', 'Fotobook', 8, 'fotobook/manage-fotobook.php');
    } else {
        add_management_page('Manage &rsaquo; Fotobook', 'Fotobook', 8, 'fotobook/manage-fotobook.php');
    }
    add_options_page('Settings &rsaquo; Fotobook', 'Fotobook', 8, 'fotobook/options-fotobook.php');
}