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 | |
/** | |
* Filter on the gallery creation permission. | |
* | |
* @param bool $can can create. | |
* @param string $component component name. | |
* @param string $component_id component id. | |
* | |
* @return bool |
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 | |
/** | |
* Display the name of the creator of the gallery below gallery cover | |
* | |
*/ | |
function mpp_custom_display_gallery_owner_name() { | |
$gallery = mpp_get_gallery(); | |
if ( ! $gallery ) { | |
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 | |
/** Copy PNG files from the Source Directory( and its child directories) to destination as specified | |
* | |
* I use it to move all the png files from the extracted subtle patterns directories to another directory | |
* | |
* @param string $path the directory which contains our subdirectories | |
* @param string $destination_dir the absolute path to directory where files will be moved | |
*/ | |
function copy_png_files( $path, $destination_dir ) { |
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
//do not let the activity be posted by any means(do not allow from directory etc) | |
function bd_check_post_update() { | |
$item_id = 0; | |
$object = ''; | |
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
//Do not notify for join group activity in BP Local group Activity notifier | |
function buddydev_do_not_notify_join_group_activity( $stop_notification, $activity ) { | |
if ( $activity->type == 'joined_group' ) { | |
$stop_notification = true; | |
} | |
return $stop_notification; | |
} | |
add_filter( 'bp_local_group_notifier_skip_notification', 'buddydev_do_not_notify_join_group_activity', 10, 2 ); |
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 buddydev_skip_group_join_notification( $skip, $activity ) { | |
if ( $activity->type == 'joined_group' ) { | |
$skip = true; | |
} | |
return $skip; | |
} | |
add_filter( 'bp_local_group_notifier_skip_notification', 'buddydev_skip_group_join_notification', 10, 2 ); |
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 buddydev_ua_enable_everwhere( $load ) { | |
if ( ! is_user_logged_in() ) { | |
$load = true; | |
} | |
return $load; | |
} | |
add_filter( 'buddydev_username_availability_checker_load_assets', 'buddydev_ua_enable_everwhere'); | |
function buddydev_ua_custom_selector( $selectors ) { |
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
//Blog Categories for Groups, auto category creation and association | |
function bcg_custom_create_group_name_category( $group_id, $group ) { | |
bcg_custom_create_group_category( $group ); | |
} | |
add_action( 'groups_created_group', 'bcg_custom_create_group_name_category', 10, 2 ); | |
//modify extensions to hide the create/manage screen |
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( 'bpajaxr_is_auto_activation_mode', '__return_false' ); |