This documentation applies to bp-wire 1.1.3 or above.
Toc:-
- Slug Customization
- Changing Labels
- Enabling Group Wire
- Changing Wire link Position In navigation menu
- Post User wire message to activity stream
- Set Wire as default landing page
- Disabling profile wire
- Disabling notification
Slug Customization:-
[sourcecode language="php"]
define("BP_WIRE_SLUG","wall");
[/sourcecode]
Changing Labels:-
[sourcecode language="php"]
define("BP_WIRE_LABEL","Wall");//change it to anything
[/sourcecode]
Enabling Group Wire:-
[sourcecode language="php"]
add_filter("is_group_wire_enabled","enable_group_wire");
function enable_group_wire(){
return true;
}
[/sourcecode]
*Please Note, after enabling group wire, you must login to wordpress dashboard as administrator in order to get the tables created.
Change the Position of Wire in User profile navigation:-
[sourcecode language="php"]
define("BP_WIRE_POSITION",20);//change it to any integer value
[/sourcecode]
Change The Group Wire navigation link position:-
[sourcecode language="php"]
define("BP_GROUP_WIRE_POSITION",20);//change it to any integer value
[/sourcecode]
Post Wire message to activity stream(For user profile wire):-
[sourcecode language="php"] add_filter("xprofile_new_wire_post","bp_wire_post_to_activity"); function bp_wire_post_to_activity($wire){ global $bp; if(bp_is_home()) return; //post to activity $activity_action = sprintf( __( '%s wrote on the %s of %s:', 'bp-wire'), bp_core_get_userlink( $bp->loggedin_user->id ), strtolower(BP_WIRE_LABEL), bp_core_get_userlink( $bp->displayed_user->id ) , bp_core_get_user_displayname($bp->displayed_user->id) . '</a>' ); $activity_content .= '<blockquote>' . bp_create_excerpt( attribute_escape( $wire->content ) ) . '</blockquote>'; xprofile_record_activity( array( 'action' => apply_filters( 'profile_activity_new_wire_post', $activity_action ), 'content' => apply_filters( 'profile_activity_new_wire_post', $activity_content ), 'primary_link' => apply_filters( 'profile_activity_new_wire_post_primary_link', bp_core_get_userlink( $bp->displayed_user->id ) ), 'type' => 'new_wire_post', 'item_id' => $bp->displayed_user->id, 'secondary_item_id' => $wire->id ) ); } [/sourcecode]Set Wire as the default landing page for User:-
[sourcecode language="php"] define("BP_DEFAULT_COMPONENT","wire");//"wire" is the slug of bp-wire, if you have changed the slug, please use the correct one here [/sourcecode]
Disable loading of css file from bp-wire plugin directory:-
[sourcecode language="php"] add_filter("bp_wire_load_css","stop_autoloading_wire_css"); function stop_autoloading_wire_css(){ return false; } [/sourcecode]