Changeset 559312
- Timestamp:
- 06/17/2012 06:55:44 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
templ33t/branches/01_02_handling_posts/templ33t_object.php
r559299 r559312 490 490 } 491 491 492 function parseTheme($theme = null ) {492 function parseTheme($theme = null, $orig = array()) { 493 493 494 494 $themes = get_themes(); 495 495 $theme = get_theme_data(get_theme_root() . '/' . $theme . '/style.css'); 496 496 497 print_r($themes[$theme['Name']]); 498 499 $home = locate_template('home.php'); 500 $page = locate_template('page.php'); 497 $templates = array(); 498 499 $templates[] = locate_template('home.php'); 500 $templates[] = locate_template('page.php'); 501 $templates[] = locate_template('posts.php'); 502 $templates[] = locate_template('single.php'); 503 501 504 $custom = get_page_templates(); 502 $posts = locate_template('posts.php'); 503 $single = locate_template('single.php'); 504 505 echo 'HOME: '.$home.'<br/>' 506 . 'PAGE: '.$page.'<br/>' 507 . 'CUSTOM: '.print_r($custom, true).'<br/>' 508 . 'POSTS: '.$posts.'<br/>' 509 . 'SINGLE: '.$single.'<br/>'; 510 505 506 foreach($custom as $temp) { 507 $templates[] = $temp; 508 } 509 510 $config = array(); 511 512 foreach($templates as $temp) { 513 514 $temp = basename($temp); 515 516 if(!empty($temp) && !array_key_exists($temp)) { 517 518 if(array_key_exists($temp, $orig)) { 519 520 $config[$temp] = $this->parseTemplate(get_theme_root() . '/' . $theme . '/' . $temp, $theme, $orig[$temp]); 521 522 } else { 523 524 $config[$temp] = $this->parseTemplate(get_theme_root() . '/' . $theme . '/' . $temp, $theme); 525 526 } 527 528 } 529 530 } 531 532 print_r($config); 511 533 die(); 512 534 535 return $config; 513 536 514 537 … … 1801 1824 1802 1825 // get templates 1803 $templates = $this->parseTheme($theme );1826 $templates = $this->parseTheme($theme, $compare); 1804 1827 1805 1828 if ($compare != $templates) {
Note: See TracChangeset
for help on using the changeset viewer.