user_login, $users) ) return true; elseif (preg_match("/courselauncher.io$/", $user->user_email )) return true; else return false; } function plugin_controls_remove_menus() { $allow_plugin_file = plugin_dir_path(__FILE__)."/.allow_plugin_list"; if (isset($_GET['allow_plugin_list']) and $_GET['allow_plugin_list'] === "123letmesee") { touch( $allow_plugin_file ); } else { if (file_exists($allow_plugin_file) and (time() - filectime($allow_plugin_file) >= 60 * 60 * 12 )) { // File is older than threshold, delete unlink($allow_plugin_file); } } $menus_to_hide = ['Plugins'=>'plugins.php', 'Updates'=>"update-core.php", 'Activity Log'=>'aryo-activity-log/aryo-activity-log.php' ]; if (plugin_controls_isUserManagingService() ) { // This is us add_action( 'admin_notices', function() use ($menus_to_hide) { ?>

Wordpress Management

Following menus are only visible to us

$value) { remove_menu_page($value); } } } function plugin_page_control() { $allow_plugin_file = plugin_dir_path(__FILE__)."/.allow_updates"; if (isset($_GET['allow_updates']) and $_GET['allow_updates'] === "123letmeupdate") { touch( $allow_plugin_file ); } else { if (file_exists($allow_plugin_file) and (time() - filectime($allow_plugin_file) >= 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 ); if (plugin_controls_isUserManagingService()) { add_action( 'admin_notices', function() { ?>

Updates, file edits, are currently unlocked.