Esempio n. 1
0
		</div>	
	 </div>

	<div class="wpo_col wpo_span_1_of_3">
	<div class="postbox">
	<!-- <h3 class="hndle"><span>Actions</span></h3> -->
		<div class="inside">
		<h3><?php 
_e('Actions', 'wp-optimize');
?>
</h3>
		<p>
			<label>

			 <?php 
$dbtype = wpo_detectDBType();
switch ($dbtype) {
    case "myisam":
        echo '<input name="optimize-db" id="optimize-db" type="checkbox" value="" />';
        echo '<b>&nbsp;';
        _e('Optimize database tables', 'wp-optimize');
        echo '</b>';
        break;
    case "innodb":
        echo '<input name="optimize-db-disabled" id="optimize-db" type="checkbox" value="" disabled/>';
        echo '<b>&nbsp;';
        _e('Database optimization not available for InnoDB table types', 'wp-optimize');
        echo '</b>';
        break;
    default:
        echo '<input name="optimize-db" id="optimize-db" type="checkbox" value="" />';
Esempio n. 2
0
function wpo_admin_actions()
{
    if (current_user_can('manage_options')) {
        if (function_exists('add_meta_box')) {
            add_menu_page("WP-Optimize", "WP-Optimize", "manage_options", "WP-Optimize", "wp_optimize_menu", plugin_dir_url(__FILE__) . 'wpo.png');
        } else {
            add_submenu_page("index.php", "WP-Optimize", "WP-Optimize", "manage_options", "WP-Optimize", "wp_optimize_menu", plugin_dir_url(__FILE__) . 'wpo.png');
        }
        // end if addmeta box
        if (get_option(OPTION_NAME_ENABLE_ADMIN_MENU, 'false') == 'true') {
            add_action('wp_before_admin_bar_render', 'wpo_admin_bar');
        }
        wpo_detectDBType();
        wpo_PluginOptionsSetDefaults();
        wpo_cron_activate();
    }
}