Plugin Directory

Changeset 1998678


Ignore:
Timestamp:
12/20/2018 10:22:19 AM (7 years ago)
Author:
wpkonsulent
Message:

Minor update.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • safe-mode/trunk/loader/safe-mode-loader.php

    r1003274 r1998678  
    33    Plugin Name: Safe Mode Loader
    44    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.2
     5    Version: 1.1.3
    66    Author: Uffe Fey, WordPress consultant
    7     Author URI: http://wpkonsulent.dk
     7    Author URI: https://wpkonsulent.dk
    88*/
    99    $wpkonsulent_safemode_loader = new WPkonsulentSafeModeLoader();
     
    1111    class WPkonsulentSafeModeLoader
    1212    {
    13         function WPkonsulentSafeModeLoader()
    14         {
    15             $this->__construct();
    16         }
    17 
    1813        function __construct()
    1914        {
     
    2116            if(isset($_GET['safe_mode']) && $_GET['safe_mode'] == '1')
    2217            {
    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);
    2722            }
    2823        }
     
    5146                $themes = wp_get_themes();
    5247               
    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))
    5459                    return 'twentyfifteen';
    5560                else if(array_key_exists('twentyfourteen', $themes))
Note: See TracChangeset for help on using the changeset viewer.