Plugin Directory

Changeset 971489


Ignore:
Timestamp:
08/23/2014 07:36:35 PM (12 years ago)
Author:
DaganLev
Message:

fixed drop down on theme selector to not allow selection of child theme when they are not the active theme - as this will choose the actual parent theme and misslead client to thinking they are updating the child them while they are actually writing files on parent theme

Location:
solid-code-theme-editor
Files:
38 added
2 edited

Legend:

Unmodified
Added
Removed
  • solid-code-theme-editor/trunk/readme.txt

    r969926 r971489  
    6565* added support for child themes
    6666
     67= 1.0.7 =
     68* fixes for child themes - so not to show them when they are not selected to prevent parent themes from being overriden
     69
    6770== Upgrade Notice ==
    6871
    69 added support for child themes
     72fixes for child themes - so not to show them when they are not selected to prevent parent themes from being overriden
  • solid-code-theme-editor/trunk/sc-theme-editor.php

    r969926 r971489  
    44Plugin URI: http://solid-code.co.uk/2011/08/solid-code-theme-editor/
    55Description: Adds a special editor to the theme editor with more functionality
    6 Version: 1.0.6
     6Version: 1.0.7
    77Author: Dagan Lev
    88Author URI: http://solid-code.co.uk
     
    180180                        foreach($themes as $stheme){
    181181                            if($theme->Name==$stheme['Name']){
    182                                 echo '<option selected="selected" value="'. $stheme->template .'">'. $stheme['Name'] .'</option>';
     182                                echo '<option selected="selected" value="'. ($stheme->parent() ? '' : $stheme->template) .'">'. $stheme['Name'] . ($stheme->parent() ? '' : '') .  '</option>';
    183183                            }else{
    184                                 echo '<option value="'. $stheme->template .'">'. $stheme['Name'] .'</option>'; 
     184                                if(!$stheme->parent()){
     185                                    echo '<option value="'. ($stheme->parent() ? '' : $stheme->template) .'">'. $stheme['Name']  . '</option>';
     186                                }
    185187                            }
    186188                        }
Note: See TracChangeset for help on using the changeset viewer.