Changeset 1998678
- Timestamp:
- 12/20/2018 10:22:19 AM (7 years ago)
- File:
-
- 1 edited
-
safe-mode/trunk/loader/safe-mode-loader.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
safe-mode/trunk/loader/safe-mode-loader.php
r1003274 r1998678 3 3 Plugin Name: Safe Mode Loader 4 4 Description: Makes it possible to enable a safe mode for WordPress. In safe mode, plugins will not be loaded and the default theme (if installed) will be activated. 5 Version: 1.1. 25 Version: 1.1.3 6 6 Author: Uffe Fey, WordPress consultant 7 Author URI: http ://wpkonsulent.dk7 Author URI: https://wpkonsulent.dk 8 8 */ 9 9 $wpkonsulent_safemode_loader = new WPkonsulentSafeModeLoader(); … … 11 11 class WPkonsulentSafeModeLoader 12 12 { 13 function WPkonsulentSafeModeLoader()14 {15 $this->__construct();16 }17 18 13 function __construct() 19 14 { … … 21 16 if(isset($_GET['safe_mode']) && $_GET['safe_mode'] == '1') 22 17 { 23 add_filter('template', array( &$this, 'disable_theme'), 10, 1);24 add_filter('stylesheet', array( &$this, 'disable_theme'), 10, 1);25 add_filter('option_active_plugins', array( &$this, 'disable_plugins'), 10, 1);26 add_filter('plugin_action_links', array( &$this, 'plugin_links'), 10, 4);18 add_filter('template', array($this, 'disable_theme'), 10, 1); 19 add_filter('stylesheet', array($this, 'disable_theme'), 10, 1); 20 add_filter('option_active_plugins', array($this, 'disable_plugins'), 10, 1); 21 add_filter('plugin_action_links', array($this, 'plugin_links'), 10, 4); 27 22 } 28 23 } … … 51 46 $themes = wp_get_themes(); 52 47 53 if(array_key_exists('twentyfifteen', $themes)) // Note: only added for future support 48 if(array_key_exists('twentytwenty', $themes)) 49 return 'twentytwenty'; 50 else if(array_key_exists('twentynineteen', $themes)) 51 return 'twentynineteen'; 52 else if(array_key_exists('twentyeighteen', $themes)) 53 return 'twentyeighteen'; 54 else if(array_key_exists('twentyseventeen', $themes)) 55 return 'twentyseventeen'; 56 else if(array_key_exists('twentysixteen', $themes)) 57 return 'twentysixteen'; 58 else if(array_key_exists('twentyfifteen', $themes)) 54 59 return 'twentyfifteen'; 55 60 else if(array_key_exists('twentyfourteen', $themes))
Note: See TracChangeset
for help on using the changeset viewer.