This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Tu peux tester en créant un fichier bp-custom.php dans ton répertoire plugins | |
* @see http://codex.buddypress.org/plugindev/bp-custom-php/ | |
*/ | |
/****************************************************************** | |
* 1/ filter par rapport à un couple meta_key/meta_value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Override BuddyDrive default css by filtering buddydrive_global_css | |
* | |
* The array to return needs to be like : | |
* | |
* array( | |
* 'stylesheet_uri' => url to the new css file | |
* 'deps' => array of registered css dependencies | |
* ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! class_exists( 'Imath_Auto_Join_Groups' ) ) : | |
/** | |
* AutoJoin new members to chosen groups | |
* | |
* This is a little snippet, feel free to : | |
* - use it | |
* - extend it.. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function restrict_to_a_role() { | |
if ( ! bp_is_user() || buddydrive_get_slug() != bp_current_component() ) { | |
return; | |
} | |
// Change 'bp_moderate' with the capability of your choice | |
if ( ! bp_current_user_can( 'bp_moderate' ) ) { | |
// Remove actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** You could put this in the bp-custom.php file | |
* @see http://codex.buddypress.org/themes/bp-custom-php/ | |
*/ | |
function custom_bbpress_maybe_load_mentions_scripts( $retval = false ) { | |
if ( function_exists( 'bbpress' ) && is_bbpress() ) { | |
$retval = true; | |
} | |
return $retval; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WP Idea Stream Custom. | |
* | |
* Place here the function to customize Version 2.0+ of WP Idea Stream | |
*/ | |
// Exit if accessed directly | |
if ( ! defined( 'ABSPATH' ) ) exit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Name me as wp-idea-stream-custom.php | |
* and put me in /wp-content/plugins/ | |
*/ | |
function qobalt_remove_hashbuddy_filter() { | |
if ( ! wp_idea_stream_is_single_idea() ) { | |
return; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Filter the available status to add a custom one | |
* | |
* Requires buddy-bbpress-support topic plugin | |
* bbPress 2.5+ | |
* WordPress 4.0 | |
* | |
* @param array $allstatus the available status |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Using BuddyPress Member types API | |
* | |
* see codex: https://codex.buddypress.org/developer/member-types/ | |
* | |
* Required config: | |
* - WordPress 4.1 | |
* - BuddyPress 2.2 | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This is temparary, please advise the plugin author to use the BP_Component Class | |
* @see https://github.com/boonebgorges/buddypress-skeleton-component/blob/1.7/includes/bp-example-loader.php | |
*/ | |
function buddypress_links_temporary_fix( $retval, $component = '' ) { | |
if ( 'links' != $component ) { |