Replies
- Lefteris on March 21, 2022 at 1:32 pm in reply to: [Resolved] Fetch and condition for checkboxes data values #43990
A text field is giving me results normal.
- Lefteris on March 21, 2022 at 1:30 pm in reply to: [Resolved] Fetch and condition for checkboxes data values #43989
I just tried, it didn’t gave me any result either . I’ve even tried to set ‘array’ instead of ‘comma’.
- Lefteris on March 21, 2022 at 1:16 pm in reply to: [Resolved] Fetch and condition for checkboxes data values #43987
Hello Ravi,
Thank you so much for your feedback. You have been a savier for me 🙂
I have tried to do:
$data = xprofile_get_field_data( 12, $user_id = 23, 'comma' ); echo $data;
but it doesn’t give me any result . Maybe i am doing something wrong?
- Lefteris on July 16, 2021 at 8:01 am in reply to: [Resolved] Override Xprofile Group Name with role conditions #39573
Thank you for your help Brajesh 🙂
This is what i was trying to do.
- Lefteris on July 15, 2021 at 11:40 am in reply to: [Resolved] Override Xprofile Group Name with role conditions #39559
Hello Brajesh,
Thank you for your help 🙂
I made this:
add_filter( 'bp_get_the_profile_group_name', 'child_update_profile_group_name' ); function child_update_profile_group_name( $name ) { global $group; if ( $group->name == 'Settings' && bp_current_user_can( 'subscriber' ) ) { $name = 'Settings1'; } return $name; }
since there is no group id available, but still don’t work 🙁
Any ideas how i can target the group?
- Lefteris on July 4, 2021 at 2:59 pm in reply to: How to add an error message in BuddyPress Xprofile Custom Field Types plugin #39420
Hello Brajesh,
Thank you very much for your reply 🙂 \
Did you manage to push an update on the fix?
Please let me know 🙂
- Lefteris on June 15, 2021 at 12:17 pm in reply to: How to add an error message in BuddyPress Xprofile Custom Field Types plugin #39148This reply has been marked as private.
- Lefteris on May 12, 2021 at 3:17 pm in reply to: [Resolved] Send email to all featured members when a site wide notice is published #38619
Hello @Ravi,
You were correct. I spotted my mistake. It’s working now! Thank you for your help!!
- Lefteris on May 12, 2021 at 3:14 pm in reply to: [Resolved] Send email to user that has been inactive for 2 months #38618
hello @Ravi, after many tests it works perfectly fine with
date_recorded < current_date - interval 60 day
for getting the users that haven’t been active for more than 2 months.Is the
if ( empty( $user_ids ) ) { return; }
correct as it should be in the code? https://pastebin.com/EfASFZNaor should i just make an
if ( ! empty( $user_ids ) )
in theforeach ( $user_ids as $user_id )
loop?Thank you for your help
- Lefteris on May 9, 2021 at 8:13 pm in reply to: [Resolved] Send email to all featured members when a site wide notice is published #38559
Hello @Ravi,
The action works correct .
My only issue is how can i get the text of the active notice in the loop?
`function important_notification($subject, $message) {
$notice = BP_Messages_Notice::get_active();
$notification = ” . bp_message_notice_text($notice) . ”;$args = array(
‘meta_key’ => ‘_is_featured’
);$members = get_users( $args );
foreach( $members as $member ) {
$user_id = $member->ID;
$member_account = bp_core_get_user_domain( $user_id );$first_name = $member->first_name;
$email_subject = ‘Important information’;
$note_message = sprintf( ‘Hello %1$s,’ , $first_name ) . “<br><br>”;
$note_message .= sprintf( ‘We have an important information for you:’ ) .”<br><br>”;
$note_message .= sprintf( ‘<i>%1$s</i>’ , $notification ) .”<br><br>”;
$note_message .= sprintf( ‘Please login <a href=”%1$s” target=”_blank”>to your account</a> to remove the information if you want.’ , $member_account ) .”<br><br>”;wp_mail( $member->user_email, $email_subject, $note_message );
}
}
add_action( ‘messages_send_notice’, ‘important_notification’, 10, 2 );`If i use the `$notice = BP_Messages_Notice::get_active();
echo ” . bp_message_notice_text($notice) . ”;` in a page i get the text normal. But inside a plugin file it doesn’t work. What am i missing ?Thank you for your time and your great support.