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 | |
| /** | |
| * Build a custom more link for Ideas | |
| * | |
| * This is to be used with WP Idea Stream < 2.3.0 | |
| * | |
| * @param string $more | |
| * @return string the more link | |
| */ | |
| function to_use_till_you_upgraded_to_WP_4_4_and_WP_Idea_Stream_2_3( $more = '' ) { |
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 test_bp_message_compose() { | |
| // Always check the editor is available to prevent fatals! | |
| if ( bp_is_my_profile() && function_exists( 'buddydrive_editor' ) ) { | |
| // 'message_content' is the id attribute of the textarea to send private messages | |
| buddydrive_editor( 'message_content' ); | |
| } | |
| } | |
| add_action( 'bp_after_messages_compose_content', 'test_bp_message_compose' ); |
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 job_listing_activity_args() { | |
| if ( ! bp_is_active( 'activity' ) ) { | |
| return; | |
| } | |
| add_post_type_support( 'job_listing', 'buddypress-activity' ); | |
| bp_activity_set_post_type_tracking_args( 'job_listing', array( |
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 | |
| // Exit if accessed directly | |
| defined( 'ABSPATH' ) || exit; | |
| /** | |
| * This will only get the displayed group's menu items | |
| * 1/ if a group is displayed | |
| * 2/ if the theme is containing the template 'buddypress/groups/single/home.php' | |
| * 3/ if the theme's template replaced <ul><?php bp_get_options_nav();?></ul> by <?php bp_nav_menu();?> | |
| */ |
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 querystring when on the activity directory | |
| * | |
| * @param string/array $query_string component loop arguments | |
| * @param sting $object component name | |
| * @return string the edited query string | |
| */ | |
| function bphelp_ajax_querystring( $query_string, $object ) { |
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 | |
| // Exit if accessed directly | |
| if ( ! defined( 'ABSPATH' ) ) exit; | |
| /** | |
| * Replace the author avatar by the first image found in the idea content | |
| * if no image was found keep the avatar. | |
| */ | |
| function first_idea_image_as_avatar( $avatar_link, $author, $avatar, $idea ) { | |
| if ( empty( $idea->post_content ) ) { |
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 ) { |
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 | |
| /** | |
| * 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 |