Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/12/2011 02:33:04 PM (13 years ago)
Author:
johnjamesjacoby
Message:

First pass at using settings API:

  • Split bp-core-admin.php up into smaller parts
  • Use settings API for Settings screen
  • Backport bbPress 2.x admin class
  • Move admin functions out of core functions and cssjs files
  • Update bp-core-options.php and include
  • Rename menu pages to be more accurate
  • Rename 'Pages' tab to 'Permalinks' for future slugifying
  • See #3835
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-cssjs.php

    r5406 r5524  
    22// Exit if accessed directly
    33if ( !defined( 'ABSPATH' ) ) exit;
    4 
    5 /**
    6  * bp_core_admin_menu_icon_css()
    7  *
    8  * Add a hover-able icon to the "BuddyPress" wp-admin area menu.
    9  *
    10  * @package BuddyPress Core
    11  */
    12 function bp_core_admin_menu_icon_css() {
    13     global $bp; ?>
    14 
    15     <style type="text/css">
    16         /* Wizard Icon */
    17         ul#adminmenu li.toplevel_page_bp-wizard .wp-menu-image a img { display: none; }
    18         ul#adminmenu li.toplevel_page_bp-wizard .wp-menu-image a { background-image: url( <?php echo plugins_url( 'buddypress/bp-core/images/admin_menu_icon.png' ) ?> ) !important; background-position: -1px -32px; }
    19         ul#adminmenu li.toplevel_page_bp-wizard:hover .wp-menu-image a,
    20         ul#adminmenu li.toplevel_page_bp-wizard.wp-has-current-submenu .wp-menu-image a {
    21             background-position: -1px 0;
    22         }
    23 
    24         /* Settings Icon */
    25         ul#adminmenu li.toplevel_page_bp-general-config .wp-menu-image a img,
    26         ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image a img {
    27             display: none;
    28         }
    29 
    30         ul#adminmenu li.toplevel_page_bp-general-config .wp-menu-image a,
    31         ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image a {
    32             background-image: url( <?php echo plugins_url( 'buddypress/bp-core/images/admin_menu_icon.png' ) ?> ) !important; background-position: -1px -32px;
    33         }
    34 
    35         ul#adminmenu li.toplevel_page_bp-general-config:hover .wp-menu-image a,
    36         ul#adminmenu li.toplevel_page_bp-general-settings:hover .wp-menu-image a,
    37         ul#adminmenu li.toplevel_page_bp-general-config.wp-has-current-submenu .wp-menu-image a,
    38         ul#adminmenu li.toplevel_page_bp-general-settings.wp-has-current-submenu .wp-menu-image a {
    39             background-position: -1px 0;
    40         }
    41 
    42         /* Activity Icon */
    43         ul#adminmenu li.toplevel_page_bp-activity .wp-menu-image a img { display: none; }
    44         ul#adminmenu li.toplevel_page_bp-activity .wp-menu-image a { background-image: url( <?php echo plugins_url( 'buddypress/bp-core/images/admin_menu_icon.png' ) ?> ) !important; background-position: -1px -32px; }
    45         ul#adminmenu li.toplevel_page_bp-activity:hover .wp-menu-image a,
    46         ul#adminmenu li.toplevel_page_bp-activity.wp-has-current-submenu .wp-menu-image a {
    47             background-position: -1px 0;
    48         }
    49     </style>
    50 
    51 <?php
    52 }
    53 add_action( 'admin_head', 'bp_core_admin_menu_icon_css' );
    544
    555function bp_core_confirmation_js() {
Note: See TracChangeset for help on using the changeset viewer.