コード例 #1
0
ファイル: email-users.php プロジェクト: kosir/thatcamp-org
/**
 * Add a widget to the dashboard.
 *
 * This function is hooked into the 'wp_dashboard_setup' action below.
 */
function mailusers_add_dashboard_widgets()
{
    //  Only show widget when enabled
    if (mailusers_get_dashboard_widgets() === 'true') {
        //  Only show widget for users who have the capability
        if (current_user_can(MAILUSERS_EMAIL_SINGLE_USER_CAP) || current_user_can(MAILUSERS_EMAIL_MULTIPLE_USERS_CAP) || current_user_can(MAILUSERS_EMAIL_USER_GROUPS_CAP) || current_user_can(MAILUSERS_NOTIFY_USERS_CAP)) {
            wp_add_dashboard_widget('mailusers_dashboard_widget', 'Email Users', 'mailusers_dashboard_widget_function');
        }
    }
}
コード例 #2
0
			<?php 
_e('Add <a href="http://en.wikipedia.org/wiki/MIME-Version#MIME-Version">MIME-Version</a> mail header record.<br/><small><i>Not recommended for typical WordPress installations.</i></small>', MAILUSERS_I18N_DOMAIN);
?>
<br/>
		</td>
	</tr>
	<tr>
    <th><?php 
_e('Dashboard Widgets', MAILUSERS_I18N_DOMAIN);
?>
</th>
		<td>
			<input 	type="checkbox"
					name="mailusers_dashboard_widgets" id="mailusers_dashboard_widgets" value="true"
					<?php 
if (mailusers_get_dashboard_widgets() == 'true') {
    echo 'checked="checked"';
}
?>
 ></input>
			<?php 
_e('Display Dashboard Widgets<br/><small><i>Note:  Email can show informational widgets on the Dashboard.</i></small>', MAILUSERS_I18N_DOMAIN);
?>
<br/>
		</td>
	</tr>
	<tr>
    <th><?php 
_e('Debug', MAILUSERS_I18N_DOMAIN);
?>
</th>