Automattic / babble

Multilingual WordPress done right.
https://wordpress.org/plugins/babble/
246 stars 50 forks source link

Skip empty page template meta #177

Closed willmot closed 10 years ago

willmot commented 10 years ago

The check for false !== $custom_page_template is too strict as get_post_meta returns an empty string rather than (bool) false. This incorrectly caused the $custom_page_template if statement to return true which then caused a locate_template( array( '' ) ); further down which would fail thus causing pages to fall back to using single.php instead of page.php.

This PR loosens the $custom_page_template check so that any falsey value will cause a fallback to page.php.

The actual code change is in c8f09ce in-case you want just that and not the associated whitespace cleanup in 6f908e1

Would be great to get this merged as it's affecting a current project.

johnbillion commented 10 years ago

Merge into develop in 500cc7c

willmot commented 10 years ago

:+1: