예제 #1
0
                // Send an email to each user
                foreach ($email_info as $user) {
                    $user_id = $user->ID;
                    $message = $msg_base;
                    $settings_link = bp_core_get_user_domain($user_id) . BP_SETTINGS_SLUG . '/notifications/';
                    $message .= sprintf(__('To disable these notifications please log in and go to: %s', 'buddypress'), $settings_link);
                    wp_mail($user->user_email, $subject, $message);
                }
            }
            // Reset magic member
            $this->allow_magic_member = false;
        }
        return $this->update_next_email_time();
    }
}
BfoxReadingSchedule::init_manager();
add_action('bfox_bp_check_install', 'BfoxReadingSchedule::check_install');
function bfox_bp_plans_get_active_schedule_ids()
{
    global $bfox_bp_plans_active_schedule_ids, $user_ID;
    if (!isset($bfox_bp_plans_active_schedule_ids)) {
        if ($user_ID) {
            $bfox_bp_plans_active_schedule_ids = BfoxReadingSchedule::get(BfoxReadingSchedule::add_user_to_args($user_ID, array('date' => BfoxReadingSchedule::date())));
        } else {
            $bfox_bp_plans_active_schedule_ids = array();
        }
    }
    return (array) $bfox_bp_plans_active_schedule_ids;
}
/**
 * @return BfoxReadingSchedule