Plugin Directory

Changeset 462995


Ignore:
Timestamp:
11/15/2011 09:33:37 AM (14 years ago)
Author:
Trendwerk
Message:

3.1, mcb fix

Location:
cms
Files:
49 added
2 edited

Legend:

Unmodified
Added
Removed
  • cms/trunk/multiple_content.php

    r382787 r462995  
    6060    $child_theme_url = str_replace('themes/','',strstr(get_stylesheet_directory_uri(),'themes/'));
    6161
    62     if(fopen(str_replace($current_theme_url,$child_theme_url,$fileToRead), 'r')) { //child theme exists
    63         $fileToRead = str_replace($current_theme_url,$child_theme_url,$fileToRead);
    64         $f = fopen($fileToRead, 'r');
    65     } else {
    66         $f = fopen($fileToRead, 'r');
    67     }
    68     $contents = fread($f, filesize($fileToRead));
    69     $contents = htmlspecialchars( $contents );
    70    
     62    if(file_exists(str_replace($current_theme_url,$child_theme_url,$fileToRead))) {
     63        if(fopen(str_replace($current_theme_url,$child_theme_url,$fileToRead), 'r')) { //child theme exists
     64            $fileToRead = str_replace($current_theme_url,$child_theme_url,$fileToRead);
     65            $f = fopen($fileToRead, 'r');
     66        } else {
     67            $f = fopen($fileToRead, 'r');
     68        }
     69        $contents = fread($f, filesize($fileToRead));
     70        $contents = htmlspecialchars( $contents );
     71    }
     72       
    7173    //read the templates header, sidebar and footer, added in v1.1
    7274        $headercontents = read_tag('header',$contents);
     
    175177    $child_theme_url = str_replace('themes/','',strstr(get_stylesheet_directory_uri(),'themes/'));
    176178
    177     if(fopen(str_replace($current_theme_url,$child_theme_url,$fileToRead), 'r')) { //child theme exists
    178         $fileToRead = str_replace($current_theme_url,$child_theme_url,$fileToRead);
    179         $f = fopen($fileToRead, 'r');
    180     } else {
    181         $f = fopen($fileToRead, 'r');
    182     }
    183     $tagContents = fread($f, filesize($fileToRead));
    184     $tagContents = htmlspecialchars( $tagContents );
     179    if(file_exists(str_replace($current_theme_url,$child_theme_url,$fileToRead))) {
     180        if(fopen(str_replace($current_theme_url,$child_theme_url,$fileToRead), 'r')) { //child theme exists
     181            $fileToRead = str_replace($current_theme_url,$child_theme_url,$fileToRead);
     182            $f = fopen($fileToRead, 'r');
     183        } else {
     184            $f = fopen($fileToRead, 'r');
     185        }
     186        $tagContents = fread($f, filesize($fileToRead));
     187        $tagContents = htmlspecialchars( $tagContents );
     188    }
    185189   
    186190    return $tagContents;
  • cms/trunk/readme.txt

    r382787 r462995  
    44Tags: cms,content,management,system,website,optimal,multiple,content,block,show,more,pages,page,manager,faq,frequently,asked,questions,you,custom,logo,hide,updates,user,friendly,usability
    55Requires at least: 3.0
    6 Tested up to: 3.1.2
    7 Stable tag: 3.0
     6Tested up to: 3.2.1
     7Stable tag: 3.1
    88
    99A collection of plugins to make WordPress feel more like a CMS. It has some small adjustments and some bigger ones. Please only download when you have WordPress 3.0.
     
    3030
    3131== Changelog ==
     32
     33= 3.1 =
     34* Fixed a bug in MCB
    3235
    3336= 3.0 =
Note: See TracChangeset for help on using the changeset viewer.