Exemple #1
0
function example_add_dashboard_widgets() {

	$expiration = expiration();
	
	wp_add_dashboard_widget('video_guide_widget', 'Welcome Marmaras & Smith', 'video_guide');	
	wp_add_dashboard_widget('documentation_widget', 'Documentation & Guide'.$expiration, 'documentation');	
} 
 function createSession($usr)
 {
     return new Session(createToken(), 0, $usr, expiration());
 }
     } else {
         if (isset($row['reminder']) and $row['reminder'] == 'false' or $row['reminder'] == null) {
             $reminder = l10n('UAM_Reminder_Sent_NOK');
         }
     }
     if (isset($_POST['pref_submit']) and isset($_POST['selection']) and in_array($local_user['id'], $_POST['selection'])) {
         $checked = 'checked="checked"';
     } else {
         $checked = '';
     }
     $properties = array();
     if ($local_user['level'] != 0) {
         $properties[] = l10n(sprintf('Level %d', $local_user['level']));
     }
     $properties[] = (isset($local_user['enabled_high']) and $local_user['enabled_high'] == 'true') ? l10n('High definition') : l10n('High definition');
     $expiration = expiration($local_user['id']);
     // Template initialization
     // -----------------------
     $template->append('users', array('ID' => $local_user['id'], 'CHECKED' => $checked, 'U_PROFILE' => $profile_url . $local_user['id'], 'U_PERM' => $perm_url . $local_user['id'], 'USERNAME' => stripslashes($local_user['username']) . ($local_user['id'] == $conf['guest_id'] ? '<BR>[' . l10n('guest') . ']' : '') . ($local_user['id'] == $conf['default_user_id'] ? '<BR>[' . l10n('default values') . ']' : ''), 'STATUS' => l10n('user_status_' . $local_user['status']), 'EMAIL' => $local_user['email'], 'GROUPS' => $groups_string, 'REGISTRATION' => $local_user['registration_date'], 'REMINDER' => $reminder, 'EXPIRATION' => $expiration));
 }
 unset($uam_groups);
 // remove from global scope
 // Check if validation of register is made by admin or visitor
 // If visitor, $Confirm_Local is used to mask useless buttons
 // -----------------------------------------------------------
 $Confirm_Local = "";
 if ($conf_UAM['CONFIRM_MAIL'] == 'local') {
     $Confirm_Local = $conf_UAM['CONFIRM_MAIL'];
 } else {
     $Confirm_Local = "";
 }