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; | |
remove_action( 'bp_core_loaded', 'bp_core_load_buddypress_textdomain' ); | |
add_action( 'bp_loaded', 'bp_core_load_buddypress_textdomain', 0 ); |
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 | |
/** | |
* BuddyPress 2.6.0 introduced a new nav API | |
* with a Backcompat mechanism. But accessing/editing | |
* deprecated globals can lead to such problems... | |
* | |
* It's too bad Theme designers forget to test betas :) | |
*/ | |
function strothi_profile_primary_nav_first() { |
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 turker_remove_group_admin_tab() { | |
if ( ! bp_is_group() || ! ( bp_is_current_action( 'admin' ) && bp_action_variable( 0 ) ) || is_super_admin() ) { | |
return; | |
} | |
// Add the admin subnav slug you want to hide in the | |
// following array | |
$hide_tabs = 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 | |
/** | |
* If you don't know how to create/use the bp-custom.php file, please read: | |
* https://codex.buddypress.org/themes/bp-custom-php/ | |
*/ | |
// Exit if accessed directly | |
if ( ! defined( 'ABSPATH' ) ) exit; | |
/** | |
* This is just crazy imho! |
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 | |
/** | |
* BuddyPress customs | |
*/ | |
// Exit if accessed directly. | |
defined( 'ABSPATH' ) || exit; | |
/** | |
* Watch this video https://vimeo.com/166707145 |
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 | |
/** | |
* Read about how to use the wp-idea-stream-custom.php file here: | |
* https://github.com/imath/wp-idea-stream/wiki/wp-idea-stream-custom.php | |
*/ | |
function pc1271_replace_avatar_with_featured_image( $output, $author, $avatar, $idea ) { | |
if ( ! wp_idea_stream_featured_images_allowed() || ! current_theme_supports( 'post-thumbnails' ) ) { | |
return $output; |
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 | |
/** | |
* Get the required cap. | |
* | |
* For info about Capabilities | |
* @see https://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table | |
*/ | |
function wpsouf_get_required_capability() { | |
return 'manage_options'; | |
} |
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 | |
/** | |
* See https://wordpress.org/support/topic/adding-idea-title-to-buddypress-activity-stream | |
*/ | |
function jasonverdelli_set_wp_idea_stream_activity_actions( $wp_idea_stream_activity_actions = array() ) { | |
if ( ! empty( $wp_idea_stream_activity_actions['new_' . wp_idea_stream_get_post_type() ] ) ) { | |
$wp_idea_stream_activity_actions['new_' . wp_idea_stream_get_post_type() ]->action_callback = 'jasonverdelli_format_idea_activity_action'; | |
} |
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' ); |