Changeset 7756
- Timestamp:
- 01/24/2014 11:48:48 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-admin.php
r7580 r7756 190 190 */ 191 191 function bp_activity_admin_load() { 192 global $bp, $bp_activity_list_table; 192 global $bp_activity_list_table; 193 194 $bp = buddypress(); 193 195 194 196 // Decide whether to load the dev version of the CSS and JavaScript … … 277 279 278 280 // Enqueue CSS and JavaScript 279 wp_enqueue_script( 'bp_activity_admin_js', BP_PLUGIN_URL. "bp-activity/admin/js/admin.{$min}js", array( 'jquery', 'wp-ajax-response' ), bp_get_version(), true );280 wp_enqueue_style( 'bp_activity_admin_css', BP_PLUGIN_URL. "bp-activity/admin/css/admin.{$min}css", array(), bp_get_version() );281 wp_enqueue_script( 'bp_activity_admin_js', $bp->plugin_url . "bp-activity/admin/js/admin.{$min}js", array( 'jquery', 'wp-ajax-response' ), bp_get_version(), true ); 282 wp_enqueue_style( 'bp_activity_admin_css', $bp->plugin_url . "bp-activity/admin/css/admin.{$min}css", array(), bp_get_version() ); 281 283 282 284 // Handle spam/un-spam/delete of activities -
trunk/bp-activity/bp-activity-loader.php
r7454 r7756 25 25 * @since BuddyPress (1.5) 26 26 */ 27 function __construct() {27 public function __construct() { 28 28 parent::start( 29 29 'activity', 30 30 __( 'Activity Streams', 'buddypress' ), 31 BP_PLUGIN_DIR,31 buddypress()->plugin_dir, 32 32 array( 33 33 'adminbar_myaccount_order' => 10 -
trunk/bp-activity/bp-activity-template.php
r7751 r7756 1778 1778 // have the new template) will still work. 1779 1779 if ( !$template ) { 1780 $template = BP_PLUGIN_DIR. '/bp-themes/bp-default/activity/comment.php';1780 $template = buddypress()->plugin_dir . '/bp-themes/bp-default/activity/comment.php'; 1781 1781 } 1782 1782 -
trunk/bp-blogs/bp-blogs-loader.php
r7555 r7756 20 20 * @since BuddyPress (1.5.0) 21 21 */ 22 function __construct() {22 public function __construct() { 23 23 parent::start( 24 24 'blogs', 25 25 __( 'Site Tracking', 'buddypress' ), 26 BP_PLUGIN_DIR,26 buddypress()->plugin_dir, 27 27 array( 28 28 'adminbar_myaccount_order' => 30 -
trunk/bp-core/admin/bp-core-components.php
r7614 r7756 248 248 249 249 // Save settings and upgrade schema 250 require_once( BP_PLUGIN_DIR. '/bp-core/admin/bp-core-schema.php' );250 require_once( $bp->plugin_dir . '/bp-core/admin/bp-core-schema.php' ); 251 251 252 252 $submitted = stripslashes_deep( $_POST['bp_components'] ); -
trunk/bp-core/bp-core-adminbar.php
r7720 r7756 103 103 104 104 // Toolbar styles 105 $stylesheet = BP_PLUGIN_URL. "bp-core/css/admin-bar{$min}.css";105 $stylesheet = buddypress()->plugin_url . "bp-core/css/admin-bar{$min}.css"; 106 106 107 107 wp_enqueue_style( 'bp-admin-bar', apply_filters( 'bp_core_admin_bar_css', $stylesheet ), array( 'admin-bar' ), bp_get_version() ); -
trunk/bp-core/bp-core-avatars.php
r7585 r7756 13 13 function bp_core_set_avatar_constants() { 14 14 15 $bp = buddypress(); 16 15 17 if ( !defined( 'BP_AVATAR_THUMB_WIDTH' ) ) 16 18 define( 'BP_AVATAR_THUMB_WIDTH', 50 ); … … 29 31 30 32 if ( !defined( 'BP_AVATAR_ORIGINAL_MAX_FILESIZE' ) ) { 31 32 $bp = buddypress();33 33 34 34 if ( !isset( $bp->site_options['fileupload_maxk'] ) ) { … … 40 40 41 41 if ( !defined( 'BP_AVATAR_DEFAULT' ) ) 42 define( 'BP_AVATAR_DEFAULT', BP_PLUGIN_URL. 'bp-core/images/mystery-man.jpg' );42 define( 'BP_AVATAR_DEFAULT', $bp->plugin_url . 'bp-core/images/mystery-man.jpg' ); 43 43 44 44 if ( !defined( 'BP_AVATAR_DEFAULT_THUMB' ) ) 45 define( 'BP_AVATAR_DEFAULT_THUMB', BP_PLUGIN_URL. 'bp-core/images/mystery-man-50.jpg' );45 define( 'BP_AVATAR_DEFAULT_THUMB', $bp->plugin_url . 'bp-core/images/mystery-man-50.jpg' ); 46 46 47 47 if ( ! defined( 'BP_SHOW_AVATARS' ) ) { … … 472 472 // No avatar was found, and we've been told not to use a gravatar. 473 473 } else { 474 $gravatar = apply_filters( "bp_core_default_avatar_$object", BP_PLUGIN_URL. 'bp-core/images/mystery-man.jpg', $params );474 $gravatar = apply_filters( "bp_core_default_avatar_$object", $bp->plugin_url . 'bp-core/images/mystery-man.jpg', $params ); 475 475 } 476 476 -
trunk/bp-core/bp-core-buddybar.php
r7434 r7756 700 700 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 701 701 702 if ( file_exists( get_stylesheet_directory() . '/_inc/css/adminbar.css' ) ) // Backwards compatibility702 if ( file_exists( get_stylesheet_directory() . '/_inc/css/adminbar.css' ) ) { // Backwards compatibility 703 703 $stylesheet = get_stylesheet_directory_uri() . '/_inc/css/adminbar.css'; 704 else 705 $stylesheet = BP_PLUGIN_URL . "bp-core/css/buddybar{$min}.css"; 704 } else { 705 $stylesheet = buddypress()->plugin_url . "bp-core/css/buddybar{$min}.css"; 706 } 706 707 707 708 wp_enqueue_style( 'bp-admin-bar', apply_filters( 'bp_core_buddybar_rtl_css', $stylesheet ), array(), bp_get_version() ); -
trunk/bp-core/bp-core-loader.php
r7521 r7756 22 22 * @uses BP_Core::bootstrap() 23 23 */ 24 function __construct() {24 public function __construct() { 25 25 parent::start( 26 26 'core', 27 __( 'BuddyPress Core', 'buddypress' ) 28 , BP_PLUGIN_DIR27 __( 'BuddyPress Core', 'buddypress' ), 28 buddypress()->plugin_dir 29 29 ); 30 30 … … 96 96 97 97 // Loop through optional components 98 foreach( $bp->optional_components as $component ) 99 if ( bp_is_active( $component ) && file_exists( BP_PLUGIN_DIR . '/bp-' . $component . '/bp-' . $component . '-loader.php' ) ) 100 include( BP_PLUGIN_DIR . '/bp-' . $component . '/bp-' . $component . '-loader.php' ); 98 foreach( $bp->optional_components as $component ) { 99 if ( bp_is_active( $component ) && file_exists( $bp->plugin_dir . '/bp-' . $component . '/bp-' . $component . '-loader.php' ) ) { 100 include( $bp->plugin_dir . '/bp-' . $component . '/bp-' . $component . '-loader.php' ); 101 } 102 } 101 103 102 104 // Loop through required components 103 foreach( $bp->required_components as $component ) 104 if ( file_exists( BP_PLUGIN_DIR . '/bp-' . $component . '/bp-' . $component . '-loader.php' ) ) 105 include( BP_PLUGIN_DIR . '/bp-' . $component . '/bp-' . $component . '-loader.php' ); 105 foreach( $bp->required_components as $component ) { 106 if ( file_exists( $bp->plugin_dir . '/bp-' . $component . '/bp-' . $component . '-loader.php' ) ) { 107 include( $bp->plugin_dir . '/bp-' . $component . '/bp-' . $component . '-loader.php' ); 108 } 109 } 106 110 107 111 // Add Core to required components -
trunk/bp-core/bp-core-update.php
r7551 r7756 195 195 ) ); 196 196 197 require_once( BP_PLUGIN_DIR. '/bp-core/admin/bp-core-schema.php' );197 require_once( buddypress()->plugin_dir . '/bp-core/admin/bp-core-schema.php' ); 198 198 199 199 // Install BP schema and activate only Activity and XProfile -
trunk/bp-core/bp-core-widgets.php
r7485 r7756 157 157 if ( is_active_widget( false, false, $this->id_base ) && !is_admin() && !is_network_admin() ) { 158 158 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 159 wp_enqueue_script( 'bp_core_widget_members-js', BP_PLUGIN_URL. "bp-core/js/widget-members{$min}.js", array( 'jquery' ), bp_get_version() );159 wp_enqueue_script( 'bp_core_widget_members-js', buddypress()->plugin_url . "bp-core/js/widget-members{$min}.js", array( 'jquery' ), bp_get_version() ); 160 160 } 161 161 } -
trunk/bp-forums/bp-forums-bbpress-sa.php
r7468 r7756 16 16 */ 17 17 function bp_forums_load_bbpress() { 18 global $ bp, $wpdb, $wp_roles, $current_user, $wp_users_object;18 global $wpdb, $wp_roles, $current_user, $wp_users_object; 19 19 global $bb, $bbdb, $bb_table_prefix, $bb_current_user; 20 20 global $bb_roles, $wp_taxonomy_object, $bb_queries; 21 21 22 22 // Return if we've already run this function. 23 23 if ( is_object( $bbdb ) ) … … 27 27 return false; 28 28 29 define( 'BB_PATH', BP_PLUGIN_DIR . '/bp-forums/bbpress/' ); 30 define( 'BACKPRESS_PATH', BP_PLUGIN_DIR . '/bp-forums/bbpress/bb-includes/backpress/' ); 31 define( 'BB_URL', BP_PLUGIN_URL . 'bp-forums/bbpress/' ); 29 $bp = buddypress(); 30 31 define( 'BB_PATH', $bp->plugin_dir . '/bp-forums/bbpress/' ); 32 define( 'BACKPRESS_PATH', $bp->plugin_dir . '/bp-forums/bbpress/bb-includes/backpress/' ); 33 define( 'BB_URL', $bp->plugin_url . 'bp-forums/bbpress/' ); 32 34 define( 'BB_INC', 'bb-includes/' ); 33 35 -
trunk/bp-forums/bp-forums-loader.php
r7554 r7756 23 23 * @since BuddyPress (1.5.0) 24 24 */ 25 function __construct() {25 public function __construct() { 26 26 parent::start( 27 27 'forums', 28 28 __( 'Discussion Forums', 'buddypress' ), 29 BP_PLUGIN_DIR,29 buddypress()->plugin_dir, 30 30 array( 31 31 'adminbar_myaccount_order' => 80 -
trunk/bp-forums/deprecated/1.6.php
r7213 r7756 192 192 193 193 default: 194 if ( !file_exists( BP_PLUGIN_DIR. '/bp-forums/bbpress/' ) ) { ?>194 if ( !file_exists( buddypress()->plugin_dir . '/bp-forums/bbpress/' ) ) { ?> 195 195 196 196 <div id="message" class="error"> -
trunk/bp-forums/deprecated/1.7.php
r7213 r7756 55 55 56 56 function bp_forums_bbpress_install( $location = '' ) { 57 global $wpdb, $bbdb , $bp;57 global $wpdb, $bbdb; 58 58 59 59 check_admin_referer( 'bp_forums_new_install_init' ); … … 63 63 } 64 64 65 $bp = buddypress(); 66 65 67 // Create the bb-config.php file 66 68 $initial_write = bp_forums_bbpress_write( 67 BP_PLUGIN_DIR. '/bp-forums/bbpress/bb-config-sample.php',69 $bp->plugin_dir . '/bp-forums/bbpress/bb-config-sample.php', 68 70 $location, 69 71 array( … … 97 99 $file .= "\n" . '$bb->custom_user_table = \'' . $wpdb->users . '\';'; 98 100 $file .= "\n" . '$bb->custom_user_meta_table = \'' . $wpdb->usermeta . '\';'; 99 $file .= "\n\n" . '$bb->uri = \'' . BP_PLUGIN_URL. '/bp-forums/bbpress/\';';101 $file .= "\n\n" . '$bb->uri = \'' . $bp->plugin_url . '/bp-forums/bbpress/\';'; 100 102 $file .= "\n" . '$bb->name = \'' . get_blog_option( bp_get_root_blog_id(), 'blogname' ) . ' ' . __( 'Forums', 'buddypress' ) . '\';'; 101 103 -
trunk/bp-friends/bp-friends-loader.php
r7558 r7756 19 19 * @since BuddyPress (1.5.0) 20 20 */ 21 function __construct() {21 public function __construct() { 22 22 parent::start( 23 23 'friends', 24 24 __( 'Friend Connections', 'buddypress' ), 25 BP_PLUGIN_DIR,25 buddypress()->plugin_dir, 26 26 array( 27 27 'adminbar_myaccount_order' => 60 -
trunk/bp-friends/bp-friends-widgets.php
r7644 r7756 60 60 61 61 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 62 wp_enqueue_script( 'bp_core_widget_friends-js', BP_PLUGIN_URL. "bp-friends/js/widget-friends{$min}.js", array( 'jquery' ), bp_get_version() );62 wp_enqueue_script( 'bp_core_widget_friends-js', buddypress()->plugin_url . "bp-friends/js/widget-friends{$min}.js", array( 'jquery' ), bp_get_version() ); 63 63 64 64 $user_id = bp_displayed_user_id(); -
trunk/bp-groups/bp-groups-admin.php
r7720 r7756 69 69 * @since BuddyPress (1.7.0) 70 70 * 71 * @global object $bp BuddyPress global settings72 71 * @global BP_Groups_List_Table $bp_groups_list_table Groups screen list table 73 72 */ … … 167 166 } 168 167 168 $bp = buddypress(); 169 169 170 // Enqueue CSS and JavaScript 170 wp_enqueue_script( 'bp_groups_admin_js', BP_PLUGIN_URL. "bp-groups/admin/js/admin.{$min}js", array( 'jquery', 'wp-ajax-response', 'jquery-ui-autocomplete' ), bp_get_version(), true );171 wp_enqueue_style( 'bp_groups_admin_css', BP_PLUGIN_URL. "bp-groups/admin/css/admin.{$min}css", array(), bp_get_version() );171 wp_enqueue_script( 'bp_groups_admin_js', $bp->plugin_url . "bp-groups/admin/js/admin.{$min}js", array( 'jquery', 'wp-ajax-response', 'jquery-ui-autocomplete' ), bp_get_version(), true ); 172 wp_enqueue_style( 'bp_groups_admin_css', $bp->plugin_url . "bp-groups/admin/css/admin.{$min}css", array(), bp_get_version() ); 172 173 173 174 wp_localize_script( 'bp_groups_admin_js', 'BP_Group_Admin', array( -
trunk/bp-groups/bp-groups-loader.php
r7745 r7756 78 78 * @since BuddyPress (1.5) 79 79 */ 80 function __construct() {80 public function __construct() { 81 81 parent::start( 82 82 'groups', 83 83 __( 'User Groups', 'buddypress' ), 84 BP_PLUGIN_DIR,84 buddypress()->plugin_dir, 85 85 array( 86 86 'adminbar_myaccount_order' => 70 -
trunk/bp-groups/bp-groups-widgets.php
r7379 r7756 29 29 if ( is_active_widget( false, false, $this->id_base ) && !is_admin() && !is_network_admin() ) { 30 30 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 31 wp_enqueue_script( 'groups_widget_groups_list-js', BP_PLUGIN_URL. "bp-groups/js/widget-groups{$min}.js", array( 'jquery' ), bp_get_version() );31 wp_enqueue_script( 'groups_widget_groups_list-js', buddypress()->plugin_url . "bp-groups/js/widget-groups{$min}.js", array( 'jquery' ), bp_get_version() ); 32 32 } 33 33 } -
trunk/bp-loader.php
r7753 r7756 410 410 411 411 // Load the WP abstraction file so BuddyPress can run on all WordPress setups. 412 require( BP_PLUGIN_DIR. '/bp-core/bp-core-wpabstraction.php' );412 require( $this->plugin_dir . '/bp-core/bp-core-wpabstraction.php' ); 413 413 414 414 // Setup the versions (after we include multisite abstraction above) -
trunk/bp-members/bp-members-loader.php
r7738 r7756 19 19 * @since BuddyPress (1.5) 20 20 */ 21 function __construct() {21 public function __construct() { 22 22 parent::start( 23 23 'members', 24 24 __( 'Members', 'buddypress' ), 25 BP_PLUGIN_DIR,25 buddypress()->plugin_dir, 26 26 array( 27 27 'adminbar_myaccount_order' => 20 -
trunk/bp-members/bp-members-template.php
r7751 r7756 1139 1139 } 1140 1140 function bp_get_signup_avatar( $args = '' ) { 1141 global $bp;1141 $bp = buddypress(); 1142 1142 1143 1143 $defaults = array( … … 1170 1170 $default_grav = 'wavatar'; 1171 1171 else if ( 'mystery' == $bp->grav_default->user ) 1172 $default_grav = BP_PLUGIN_URL. 'bp-core/images/mystery-man.jpg';1172 $default_grav = $bp->plugin_url . 'bp-core/images/mystery-man.jpg'; 1173 1173 else 1174 1174 $default_grav = $bp->grav_default->user; -
trunk/bp-messages/bp-messages-cssjs.php
r6342 r7756 19 19 add_action( 'wp_head', 'messages_autocomplete_init_jsblock' ); 20 20 21 $bp = buddypress(); 21 22 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 22 wp_enqueue_script( 'bp-jquery-autocomplete', BP_PLUGIN_URL. "bp-messages/js/autocomplete/jquery.autocomplete{$min}.js", array( 'jquery' ), bp_get_version() );23 wp_enqueue_script( 'bp-jquery-autocomplete-fb', BP_PLUGIN_URL. "bp-messages/js/autocomplete/jquery.autocompletefb{$min}.js", array(), bp_get_version() );24 wp_enqueue_script( 'bp-jquery-bgiframe', BP_PLUGIN_URL. "bp-messages/js/autocomplete/jquery.bgiframe{$min}.js", array(), bp_get_version() );25 wp_enqueue_script( 'bp-jquery-dimensions', BP_PLUGIN_URL. "bp-messages/js/autocomplete/jquery.dimensions{$min}.js", array(), bp_get_version() );23 wp_enqueue_script( 'bp-jquery-autocomplete', $bp->plugin_url . "bp-messages/js/autocomplete/jquery.autocomplete{$min}.js", array( 'jquery' ), bp_get_version() ); 24 wp_enqueue_script( 'bp-jquery-autocomplete-fb', $bp->plugin_url . "bp-messages/js/autocomplete/jquery.autocompletefb{$min}.js", array(), bp_get_version() ); 25 wp_enqueue_script( 'bp-jquery-bgiframe', $bp->plugin_url . "bp-messages/js/autocomplete/jquery.bgiframe{$min}.js", array(), bp_get_version() ); 26 wp_enqueue_script( 'bp-jquery-dimensions', $bp->plugin_url . "bp-messages/js/autocomplete/jquery.dimensions{$min}.js", array(), bp_get_version() ); 26 27 } 27 28 } … … 32 33 if ( bp_is_messages_component() && bp_is_current_action( 'compose' ) ) { 33 34 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 34 wp_enqueue_style( 'bp-messages-autocomplete', BP_PLUGIN_URL. "bp-messages/css/autocomplete/jquery.autocompletefb{$min}.css", array(), bp_get_version() );35 wp_enqueue_style( 'bp-messages-autocomplete', buddypress()->plugin_url . "bp-messages/css/autocomplete/jquery.autocompletefb{$min}.css", array(), bp_get_version() ); 35 36 36 37 wp_print_styles(); -
trunk/bp-messages/bp-messages-loader.php
r7454 r7756 28 28 * @since BuddyPress (1.5) 29 29 */ 30 function __construct() {30 public function __construct() { 31 31 parent::start( 32 32 'messages', 33 33 __( 'Private Messages', 'buddypress' ), 34 BP_PLUGIN_DIR,34 buddypress()->plugin_dir, 35 35 array( 36 36 'adminbar_myaccount_order' => 50 -
trunk/bp-notifications/bp-notifications-loader.php
r7593 r7756 21 21 * @since BuddyPress (1.9.0) 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::start( 25 25 'notifications', 26 26 __( 'Notifications', 'buddypress' ), 27 BP_PLUGIN_DIR,27 buddypress()->plugin_dir, 28 28 array( 29 29 'adminbar_myaccount_order' => 30 -
trunk/bp-settings/bp-settings-loader.php
r7602 r7756 22 22 'settings', 23 23 __( 'Settings', 'buddypress' ), 24 BP_PLUGIN_DIR,24 buddypress()->plugin_dir, 25 25 array( 26 26 'adminbar_myaccount_order' => 100 -
trunk/bp-themes/bp-default/_inc/ajax.php
r7570 r7756 353 353 */ 354 354 if ( empty( $template ) ) 355 $template = BP_PLUGIN_DIR. '/bp-themes/bp-default/activity/comment.php';355 $template = buddypress()->plugin_dir . '/bp-themes/bp-default/activity/comment.php'; 356 356 357 357 load_template( $template, false ); -
trunk/bp-xprofile/bp-xprofile-cssjs.php
r6342 r7756 19 19 if ( !empty( $_GET['page'] ) && strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) { 20 20 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 21 wp_enqueue_style( 'xprofile-admin-css', BP_PLUGIN_URL. "bp-xprofile/admin/css/admin{$min}.css", array(), bp_get_version() );21 wp_enqueue_style( 'xprofile-admin-css', buddypress()->plugin_url . "bp-xprofile/admin/css/admin{$min}.css", array(), bp_get_version() ); 22 22 } 23 23 } … … 39 39 40 40 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 41 wp_enqueue_script( 'xprofile-admin-js', BP_PLUGIN_URL. "bp-xprofile/admin/js/admin{$min}.js", array( 'jquery', 'jquery-ui-sortable' ), bp_get_version() );41 wp_enqueue_script( 'xprofile-admin-js', buddypress()->plugin_url . "bp-xprofile/admin/js/admin{$min}.js", array( 'jquery', 'jquery-ui-sortable' ), bp_get_version() ); 42 42 } 43 43 } -
trunk/bp-xprofile/bp-xprofile-loader.php
r7747 r7756 36 36 * @since BuddyPress (1.5) 37 37 */ 38 function __construct() {38 public function __construct() { 39 39 parent::start( 40 40 'xprofile', 41 41 __( 'Extended Profiles', 'buddypress' ), 42 BP_PLUGIN_DIR,42 buddypress()->plugin_dir, 43 43 array( 44 44 'adminbar_myaccount_order' => 20
Note: See TracChangeset
for help on using the changeset viewer.