예제 #1
0
/**
 * Installation functions
 *
 * This runs when the plugin is activated
 * @since 0.0.1
 */
function i4_installation()
{
    //Create the I4Web_LMS Roles Object
    $i4_roles = new I4Web_LMS_Roles();
    $i4_roles->i4_add_roles();
    $i4_roles->i4_remove_roles();
    $i4_roles->i4_add_capabilities();
    I4Web_LMS()->i4_db->create_i4_settings_table();
}
예제 #2
0
 /**
  * Notify the blog admin of a user changing password, normally via email.
  *
  * @since 1.0.0
  *
  * @param object $user User Object
  */
 function wp_password_change_notification(&$user)
 {
     // send a copy of password change notification to the admin
     // but check to see if it's the admin whose password we're changing, and skip this
     if (0 !== strcasecmp($user->user_email, get_option('admin_email'))) {
         $message = 'Hi,<br>';
         $message .= sprintf(__('A password was recently changed for: <br><br>Username: <strong>%s</strong>'), $user->user_login) . "\r\n";
         // The blogname option is escaped with esc_html on the way into the database in sanitize_option
         // we want to reverse this for the plain text arena of emails.
         $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
         I4Web_LMS()->i4_emails->send(get_option('admin_email'), sprintf(__('User Password Lost/Changed'), $blogname), $message);
         //	wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), $blogname), $message);
     }
 }
예제 #3
0
            require_once I4_PLUGIN_DIR . 'includes/class-i4-wpcw.php';
            require_once I4_PLUGIN_DIR . 'includes/widgets.php';
            //Admin Files
            require_once I4_PLUGIN_DIR . 'admin/admin-theme.php';
            //Template Functions
            require_once I4_PLUGIN_DIR . 'includes/template-functions.php';
            //Emails
            require_once I4_PLUGIN_DIR . 'includes/emails.php';
            //Post Meta Functions
            require_once I4_PLUGIN_DIR . 'includes/post-meta-functions.php';
        }
    }
    //end Main I4Web_LMS class
}
// End if class_exists check
/**
 * Responsible for returning the one and only I4Web_LMS instance to our functions
 *
 * This function gets used like a Global variable, except you don't have to declare the Global
 * Example: <?php $i4 = I4Web_LMS(); ?>
 *
 * @since 0.0.1
 * @return object The one and only I4Web_LMS instance
 */
function I4Web_LMS()
{
    return I4Web_LMS::instance();
}
//Start I4Web_LMS
I4Web_LMS();
예제 #4
0
?>
">
						<tr>
							<td align="center" valign="top">
								<!-- Header -->
								<table border="0" cellpadding="0" cellspacing="0" width="520" id="template_header" style="<?php 
echo $template_header;
?>
" bgcolor="#ffffff">
									<tr>
										<td>
											<h1 style="<?php 
echo $header_content_h1;
?>
"><?php 
echo I4Web_LMS()->i4_emails->get_heading();
?>
</h1>
										</td>
									</tr>
								</table>
								<!-- End Header -->
							</td>
						</tr>
						<tr>
							<td align="center" valign="top">
								<!-- Body -->
								<table border="0" cellpadding="0" cellspacing="0" width="520" id="template_body">
									<tr>
										<td valign="top" style="<?php 
echo $body_content;