This file contains 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
re: http://buddypress.org/support/topic/show-only-members-with-avatars-on-member-loop/ | |
untested, but cleaned up... | |
/********* SEARCH MEMBERS BASED ON PROFILE FIELDS *********/ | |
function gd_custom_ids( $field_name, $field_value = '' ) { | |
if ( empty( $field_name ) ) | |
return ''; | |
This file contains 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 ( bp_has_groups( 'type=alphabetical&user_id=' . bp_loggedin_user_id() ) ) : ?> | |
<ul> | |
<?php while ( bp_groups() ) : bp_the_group(); ?> | |
<?php if( bp_get_group_creator_id() != bp_loggedin_user_id() ) : ?> | |
<li> | |
<div> | |
<a href="<?php bp_group_permalink() ?>"><?php bp_group_avatar_thumb() ?></a> | |
</div> |
This file contains 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
// change the Howdy and Name links so they don't go to profile/edit | |
function wp_admin_bar_my_custom_account_menu( $wp_admin_bar ) { | |
$user_id = get_current_user_id(); | |
$current_user = wp_get_current_user(); | |
$profile_url = bp_loggedin_user_domain(); | |
if ( 0 != $user_id ) { | |
$avatar = get_avatar( $user_id, 28 ); | |
$howdy = sprintf( __('Welcome, %1$s'), $current_user->display_name ); | |
$class = empty( $avatar ) ? '' : 'with-avatar'; |
This file contains 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
function create_post_type_resource() { | |
register_post_type( 'resource', | |
array( | |
'labels' => array( | |
'name' => __( 'Resources' ), | |
'singular_name' => __( 'Resource' ), | |
'add_new' => __( 'Add New' ), | |
'add_new_item' => __( 'Add New Resource' ), | |
'edit' => __( 'Edit' ), | |
'edit_item' => __( 'Edit Resource' ), |
This file contains 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
//within the plugin and within the Extension class | |
function edit_screen() { | |
... | |
<?php if ( is_user_logged_in() && function_exists( 'bp_delete_test_page_link' ) ) : ?> | |
<a class="button confirm" href="<?php bp_delete_test_page_link(); ?>">Delete Test Page</a> | |
<?php endif; ?> | |
... | |
} |
This file contains 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
<div id="message-thread"> | |
<?php | |
/** | |
* Fires before the display of a single member message thread content. | |
* | |
* @since BuddyPress (1.1.0) | |
*/ | |
do_action( 'bp_before_message_thread_content' ); ?> |
This file contains 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
// add 7 hours in the filters below | |
function shane_local_time( $timestamp ) { | |
$unixTimestamp = strtotime( $timestamp ); | |
$unixTimestamp = $unixTimestamp + (7 * 3600); | |
$filtered_time = date("Y-m-d H:i:s", $unixTimestamp); | |
return $filtered_time; |
This file contains 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 | |
/* plugin name: BP Email Debug */ | |
add_action( 'bp_send_email_failure', 'pg_bp25_email_debug_failure', 10, 2 ); | |
add_action( 'bp_send_email_success', 'pg_bp25_email_debug_success', 10, 2 ); | |
function pg_bp25_email_debug_failure( $status, $email ) { | |
$email_admin = bp_get_option( 'admin_email' ); | |
if ( is_wp_error( $status ) ) { |
This file contains 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 | |
// add tab 'Testo' on Members Directory Page | |
function asdf_testo_tab() { | |
if ( ! bp_current_component( 'members' ) ) | |
return; | |
if ( bp_is_current_action( 'testo' ) ) |
This file contains 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
function filter_message_button_link( $link ) { | |
$link = wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . bp_core_get_username( bp_get_member_user_id() ) ); | |
return $link; | |
} | |
function display_private_message_button() { | |
if( bp_get_member_user_id() != bp_loggedin_user_id() ) { | |
bp_send_message_button(); | |
add_filter('bp_get_send_private_message_link', 'filter_message_button_link', 1, 1 ); |
OlderNewer