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 delete_user_account( $query_args ) { | |
// Use this array to specify multiple roles to show in dropdown | |
$query_args['role__in'] = array( 'administrator' ); | |
// Unset the 'who' as this defaults to the 'author' role | |
unset( $query_args['who'] ); | |
return $query_args; | |
} |
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 | |
global $prli_link, $prli_blogurl; | |
// Create the pretty link | |
$pretty_link_id = prli_create_pretty_link( | |
'https://google.com', // Target URL | |
'api-link-1', // Slug | |
'API Link', // Name of pretty link | |
'', // Description |
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 limit_activities_displayed( $retval ) { | |
$isMob = is_numeric(strpos(strtolower($_SERVER["HTTP_USER_AGENT"]), "mobile")); | |
if ($isMob) { | |
$retval['per_page'] = 15; | |
} | |
else { | |
$retval['per_page'] = 5; | |
} | |
return $retval; | |
} |
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
remove_action( 'bp_activity_after_email_content', 'bb_gif_activity_after_email_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
/** | |
* Update the place holder into the login page | |
*/ | |
function acrosswp_custom_bb_login_head_callback() { | |
?> | |
<script> | |
jQuery( document ).ready( function ($) { | |
jQuery( 'form#loginform #user_login' ).attr( 'placeholder', "Custom Email" ); | |
}); |
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 content into the post | |
*/ | |
function acrosswp_nouveau_ajax_post_update_custom() { | |
if ( ! is_user_logged_in() || empty( $_POST['_wpnonce_post_update'] ) || ! wp_verify_nonce( $_POST['_wpnonce_post_update'], 'post_update' ) ) { | |
wp_send_json_error(); | |
} | |
// check activity toolbar options if one of them is set, activity can be empty. |
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 | |
$ld_group_id = bp_ld_sync( 'buddypress' )->helpers->getLearndashGroupId( bp_get_current_group_id() ); | |
if ( $ld_group_id ) { | |
$post_label_prefix = 'group'; | |
$meta = learndash_get_setting( $ld_group_id ); | |
$post_price_type = ( isset( $meta[ $post_label_prefix . '_price_type' ] ) ) ? $meta[ $post_label_prefix . '_price_type' ] : ''; | |
$post_price = ( isset( $meta[ $post_label_prefix . '_price' ] ) ) ? $meta[ $post_label_prefix . '_price' ] : ''; | |
// format the Course price to be proper XXX.YY no leading dollar signs or other values. |
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
/** | |
* Remove the new filter that is been added into BuddyPress 2.4.11 | |
*/ | |
function awp_bp_init_bb_platform_issue() { | |
remove_filter( 'bp_activity_set_just-me_scope_args', 'bp_activity_filter_just_me_scope', 10 ); | |
} | |
add_action( 'bp_init', 'awp_bp_init_bb_platform_issue' ); | |
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
/** | |
* Filter to run the shortcode into the formds | |
*/ | |
function bbp_get_topic_content_callback( $content ) { | |
return do_shortcode( $content ); | |
} | |
add_filter( 'bbp_get_topic_content', 'bbp_get_topic_content_callback', 100000 ); |
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
/** | |
* Temp patch for Group Menu issue in the BB theme version: 2.4.01 | |
*/ | |
function awp_add_boss_menu_js_functions() { | |
if( | |
function_exists( 'bp_get_group_current_admin_tab' ) | |
&& in_array( bp_get_group_current_admin_tab(), array( 'edit-details', 'group-settings', 'group-avatar', 'group-cover-image', 'manage-members', 'membership-requests', 'delete-group', 'forum' ), true ) | |
) { | |
?> |
NewerOlder