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
<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
<?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
function pp_check_group_name( $group_new ) { | |
if ( 'group-details' == bp_get_groups_current_create_step() ) { | |
$args = array( | |
'per_page' => null, | |
'populate_extras' => false, | |
'update_meta_cache' => false | |
); |
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
<?php | |
// add the custom column header | |
function philopress_modify_user_columns($column_headers) { | |
$column_headers['extended'] = 'Meta Fields'; | |
return $column_headers; | |
} | |
add_action('manage_users_page_bp-signups_columns','philopress_modify_user_columns'); |
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 shanebp_user_groups(){ | |
$group_ids = groups_get_user_groups( bp_get_member_user_id() ); | |
foreach( $group_ids["groups"] as $id ) { | |
$group = groups_get_group( array( 'group_id' => $id ) ); | |
echo '<a href=' . trailingslashit( bp_get_groups_directory_permalink() . $group->slug . '/' ) . '>' . $group->name . '<a/><br>'; |
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
be specific re php version: sudo apt-get install php7.0-tidy | |
vagrant@vvv:~$ sudo apt-get install php-tidy | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
The following extra packages will be installed: | |
libtidy5 php7.1-common php7.1-tidy | |
The following NEW packages will be installed: | |
libtidy5 php-tidy php7.1-common php7.1-tidy |
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 add_members_directory_tab_nouveau( $nav_items ) { | |
$nav_items['custom'] = array( | |
'component' => 'members', | |
'slug' => 'custom', | |
'li_class' => array('custom no-ajax'), | |
'link' => trailingslashit( bp_get_members_directory_permalink() . 'custom' ), | |
'text' => __( 'Custom', 'buddypress' ), | |
'count' => false, | |
'position' => 15.8, |