I have created a bp-custom.php in wp-content / plugins /
and a tried custom-functions.php file in the theme directory
with the following content, but neither seem to work, am I doing something basic wrong?
<?php
function ctaylor_notify_user( $file_id, $params = array() ) {
if ( ! empty( $params[‘parent_folder_id’] ) ) {
$parent_folder = buddydrive_get_buddyfile( $params[‘parent_folder_id’], buddydrive_get_folder_post_type() );
// Notify if the one who put a file is not the owner of the folder
if ( ! empty( $parent_folder->user_id ) && (int) $params[‘user_id’] !== (int) $parent_folder->user_id ) {
// your code to send an email/screen notification.
}
}
}
add_action( ‘buddydrive_add_item’, ‘ctaylor_notify_user’, 10, 2 );
function sephilex_add_time( $date ) {
global $buddydrive_template;
$datetime = bp_format_time( strtotime( $buddydrive_template->query->post->post_modified_gmt ), false, false );
return $datetime;
}
add_filter( ‘buddydrive_get_item_date’, ‘sephilex_add_time’, 10, 1 );
?>