mirror of
https://gh.wpcy.net/https://github.com/buddypress/buddypress.git
synced 2026-05-31 04:56:13 +08:00
You should install all BuddyPress component plugin files in /wp-content/plugins/buddypress/ however you can call the "buddypress" dir anything you like. BuddyPress plugins can then be activated and deactivated through the "Plugins" admin panel. If you are upgrading to this version please move all BuddyPress plugins to the location mentioned above and then update. You will also need to make sure your themes reference the new locations. There are two constants you should use "BP_PLUGIN_DIR" and "BP_PLUGIN_URL". You will need to re-activate the plugins via the "Plugins" admin panel. Again, from now on BuddyPress will ONLY work with WPMU 2.7.1+ so please use the 2.7 branch from the WordPress MU SVN repo. Link: http://trac.mu.wordpress.org/browser/branches/2.7 git-svn-id: https://buddypress.svn.wordpress.org/trunk@1303 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
36 lines
No EOL
1.2 KiB
PHP
36 lines
No EOL
1.2 KiB
PHP
<?php
|
|
/**************************************************************************
|
|
groups_add_js()
|
|
|
|
Inserts the Javascript needed for managing groups.
|
|
**************************************************************************/
|
|
|
|
function groups_add_js() {
|
|
global $bp;
|
|
|
|
if ( $bp->current_component == $bp->groups->slug )
|
|
wp_enqueue_script( 'bp-groups-js', BP_PLUGIN_URL . '/bp-groups/js/general.js' );
|
|
}
|
|
add_action( 'template_redirect', 'groups_add_js', 1 );
|
|
|
|
function groups_add_structure_css() {
|
|
/* Enqueue the structure CSS file to give basic positional formatting for components */
|
|
wp_enqueue_style( 'bp-groups-structure', BP_PLUGIN_URL . '/bp-groups/css/structure.css' );
|
|
}
|
|
add_action( 'bp_styles', 'groups_add_structure_css' );
|
|
|
|
function groups_add_cropper_js() {
|
|
global $bp, $create_group_step;
|
|
|
|
if ( 3 == (int)$create_group_step || ( $bp->current_component == $bp->groups->slug && $bp->action_variables[0] == 'group-avatar' ) ) {
|
|
wp_enqueue_script('jquery');
|
|
wp_enqueue_script('prototype');
|
|
wp_enqueue_script('scriptaculous-root');
|
|
wp_enqueue_script('cropper');
|
|
add_action( 'wp_head', 'bp_core_add_cropper_js' );
|
|
}
|
|
}
|
|
add_action( 'template_redirect', 'groups_add_cropper_js', 1 );
|
|
|
|
|
|
?>
|