本文整理匯總了PHP中WooThemes_Sensei_Utils::sensei_user_passed_course方法的典型用法代碼示例。如果您正苦於以下問題:PHP WooThemes_Sensei_Utils::sensei_user_passed_course方法的具體用法?PHP WooThemes_Sensei_Utils::sensei_user_passed_course怎麽用?PHP WooThemes_Sensei_Utils::sensei_user_passed_course使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WooThemes_Sensei_Utils
的用法示例。
在下文中一共展示了WooThemes_Sensei_Utils::sensei_user_passed_course方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: trigger
/**
* trigger function.
*
* @access public
* @return void
*/
function trigger($user_id = 0, $course_id = 0)
{
global $woothemes_sensei, $sensei_email_data;
// Get learner user object
$this->user = new WP_User($user_id);
// Get passed status
$passed = __('passed', 'woothemes-sensei');
if (!WooThemes_Sensei_Utils::sensei_user_passed_course($course_id, $user_id)) {
$passed = __('failed', 'woothemes-sensei');
}
// Construct data array
$sensei_email_data = apply_filters('sensei_email_data', array('template' => $this->template, 'heading' => $this->heading, 'user_id' => $user_id, 'course_id' => $course_id, 'passed' => $passed), $this->template);
// Set recipient (learner)
$this->recipient = stripslashes($this->user->user_email);
// Send mail
$woothemes_sensei->emails->send($this->recipient, $this->subject, $woothemes_sensei->emails->get_content($this->template));
}
開發者ID:mattytemple,項目名稱:YTC-Sensei,代碼行數:23,代碼來源:class-woothemes-sensei-email-learner-completed-course.php