@@ -31,7 +31,7 @@ |
||
31 | 31 | return 1; |
32 | 32 | } |
33 | 33 | |
34 | - $salts = array_map(function ($key) { |
|
34 | + $salts = array_map(function($key) { |
|
35 | 35 | return sprintf("%s='%s'", $key, Installer::generateSalt()); |
36 | 36 | }, self::$KEYS); |
37 | 37 |
@@ -10,4 +10,4 @@ |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | $context = Timber::get_context(); |
13 | -Timber::render( '404.twig', $context ); |
|
13 | +Timber::render('404.twig', $context); |
@@ -10,22 +10,22 @@ |
||
10 | 10 | |
11 | 11 | <section class="no-results not-found"> |
12 | 12 | <header class="page-header"> |
13 | - <h1 class="page-title"><?php _e( 'Nothing Found', 'stash' ); ?></h1> |
|
13 | + <h1 class="page-title"><?php _e('Nothing Found', 'stash'); ?></h1> |
|
14 | 14 | </header><!-- .page-header --> |
15 | 15 | |
16 | 16 | <div class="page-content"> |
17 | - <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?> |
|
17 | + <?php if (is_home() && current_user_can('publish_posts')) : ?> |
|
18 | 18 | |
19 | - <p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'stash' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p> |
|
19 | + <p><?php printf(__('Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'stash'), esc_url(admin_url('post-new.php'))); ?></p> |
|
20 | 20 | |
21 | - <?php elseif ( is_search() ) : ?> |
|
21 | + <?php elseif (is_search()) : ?> |
|
22 | 22 | |
23 | - <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'stash' ); ?></p> |
|
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 | 26 | <?php else : ?> |
27 | 27 | |
28 | - <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'stash' ); ?></p> |
|
28 | + <p><?php _e('It seems we can’t find what you’re looking for. Perhaps searching can help.', 'stash'); ?></p> |
|
29 | 29 | <?php get_search_form(); ?> |
30 | 30 | |
31 | 31 | <?php endif; ?> |
@@ -10,9 +10,9 @@ |
||
10 | 10 | |
11 | 11 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
12 | 12 | <header class="entry-header"> |
13 | - <?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?> |
|
13 | + <?php the_title(sprintf('<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h1>'); ?> |
|
14 | 14 | |
15 | - <?php if ( 'post' == get_post_type() ) : ?> |
|
15 | + <?php if ('post' == get_post_type()) : ?> |
|
16 | 16 | <div class="entry-meta"> |
17 | 17 | <?php stash_posted_on(); ?> |
18 | 18 | </div><!-- .entry-meta --> |
@@ -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); |
@@ -7,4 +7,4 @@ |
||
7 | 7 | * @subpackage Timber |
8 | 8 | */ |
9 | 9 | |
10 | -Timber::render( array( 'sidebar.twig' ), $data ); |
|
10 | +Timber::render(array('sidebar.twig'), $data); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | if (isset(self::$_single)) { return; } |
27 | 27 | |
28 | 28 | self::$_single = $this; // Singleton set. |
29 | - self::$relative_path = '/../' . basename(__DIR__); // Rel path set. |
|
29 | + self::$relative_path = '/../'.basename(__DIR__); // Rel path set. |
|
30 | 30 | |
31 | 31 | if (is_admin()) { |
32 | 32 | add_filter('show_advanced_plugins', array($this, 'showInAdmin'), 0, 2); // Admin only filter. |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $this->countPlugins(); |
45 | 45 | |
46 | 46 | foreach (self::$cache['plugins'] as $plugin_file => $plugin_info) { |
47 | - include_once(WPMU_PLUGIN_DIR . '/' . $plugin_file); |
|
47 | + include_once(WPMU_PLUGIN_DIR.'/'.$plugin_file); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | $this->pluginHooks(); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | $this->updateCache(); // May as well update the transient cache whilst here. |
65 | 65 | |
66 | - self::$auto_plugins = array_map(function ($auto_plugin) { |
|
66 | + self::$auto_plugins = array_map(function($auto_plugin) { |
|
67 | 67 | $auto_plugin['Name'] .= ' *'; |
68 | 68 | return $auto_plugin; |
69 | 69 | }, self::$auto_plugins); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * After that, we can update the cache. |
93 | 93 | */ |
94 | 94 | private function updateCache() { |
95 | - require_once(ABSPATH . 'wp-admin/includes/plugin.php'); |
|
95 | + require_once(ABSPATH.'wp-admin/includes/plugin.php'); |
|
96 | 96 | |
97 | 97 | self::$auto_plugins = get_plugins(self::$relative_path); |
98 | 98 | self::$mu_plugins = get_mu_plugins(self::$relative_path); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | if (!is_array(self::$activated)) { return; } |
114 | 114 | |
115 | 115 | foreach (self::$activated as $plugin_file => $plugin_info) { |
116 | - do_action('activate_' . $plugin_file); |
|
116 | + do_action('activate_'.$plugin_file); |
|
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | private function validatePlugins() { |
124 | 124 | foreach (self::$cache['plugins'] as $plugin_file => $plugin_info) { |
125 | - if (!file_exists(WPMU_PLUGIN_DIR . '/' . $plugin_file)) { |
|
125 | + if (!file_exists(WPMU_PLUGIN_DIR.'/'.$plugin_file)) { |
|
126 | 126 | $this->updateCache(); |
127 | 127 | break; |
128 | 128 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | private function countPlugins() { |
137 | 137 | if (isset(self::$count)) { return self::$count; } |
138 | 138 | |
139 | - $count = count(glob(WPMU_PLUGIN_DIR . '/*/', GLOB_ONLYDIR | GLOB_NOSORT)); |
|
139 | + $count = count(glob(WPMU_PLUGIN_DIR.'/*/', GLOB_ONLYDIR | GLOB_NOSORT)); |
|
140 | 140 | |
141 | 141 | if (!isset(self::$cache['count']) || $count != self::$cache['count']) { |
142 | 142 | self::$count = $count; |
@@ -10,5 +10,5 @@ |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | if (!defined('WP_DEFAULT_THEME')) { |
13 | - register_theme_directory(ABSPATH . 'wp-content/themes'); |
|
13 | + register_theme_directory(ABSPATH.'wp-content/themes'); |
|
14 | 14 | } |
15 | 15 | \ No newline at end of file |
@@ -8,20 +8,20 @@ |
||
8 | 8 | |
9 | 9 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
10 | 10 | <header class="entry-header"> |
11 | - <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> |
|
11 | + <?php the_title('<h1 class="entry-title">', '</h1>'); ?> |
|
12 | 12 | </header><!-- .entry-header --> |
13 | 13 | |
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' ), |
|
17 | + wp_link_pages(array( |
|
18 | + 'before' => '<div class="page-links">'.__('Pages:', 'stash'), |
|
19 | 19 | 'after' => '</div>', |
20 | - ) ); |
|
20 | + )); |
|
21 | 21 | ?> |
22 | 22 | </div><!-- .entry-content --> |
23 | 23 | |
24 | 24 | <footer class="entry-footer"> |
25 | - <?php edit_post_link( __( 'Edit', 'stash' ), '<span class="edit-link">', '</span>' ); ?> |
|
25 | + <?php edit_post_link(__('Edit', 'stash'), '<span class="edit-link">', '</span>'); ?> |
|
26 | 26 | </footer><!-- .entry-footer --> |
27 | 27 | </article><!-- #post-## --> |