ansonphong / postworld

Wordpress Theme Development Framework
GNU General Public License v2.0
7 stars 0 forks source link

pw_get_templates ( $templates_object ) #25

Closed hmikhail closed 11 years ago

hmikhail commented 11 years ago

Hello phong,

I have a question concerning pw_get_templates

In case of if($templates_object['posts']), if template name is link-detail.html The scenario will be as follows: (please confirm)

Check if ( link-detail.html doesn't exist in override path then use post-list. and if post-list is not present in the override path then use that in the default path?

ansonphong commented 11 years ago

If I understand what you're saying, it's slightly different. This is the order :

  1. Check if 'link-detail.html' exists in the over-ride template path. If not: (default to 'post')
  2. Check if 'post-detail.html' exists in the over-ride template path. If not: (default to default templates path)
  3. Use 'post-detail.html' in the default template path.

This is how it's described here : https://github.com/phongmedia/postworld/tree/master/php#pw_get_templates--templates_object-

  1. First fallback to 'post' as post_type,
  2. Second fallback to 'default templates path'

Let me know if that makes sense.