= 60 * 60 * 12 )) { // File is older than threshold, delete unlink($allow_plugin_file); } } // if (file_exists($allow_plugin_file)) { define( 'DISALLOW_FILE_EDIT', false ); // allow define( 'DISALLOW_FILE_MODS', false); } else { define( 'DISALLOW_FILE_EDIT', true ); // disable define( 'DISALLOW_FILE_MODS', true); } } add_action( 'admin_menu', 'plugin_controls_remove_menus' ); add_action( 'admin_menu', 'plugin_page_control' );