Skip to:
Content

BuddyPress.org


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

Introduce _has_directory() functions for forums, groups, members, and activity components. This replaces the need for enabling/disabling the forum directory, since if it is not set it does not exist.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-admin.php

    r4559 r4596  
    11<?php
     2
     3/**
     4 * Creates the administration interface menus and checks to see if the DB
     5 * tables are set up.
     6 *
     7 * @package BuddyPress XProfile
     8 * @global object $bp Global BuddyPress settings object
     9 * @global $wpdb WordPress DB access object.
     10 * @uses is_super_admin() returns true if the current user is a site admin, false if not
     11 * @uses bp_xprofile_install() runs the installation of DB tables for the xprofile component
     12 * @uses wp_enqueue_script() Adds a JS file to the JS queue ready for output
     13 * @uses add_submenu_page() Adds a submenu tab to a top level tab in the admin area
     14 * @uses xprofile_install() Runs the DB table installation function
     15 * @return
     16 */
     17function xprofile_add_admin_menu() {
     18    global $wpdb, $bp;
     19
     20    if ( !is_super_admin() )
     21        return false;
     22
     23    $hook = add_options_page( __( 'Profiles Fields', 'buddypress' ), __( 'Profile Fields', 'buddypress' ), 'manage_options', 'bp-profile-setup', 'xprofile_admin' );
     24   
     25    add_action( "admin_print_styles-$hook", 'bp_core_add_admin_menu_styles' );
     26}
     27add_action( bp_core_admin_hook(), 'xprofile_add_admin_menu' );
    228
    329/**
Note: See TracChangeset for help on using the changeset viewer.