Created
June 25, 2010 13:44
-
-
Save ootput/452857 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *** system/themes/k2/theme.php 2010-06-21 22:15:10.587118909 +0800 | |
| --- user/themes/k2/theme.php 2010-06-23 20:00:35.488368879 +0800 | |
| *************** | |
| *** 46,51 **** | |
| --- 46,70 ---- | |
| * template. So the values here, unless checked, will overwrite any existing | |
| * values. | |
| */ | |
| + | |
| + /** | |
| + * Filter the parameters being passed to Posts::get() | |
| + * | |
| + * @param array $filters The parameters to be passed to Posts::get() | |
| + * | |
| + * @return array The updated parameters | |
| + */ | |
| + public function filter_template_where_filters( $filters ) | |
| + { | |
| + | |
| + if( isset( $filters['content_type'] ) ) { | |
| + $types = Utils::single_array( $filters->offsetGet( 'content_type' ) ); | |
| + $types[] = Post::type( 'page' ); | |
| + $filters->offsetSet( 'content_type', $types ); | |
| + } | |
| + return $filters; | |
| + } | |
| + | |
| public function add_template_vars() | |
| { | |
| //Theme Options |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment