Plugin Directory

Changeset 561679


Ignore:
Timestamp:
06/21/2012 10:48:46 AM (14 years ago)
Author:
technosis
Message:

fixing theme path issue

File:
1 edited

Legend:

Unmodified
Added
Removed
  • templ33t/branches/01_02_handling_posts/templ33t_object.php

    r561667 r561679  
    497497        $templates = array();
    498498       
     499        /*
    499500        $templates[] = locate_template('home.php');
    500501        $templates[] = locate_template('page.php');
     
    503504       
    504505        $custom = get_page_templates();
    505        
     506         
    506507        foreach($custom as $temp) {
     508            $templates[] = $temp;
     509        }
     510        */
     511
     512        $files = array('home.php', 'page.php', 'posts.php', 'single.php');
     513        foreach($templates as $file) {
     514            if(file_exists($theme_dir . $file)) {
     515                $templates[] = $file;
     516            }
     517        }
     518
     519        $custom = wp_get_theme($theme)->get_page_templates();
     520
     521        foreach($custom as $temp => $tempname) {
    507522            $templates[] = $temp;
    508523        }
Note: See TracChangeset for help on using the changeset viewer.