@@ -131,11 +131,11 @@ discard block |
||
| 131 | 131 | public function set_template_data( $data, $var_name = 'data' ) { |
| 132 | 132 | global $wp_query; |
| 133 | 133 | |
| 134 | - $wp_query->query_vars[ $var_name ] = (object) $data; |
|
| 134 | + $wp_query->query_vars[ $var_name ] = (object)$data; |
|
| 135 | 135 | |
| 136 | 136 | // Add $var_name to custom variable store if not default value. |
| 137 | 137 | if ( 'data' !== $var_name ) { |
| 138 | - $this->template_data_var_names[] = $var_name; |
|
| 138 | + $this->template_data_var_names[ ] = $var_name; |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | return $this; |
@@ -178,9 +178,9 @@ discard block |
||
| 178 | 178 | protected function get_template_file_names( $slug, $name ) { |
| 179 | 179 | $templates = array(); |
| 180 | 180 | if ( isset( $name ) ) { |
| 181 | - $templates[] = $slug . '-' . $name . '.php'; |
|
| 181 | + $templates[ ] = $slug . '-' . $name . '.php'; |
|
| 182 | 182 | } |
| 183 | - $templates[] = $slug . '.php'; |
|
| 183 | + $templates[ ] = $slug . '.php'; |
|
| 184 | 184 | |
| 185 | 185 | /** |
| 186 | 186 | * Allow template choices to be filtered. |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | $located = false; |
| 227 | 227 | |
| 228 | 228 | // Remove empty entries. |
| 229 | - $template_names = array_filter( (array) $template_names ); |
|
| 229 | + $template_names = array_filter( (array)$template_names ); |
|
| 230 | 230 | $template_paths = $this->get_template_paths(); |
| 231 | 231 | |
| 232 | 232 | // Try to find a template file. |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | // The templates weren't found; don't look this up again. |
| 249 | - if( ! $located ) { |
|
| 249 | + if ( ! $located ) { |
|
| 250 | 250 | $template_path_cache[ $this->filter_prefix ][ $cache_key ] = false; |
| 251 | 251 | } |
| 252 | 252 | } |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | |
| 286 | 286 | // Only add this conditionally, so non-child themes don't redundantly check active theme twice. |
| 287 | 287 | if ( get_stylesheet_directory() !== get_template_directory() ) { |
| 288 | - $file_paths[1] = trailingslashit( get_stylesheet_directory() ) . $theme_directory; |
|
| 288 | + $file_paths[ 1 ] = trailingslashit( get_stylesheet_directory() ) . $theme_directory; |
|
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | /** |