Example #1
0
    public static function render()
    {
        if (!mainwp_current_user_can('dashboard', 'manage_dashboard_settings')) {
            mainwp_do_not_have_permissions(__('manage dashboard settings', 'mainwp'));
            return;
        }
        $updated = MainWP_Options::handleSettingsPost();
        $updated |= MainWP_Manage_Sites::handleSettingsPost();
        $updated |= MainWP_Offline_Checks::handleSettingsPost();
        $updated |= MainWP_Footprint::handleSettingsPost();
        self::renderHeader('');
        ?>
		<?php 
        if ($updated) {
            ?>
			<div id="ajax-information-zone" class="updated">
				<p><?php 
            _e('Your settings have been saved.', 'mainwp');
            ?>
</p></div>
			<?php 
        }
        ?>

		<form method="POST" action="admin.php?page=Settings" id="mainwp-settings-page-form">
			<?php 
        MainWP_Options::renderSettings();
        MainWP_Manage_Sites::renderSettings();
        MainWP_Offline_Checks::renderSettings();
        MainWP_Footprint::renderSettings();
        ?>
			<p class="submit">
				<input type="submit" name="submit" id="submit" class="button-primary button button-hero" value="<?php 
        esc_attr_e('Save Settings', 'mainwp');
        ?>
"/>
			</p>
		</form>
		<?php 
        self::renderFooter('');
    }