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 | |
| /** | |
| * 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 | |
| /** 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 | |
| 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 | |
| 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 | |
| /** | |
| * 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 | |
| /** | |
| * 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 | |
| /** | |
| * Il y a effectivement un problème avec l'utilisation de bp_member_profile_data() | |
| * dans le Members loop @see https://buddypress.trac.wordpress.org/ticket/4891 | |
| * | |
| * J'avais indiqué un moyen de contournement sur le forum de BuddyPress.org | |
| * @see http://buddypress.org/support/topic/possible-bug-with-bp_member_profile_data-and-date-selector/ | |
| * | |
| * Dans le cas présent, je pense qu'il est de toute façon plus judicieux d'utiliser xprofile_get_field_data | |
| * tout en désactivant réactivant le filtre xprofile_filter_format_field_value_by_field_id pour disposer de la |
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 | |
| /** | |
| Seulement visible pour les utilisateurs connectés | |
| Portion de code à mettre dans bp-custom.php | |
| Voir le codex: http://codex.buddypress.org/plugindev/bp-custom-php/ | |
| **/ | |
| function check_is_user_logged_in() { | |
| if ( ! is_buddypress() ) | |
| 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 | |
| /** | |
| * Script to copy in your activated theme functions.php for instance | |
| * Make sure BuddyPress and Events Manager are activated on your blog before using this trick | |
| */ | |
| // beginning of the code to copy paste | |
| function imath_displays_confirmed_attendees( $output = '', $object = false, $target = '' ) { |