@@ -54,9 +54,9 @@ |
||
54 | 54 | |
55 | 55 | foreach ($list_searcheable_acf as $searcheable_acf) : |
56 | 56 | if ($searcheable_acf == $list_searcheable_acf[0]): |
57 | - $where .= " (meta_key LIKE '%" . $searcheable_acf . "%' AND meta_value LIKE '%$tag%') "; |
|
57 | + $where .= " (meta_key LIKE '%".$searcheable_acf."%' AND meta_value LIKE '%$tag%') "; |
|
58 | 58 | else : |
59 | - $where .= " OR (meta_key LIKE '%" . $searcheable_acf . "%' AND meta_value LIKE '%$tag%') "; |
|
59 | + $where .= " OR (meta_key LIKE '%".$searcheable_acf."%' AND meta_value LIKE '%$tag%') "; |
|
60 | 60 | endif; |
61 | 61 | endforeach; |
62 | 62 |
@@ -23,9 +23,12 @@ |
||
23 | 23 | <p><?php _e('Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'stash'); ?></p> |
24 | 24 | <?php get_search_form(); ?> |
25 | 25 | |
26 | - <?php else : ?> |
|
26 | + <?php else { |
|
27 | + : ?> |
|
27 | 28 | |
28 | - <p><?php _e('It seems we can’t find what you’re looking for. Perhaps searching can help.', 'stash'); ?></p> |
|
29 | + <p><?php _e('It seems we can’t find what you’re looking for. Perhaps searching can help.', 'stash'); |
|
30 | +} |
|
31 | +?></p> |
|
29 | 32 | <?php get_search_form(); ?> |
30 | 33 | |
31 | 34 | <?php endif; ?> |
@@ -12,9 +12,9 @@ |
||
12 | 12 | |
13 | 13 | $data = Timber::get_context(); |
14 | 14 | $data['posts'] = Timber::get_posts(); |
15 | -if ( isset( $wp_query->query_vars['author'] ) ) { |
|
16 | - $author = new TimberUser( $wp_query->query_vars['author'] ); |
|
15 | +if (isset($wp_query->query_vars['author'])) { |
|
16 | + $author = new TimberUser($wp_query->query_vars['author']); |
|
17 | 17 | $data['author'] = $author; |
18 | - $data['title'] = 'Author Archives: ' . $author->name(); |
|
18 | + $data['title'] = 'Author Archives: '.$author->name(); |
|
19 | 19 | } |
20 | -Timber::render( array( 'author.twig', 'archive.twig' ), $data ); |
|
20 | +Timber::render(array('author.twig', 'archive.twig'), $data); |
@@ -16,10 +16,10 @@ |
||
16 | 16 | <div class="entry-content"> |
17 | 17 | <?php the_content(); ?> |
18 | 18 | <?php |
19 | - wp_link_pages( array( |
|
20 | - 'before' => '<div class="page-links">' . __( 'Pages:', 'stash' ), |
|
19 | + wp_link_pages(array( |
|
20 | + 'before' => '<div class="page-links">'.__('Pages:', 'stash'), |
|
21 | 21 | 'after' => '</div>', |
22 | - ) ); |
|
22 | + )); |
|
23 | 23 | ?> |
24 | 24 | </div><!-- .entry-content --> |
25 | 25 |
@@ -18,17 +18,17 @@ |
||
18 | 18 | <div class="entry-content"> |
19 | 19 | <?php |
20 | 20 | /* translators: %s: Name of current post */ |
21 | - the_content( sprintf( |
|
22 | - __( 'Continue reading %s <span class="meta-nav">→</span>', 'stash' ), |
|
23 | - the_title( '<span class="screen-reader-text">"', '"</span>', false ) |
|
24 | - ) ); |
|
21 | + the_content(sprintf( |
|
22 | + __('Continue reading %s <span class="meta-nav">→</span>', 'stash'), |
|
23 | + the_title('<span class="screen-reader-text">"', '"</span>', false) |
|
24 | + )); |
|
25 | 25 | ?> |
26 | 26 | |
27 | 27 | <?php |
28 | - wp_link_pages( array( |
|
29 | - 'before' => '<div class="page-links">' . __( 'Pages:', 'stash' ), |
|
28 | + wp_link_pages(array( |
|
29 | + 'before' => '<div class="page-links">'.__('Pages:', 'stash'), |
|
30 | 30 | 'after' => '</div>', |
31 | - ) ); |
|
31 | + )); |
|
32 | 32 | ?> |
33 | 33 | </div><!-- .entry-content --> |
34 | 34 |
@@ -145,21 +145,21 @@ |
||
145 | 145 | } |
146 | 146 | |
147 | 147 | if ($vendorJsExists) { |
148 | - wp_enqueue_script('stashVendorJs', get_template_directory_uri() . '/dist/js/vendor.js', [], filemtime(get_stylesheet_directory() . '/dist/js/vendor.js'), true); |
|
148 | + wp_enqueue_script('stashVendorJs', get_template_directory_uri().'/dist/js/vendor.js', [], filemtime(get_stylesheet_directory().'/dist/js/vendor.js'), true); |
|
149 | 149 | array_push($mainJsDependencies, 'stashVendorJs'); |
150 | 150 | } |
151 | 151 | |
152 | 152 | if ($mainJsExists) { |
153 | - wp_enqueue_script('stashMainJs', get_template_directory_uri() . '/dist/js/main.js', $mainJsDependencies, filemtime(get_stylesheet_directory() . '/dist/js/main.js'), true); |
|
153 | + wp_enqueue_script('stashMainJs', get_template_directory_uri().'/dist/js/main.js', $mainJsDependencies, filemtime(get_stylesheet_directory().'/dist/js/main.js'), true); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | if ($vendorCssExists) { |
157 | - wp_enqueue_style('stashVendorCss', get_template_directory_uri() . '/dist/css/vendor.css', [], filemtime(get_stylesheet_directory() . '/dist/css/vendor.css')); |
|
157 | + wp_enqueue_style('stashVendorCss', get_template_directory_uri().'/dist/css/vendor.css', [], filemtime(get_stylesheet_directory().'/dist/css/vendor.css')); |
|
158 | 158 | array_push($mainCssDependencies, 'stashVendorCss'); |
159 | 159 | } |
160 | 160 | |
161 | 161 | if ($mainCssExists) { |
162 | - wp_enqueue_style('stashMainCss', get_template_directory_uri() . '/dist/css/main.css', $mainCssDependencies, filemtime(get_stylesheet_directory() . '/dist/css/main.css')); |
|
162 | + wp_enqueue_style('stashMainCss', get_template_directory_uri().'/dist/css/main.css', $mainCssDependencies, filemtime(get_stylesheet_directory().'/dist/css/main.css')); |
|
163 | 163 | } |
164 | 164 | } |
165 | 165 |
@@ -14,11 +14,11 @@ |
||
14 | 14 | <div class="entry-content"> |
15 | 15 | <?php the_content(); ?> |
16 | 16 | <?php |
17 | - wp_link_pages(array( |
|
18 | - 'before' => '<div class="page-links">'.__('Pages:', 'stash'), |
|
19 | - 'after' => '</div>', |
|
20 | - )); |
|
21 | - ?> |
|
17 | + wp_link_pages(array( |
|
18 | + 'before' => '<div class="page-links">'.__('Pages:', 'stash'), |
|
19 | + 'after' => '</div>', |
|
20 | + )); |
|
21 | + ?> |
|
22 | 22 | </div><!-- .entry-content --> |
23 | 23 | |
24 | 24 | <footer class="entry-footer"> |
@@ -14,27 +14,27 @@ |
||
14 | 14 | * @since Timber 0.2 |
15 | 15 | */ |
16 | 16 | |
17 | -$templates = array( 'archive.twig', 'index.twig' ); |
|
17 | +$templates = array('archive.twig', 'index.twig'); |
|
18 | 18 | |
19 | 19 | $data = Timber::get_context(); |
20 | 20 | |
21 | 21 | $data['title'] = 'Archive'; |
22 | -if ( is_day() ) { |
|
23 | - $data['title'] = 'Archive: '.get_the_date( 'D M Y' ); |
|
24 | -} else if ( is_month() ) { |
|
25 | - $data['title'] = 'Archive: '.get_the_date( 'M Y' ); |
|
26 | -} else if ( is_year() ) { |
|
27 | - $data['title'] = 'Archive: '.get_the_date( 'Y' ); |
|
28 | -} else if ( is_tag() ) { |
|
29 | - $data['title'] = single_tag_title( '', false ); |
|
30 | -} else if ( is_category() ) { |
|
31 | - $data['title'] = single_cat_title( '', false ); |
|
32 | - array_unshift( $templates, 'archive-' . get_query_var( 'cat' ) . '.twig' ); |
|
33 | -} else if ( is_post_type_archive() ) { |
|
34 | - $data['title'] = post_type_archive_title( '', false ); |
|
35 | - array_unshift( $templates, 'archive-' . get_post_type() . '.twig' ); |
|
22 | +if (is_day()) { |
|
23 | + $data['title'] = 'Archive: '.get_the_date('D M Y'); |
|
24 | +} else if (is_month()) { |
|
25 | + $data['title'] = 'Archive: '.get_the_date('M Y'); |
|
26 | +} else if (is_year()) { |
|
27 | + $data['title'] = 'Archive: '.get_the_date('Y'); |
|
28 | +} else if (is_tag()) { |
|
29 | + $data['title'] = single_tag_title('', false); |
|
30 | +} else if (is_category()) { |
|
31 | + $data['title'] = single_cat_title('', false); |
|
32 | + array_unshift($templates, 'archive-'.get_query_var('cat').'.twig'); |
|
33 | +} else if (is_post_type_archive()) { |
|
34 | + $data['title'] = post_type_archive_title('', false); |
|
35 | + array_unshift($templates, 'archive-'.get_post_type().'.twig'); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | $data['posts'] = Timber::get_posts(); |
39 | 39 | |
40 | -Timber::render( $templates, $data ); |
|
40 | +Timber::render($templates, $data); |
@@ -4,10 +4,10 @@ |
||
4 | 4 | * We use this to end our output buffer (started in header.php) and render into the view/page-plugin.twig template. |
5 | 5 | */ |
6 | 6 | $timberContext = $GLOBALS['timberContext']; |
7 | -if ( ! isset( $timberContext ) ) { |
|
8 | - throw new \Exception( 'Timber context not set in footer.' ); |
|
7 | +if (!isset($timberContext)) { |
|
8 | + throw new \Exception('Timber context not set in footer.'); |
|
9 | 9 | } |
10 | 10 | $timberContext['content'] = ob_get_contents(); |
11 | 11 | ob_end_clean(); |
12 | -$templates = array( 'page-plugin.twig' ); |
|
13 | -Timber::render( $templates, $timberContext ); |
|
12 | +$templates = array('page-plugin.twig'); |
|
13 | +Timber::render($templates, $timberContext); |