Changeset 462984
- Timestamp:
- 11/15/2011 08:32:51 AM (14 years ago)
- Location:
- multiple-content-blocks
- Files:
-
- 5 added
- 2 edited
-
tags/2.0 (added)
-
tags/2.0/multiple_content.php (added)
-
tags/2.0/readme.txt (added)
-
tags/2.0/screenshot-1.jpg (added)
-
tags/2.0/screenshot-2.jpg (added)
-
trunk/multiple_content.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
multiple-content-blocks/trunk/multiple_content.php
r382789 r462984 68 68 $current_theme_url = $theme['Template']; 69 69 $child_theme_url = str_replace('themes/','',strstr(get_stylesheet_directory_uri(),'themes/')); 70 71 if(fopen(str_replace($current_theme_url,$child_theme_url,$fileToRead), 'r')) { //child theme exists 72 $fileToRead = str_replace($current_theme_url,$child_theme_url,$fileToRead); 73 $f = fopen($fileToRead, 'r'); 74 } else { 75 $f = fopen($fileToRead, 'r'); 76 } 77 $contents = fread($f, filesize($fileToRead)); 78 $contents = htmlspecialchars( $contents ); 70 71 if(file_exists(str_replace($current_theme_url,$child_theme_url,$fileToRead))) { 72 if(fopen(str_replace($current_theme_url,$child_theme_url,$fileToRead), 'r')) { //child theme exists 73 $fileToRead = str_replace($current_theme_url,$child_theme_url,$fileToRead); 74 $f = fopen($fileToRead, 'r'); 75 } else { 76 $f = fopen($fileToRead, 'r'); 77 } 78 $contents = fread($f, filesize($fileToRead)); 79 $contents = htmlspecialchars( $contents ); 80 } 79 81 80 82 //read the templates header, sidebar and footer, added in v1.1 … … 184 186 $child_theme_url = str_replace('themes/','',strstr(get_stylesheet_directory_uri(),'themes/')); 185 187 186 if(fopen(str_replace($current_theme_url,$child_theme_url,$fileToRead), 'r')) { //child theme exists 187 $fileToRead = str_replace($current_theme_url,$child_theme_url,$fileToRead); 188 $f = fopen($fileToRead, 'r'); 189 } else { 190 $f = fopen($fileToRead, 'r'); 191 } 192 $tagContents = fread($f, filesize($fileToRead)); 193 $tagContents = htmlspecialchars( $tagContents ); 188 if(file_exists(str_replace($current_theme_url,$child_theme_url,$fileToRead))) { 189 if(fopen(str_replace($current_theme_url,$child_theme_url,$fileToRead), 'r')) { //child theme exists 190 $fileToRead = str_replace($current_theme_url,$child_theme_url,$fileToRead); 191 $f = fopen($fileToRead, 'r'); 192 } else { 193 $f = fopen($fileToRead, 'r'); 194 } 195 $tagContents = fread($f, filesize($fileToRead)); 196 $tagContents = htmlspecialchars( $tagContents ); 197 } 194 198 195 199 return $tagContents; -
multiple-content-blocks/trunk/readme.txt
r382789 r462984 4 4 Tags: multiple,content,blocks,multiplecontent,page,pageblocks 5 5 Requires at least: 2.8 6 Tested up to: 3. 1.27 Stable tag: 2. 06 Tested up to: 3.2.1 7 Stable tag: 2.1 8 8 9 9 Lets you use more than one content "block" on a template. You only have to insert one tag inside the template, so it's easy to use. … … 41 41 42 42 == Changelog == 43 44 = 2.1 = 45 * Fixed the bug that caused errors to show in the meta box when there was no template 43 46 44 47 = 2.0 =
Note: See TracChangeset
for help on using the changeset viewer.