draco_ghost
Forum Replies Created
-
Forum: Plugins
In reply to: [My Calendar - Accessible Event Manager] The mc-event posts are not deletedYes, that is right.
Forum: Plugins
In reply to: [My Calendar - Accessible Event Manager] The mc-event posts are not deletedThis is only happening when i checked the event or the events and click the button to delete, if i choose individually the option to delete
<a href="MY_TEMPLATE/wp-admin/admin.php?page=my-calendar-manage&mode=delete&event_id=19">Borrar</a>, the events are deleted in both tables.Forum: Plugins
In reply to: [My Calendar - Accessible Event Manager] override functionyes thats right,i dont need $event, thanks for your time and help.
Forum: Plugins
In reply to: [My Calendar - Accessible Event Manager] override function`can you add an extra argument $event ?
Because in my case, i need to know the category of the event.apply_filters( ‘mc_event_mail_bcc’, get_option( ‘mc_event_mail_bcc’ ), $details, $event);
I do this way
in my functions.phpfunction custom_mc_event_mail_bcc($details,$event){ $category_name = (string)$event['category']; $category_name = strtolower($category_name); if($category_name == "intermedio / avanzado"){ $category_name = "int_ava"; } $args = array( 'blog_id' => $GLOBALS['blog_id'], 'role' => $category_name, ); if(isset($args)){ $blogusers = get_users( $args) ; $mail_users = ""; foreach ( $blogusers as $user ) { $mail_users .= "\r\n".esc_html( $user->user_email )."\r\n"; } } return $details." ".$mail_users; } add_filter('mc_event_mail_bcc', 'custom_mc_event_mail_bcc',10,3);Forum: Plugins
In reply to: [My Calendar - Accessible Event Manager] override functionI just need to add some emails dynamically to BCC, depending of the category of the event and the role of the users, without typing in the area text of the settings of the plugin, is just this
$bcc .= $mail_users; // new line, string of mails
if ( $bcc ) {
$bcc = explode( PHP_EOL, $bcc );
foreach ( $bcc as $b ) {
$b = trim( $b );
if ( is_email( $b ) ) {
$headers[] = “Bcc: $b”;
}
}