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 | |
/* | |
* | |
* place BP customizations in this here | |
* | |
*/ | |
define( 'BP_AVATAR_THUMB_WIDTH', 100 ); | |
define( 'BP_AVATAR_THUMB_HEIGHT', 100 ); | |
define( 'BP_AVATAR_FULL_WIDTH', 250 ); |
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 wds_filter_profile_url( $user_id = 0, $user_nicename = false, $user_login = false ) { | |
//var_dump( $user_nicename ); // this is user id even though it says nicename | |
// get user login do a str_replace for username? | |
$username = 'wewewewew'; | |
$after_domain = bp_core_enable_root_profiles() ? $username : bp_get_members_root_slug() . '/' . $username; |
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
jQuery( document ).ajaxComplete( function( evt, xhr, options ) { | |
var action = get_var_in_query( 'action', options.data ) ; | |
//switch | |
switch( action ){ | |
case 'post_update': | |
console.log('Activity was posted'); |
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 bpfr_hide_profile_field_group( $retval ) { | |
if ( bp_is_active( 'xprofile' ) ) : | |
// hide profile group/field to all except admin | |
if ( !is_super_admin() ) { | |
//exlude fields, separated by comma | |
$retval['exclude_fields'] = '1'; | |
//exlude field groups, separated by comma | |
$retval['exclude_groups'] = '1'; | |
} |
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 echo get_fav_or_unfav_button_for_post( $post ); ?> | |
function get_fav_or_unfav_button_for_post( $post ) { | |
global $bp, $activities_template; | |
// user is not logged ? Show nothing. | |
if ( ! is_user_logged_in() ) { | |
return ''; | |
} | |
$activity_id = bp_activity_get_activity_id( array( |
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_filter( 'rest_url_prefix', function () { return 'wp-rest'; } ); |
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 | |
// Exit if accessed directly | |
defined( 'ABSPATH' ) || exit; | |
/** | |
* Main Media Class. | |
* | |
* @since BuddyPress (1.5.0) | |
*/ |
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
//turn off webcam support | |
add_filter( ‘bp_avatar_use_webcam’, ‘__return_false’ ) | |
// turn off star messages | |
add_filter( 'bp_messages_is_starred_enabled', '__return_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
// add marker for single address | |
function findAddress(address) { | |
var geocoder = new google.maps.Geocoder(); | |
var addresses = ( typeof addresses != 'undefined' && x instanceof Array ) ? address.split('|') : address; | |
for ( var i = 0; i < addresses.length; i++) { | |
if( map_places ) { |
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
cordova plugin add org.apache.cordova.device; | |
cordova plugin add org.apache.cordova.splashscreen; | |
cordova plugin add org.apache.cordova.inappbrowser; | |
cordova plugin add org.apache.cordova.dialogs; | |
cordova plugin add org.apache.cordova.geolocation; | |
cordova plugin add org.apache.cordova.vibration; | |
cordova plugin add org.apache.cordova.network-information; | |
cordova plugin add com.phonegap.plugin.statusbar; | |
cordova plugin add nl.x-services.plugins.socialsharing; | |
cordova plugin add com.adobe.plugins.gaplugin; |