Plugin Directory

Changeset 1687550


Ignore:
Timestamp:
06/29/2017 09:00:21 AM (9 years ago)
Author:
momen2009
Message:

version 1.3 release.
Fixed a problem where the theme returns to the original when transitioning to the lower page. Once the password matched, the modified theme was applied even to the lower page.

Location:
theme-changer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • theme-changer/trunk/readme.txt

    r1686734 r1687550  
    44Requires at least: 3.0
    55Tested up to: 4.8
    6 Stable tag: 1.2
     6Stable tag: 1.3
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3636= 1.2 =
    3737* You can attach a password to the Theme Changer. e.g. http://wordpress_install_domain/?theme_changer=theme_folder_name&theme_changer_password=input_password
     38
     39= 1.3 =
  • theme-changer/trunk/theme-changer.php

    r1686733 r1687550  
    4646        $now_theme = wp_get_theme();
    4747        $theme_changer_theme = $now_theme -> get_stylesheet();
    48         if($theme_changer_password != $wpdb->escape($_GET["theme_changer_password"])) return;
     48
     49        if(isset($_SESSION["theme_changer_password"]) && !isset($_GET["theme_changer_password"])){
     50            if($_SESSION["theme_changer_password"] != $theme_changer_password) return;
     51        }else{
     52            if($theme_changer_password != $wpdb->escape($_GET["theme_changer_password"])){
     53                return;
     54            }else{
     55                $_SESSION["theme_changer_password"] = $theme_changer_password;
     56            }
     57        }
    4958    }
    5059
Note: See TracChangeset for help on using the changeset viewer.