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 WP Statuses for custom Post Types. | |
| * | |
| * @link http://github.com/imath/wp-statuses | |
| */ | |
| // Exit if accessed directly. | |
| 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 | |
| /** | |
| * Filter hook to enable the Retraceur Cœur 1 click upgrade during 2.0.0 betatests. | |
| * | |
| * You can use a `/wp-content/mu-plugins/index.php` file to always run this code into your Retraceur instance. | |
| */ | |
| add_filter( 'retraceur_betatest_direct_updates', '__return_true' ); |
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 | |
| /** | |
| * Custom functions. | |
| * | |
| * You can use a `/mu-plugins/functions.php` file to always run this code into your Retraceur instance. | |
| */ | |
| // Bring back WP regular registration workflow. | |
| add_filter( 'retraceur_create_account_on_signup', '__return_true' ); |
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 disable_bp_signups() { | |
| add_filter( 'bp_get_signup_allowed', '__return_false' ); | |
| remove_filter( 'register_url', 'bp_get_signup_page' ); | |
| remove_action( 'bp_init', 'bp_core_wpsignup_redirect' ); | |
| remove_filter( 'wp_signup_location', 'bp_blogs_creation_location' ); | |
| remove_filter( 'wpmu_signup_user_notification', 'bp_core_activation_signup_user_notification', 1 ); | |
| } | |
| add_action( 'bp_include', 'disable_bp_signups' ); |
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 | |
| /** | |
| * 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 | |
| /** | |
| * Créer deux nouveaux types de membre par exemple `gentlemen` et `ladies`. | |
| * Se reporter à cette documentation: https://bpdevel.wordpress.com/2020/09/21/bp-types-admin-ui/ | |
| * | |
| * Affecter ces types de membre aux utilisateurs | |
| * Utiliser le code ci-dessous pour personnaliser le répertoire des membres en fonction du type | |
| * de membre de l'utilisateur connecté. | |
| * | |
| * Se reporter à cette documentation pour la mise en place du fichier `bp-custom.php`: |
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 | |
| /** | |
| * Custom function file. | |
| * | |
| * Put a file called `bp-custom.php` into your /wp-content/plugins folder. | |
| */ | |
| // 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 | |
| /*** beginning of the code to paste in your functions.php ***/ | |
| function imath_pm_button_only_if_friends( $button ) { | |
| if( is_super_admin() ) | |
| return $button; | |
| if( 'is_friend' != friends_check_friendship_status( bp_displayed_user_id(), bp_loggedin_user_id() ) ) | |
| return false; |
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 | |
| /** | |
| * BP Attachments overrides. | |
| */ | |
| // Exit if accessed directly. | |
| if ( ! defined( 'ABSPATH' ) ) { | |
| exit; | |
| } |
NewerOlder