@@ -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); |
@@ -20,19 +20,19 @@ |
||
20 | 20 | |
21 | 21 | $data['title'] = 'Archive'; |
22 | 22 | if ( is_day() ) { |
23 | - $data['title'] = 'Archive: '.get_the_date( 'D M Y' ); |
|
23 | + $data['title'] = 'Archive: '.get_the_date( 'D M Y' ); |
|
24 | 24 | } else if ( is_month() ) { |
25 | - $data['title'] = 'Archive: '.get_the_date( 'M Y' ); |
|
25 | + $data['title'] = 'Archive: '.get_the_date( 'M Y' ); |
|
26 | 26 | } else if ( is_year() ) { |
27 | - $data['title'] = 'Archive: '.get_the_date( 'Y' ); |
|
27 | + $data['title'] = 'Archive: '.get_the_date( 'Y' ); |
|
28 | 28 | } else if ( is_tag() ) { |
29 | - $data['title'] = single_tag_title( '', false ); |
|
29 | + $data['title'] = single_tag_title( '', false ); |
|
30 | 30 | } else if ( is_category() ) { |
31 | - $data['title'] = single_cat_title( '', false ); |
|
32 | - array_unshift( $templates, 'archive-' . get_query_var( 'cat' ) . '.twig' ); |
|
31 | + $data['title'] = single_cat_title( '', false ); |
|
32 | + array_unshift( $templates, 'archive-' . get_query_var( 'cat' ) . '.twig' ); |
|
33 | 33 | } else if ( is_post_type_archive() ) { |
34 | - $data['title'] = post_type_archive_title( '', false ); |
|
35 | - array_unshift( $templates, 'archive-' . get_post_type() . '.twig' ); |
|
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(); |
@@ -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); |
@@ -13,8 +13,8 @@ |
||
13 | 13 | $data = Timber::get_context(); |
14 | 14 | $data['posts'] = Timber::get_posts(); |
15 | 15 | if ( isset( $wp_query->query_vars['author'] ) ) { |
16 | - $author = new TimberUser( $wp_query->query_vars['author'] ); |
|
17 | - $data['author'] = $author; |
|
18 | - $data['title'] = 'Author Archives: ' . $author->name(); |
|
16 | + $author = new TimberUser( $wp_query->query_vars['author'] ); |
|
17 | + $data['author'] = $author; |
|
18 | + $data['title'] = 'Author Archives: ' . $author->name(); |
|
19 | 19 | } |
20 | 20 | Timber::render( array( 'author.twig', 'archive.twig' ), $data ); |
@@ -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); |
@@ -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 --> |
@@ -5,7 +5,7 @@ |
||
5 | 5 | */ |
6 | 6 | $timberContext = $GLOBALS['timberContext']; |
7 | 7 | if ( ! isset( $timberContext ) ) { |
8 | - throw new \Exception( 'Timber context not set in footer.' ); |
|
8 | + throw new \Exception( 'Timber context not set in footer.' ); |
|
9 | 9 | } |
10 | 10 | $timberContext['content'] = ob_get_contents(); |
11 | 11 | ob_end_clean(); |
@@ -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); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | $context['comment_form'] = TimberHelper::get_comment_form(); |
17 | 17 | |
18 | 18 | if ( post_password_required( $post->ID ) ) { |
19 | - Timber::render( 'single-password.twig', $context ); |
|
19 | + Timber::render( 'single-password.twig', $context ); |
|
20 | 20 | } else { |
21 | - Timber::render( array( 'single-' . $post->ID . '.twig', 'single-' . $post->post_type . '.twig', 'single.twig' ), $context ); |
|
21 | + Timber::render( array( 'single-' . $post->ID . '.twig', 'single-' . $post->post_type . '.twig', 'single.twig' ), $context ); |
|
22 | 22 | } |
@@ -12,11 +12,11 @@ |
||
12 | 12 | $context = Timber::get_context(); |
13 | 13 | $post = Timber::query_post(); |
14 | 14 | $context['post'] = $post; |
15 | -$context['wp_title'] .= ' - ' . $post->title(); |
|
15 | +$context['wp_title'] .= ' - '.$post->title(); |
|
16 | 16 | $context['comment_form'] = TimberHelper::get_comment_form(); |
17 | 17 | |
18 | -if ( post_password_required( $post->ID ) ) { |
|
19 | - Timber::render( 'single-password.twig', $context ); |
|
18 | +if (post_password_required($post->ID)) { |
|
19 | + Timber::render('single-password.twig', $context); |
|
20 | 20 | } else { |
21 | - Timber::render( array( 'single-' . $post->ID . '.twig', 'single-' . $post->post_type . '.twig', 'single.twig' ), $context ); |
|
21 | + Timber::render(array('single-'.$post->ID.'.twig', 'single-'.$post->post_type.'.twig', 'single.twig'), $context); |
|
22 | 22 | } |
@@ -14,84 +14,84 @@ discard block |
||
14 | 14 | if (!is_blog_installed()) { return; } |
15 | 15 | |
16 | 16 | class Autoloader { |
17 | - private static $cache; // Stores our plugin cache and site option. |
|
18 | - private static $auto_plugins; // Contains the autoloaded plugins (only when needed). |
|
19 | - private static $mu_plugins; // Contains the mu plugins (only when needed). |
|
20 | - private static $count; // Contains the plugin count. |
|
21 | - private static $activated; // Newly activated plugins. |
|
22 | - private static $relative_path; // Relative path to the mu-plugins dir. |
|
23 | - private static $_single; // Let's make this a singleton. |
|
24 | - |
|
25 | - public function __construct() { |
|
17 | + private static $cache; // Stores our plugin cache and site option. |
|
18 | + private static $auto_plugins; // Contains the autoloaded plugins (only when needed). |
|
19 | + private static $mu_plugins; // Contains the mu plugins (only when needed). |
|
20 | + private static $count; // Contains the plugin count. |
|
21 | + private static $activated; // Newly activated plugins. |
|
22 | + private static $relative_path; // Relative path to the mu-plugins dir. |
|
23 | + private static $_single; // Let's make this a singleton. |
|
24 | + |
|
25 | + public function __construct() { |
|
26 | 26 | if (isset(self::$_single)) { return; } |
27 | 27 | |
28 | 28 | self::$_single = $this; // Singleton set. |
29 | 29 | self::$relative_path = '/../' . basename(__DIR__); // Rel path set. |
30 | 30 | |
31 | 31 | if (is_admin()) { |
32 | - add_filter('show_advanced_plugins', array($this, 'showInAdmin'), 0, 2); // Admin only filter. |
|
32 | + add_filter('show_advanced_plugins', array($this, 'showInAdmin'), 0, 2); // Admin only filter. |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | $this->loadPlugins(); |
36 | - } |
|
36 | + } |
|
37 | 37 | |
38 | - /** |
|
39 | - * Run some checks then autoload our plugins. |
|
40 | - */ |
|
41 | - public function loadPlugins() { |
|
38 | + /** |
|
39 | + * Run some checks then autoload our plugins. |
|
40 | + */ |
|
41 | + public function loadPlugins() { |
|
42 | 42 | $this->checkCache(); |
43 | 43 | $this->validatePlugins(); |
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(); |
51 | - } |
|
51 | + } |
|
52 | 52 | |
53 | - /** |
|
54 | - * Filter show_advanced_plugins to display the autoloaded plugins. |
|
55 | - */ |
|
56 | - public function showInAdmin($bool, $type) { |
|
53 | + /** |
|
54 | + * Filter show_advanced_plugins to display the autoloaded plugins. |
|
55 | + */ |
|
56 | + public function showInAdmin($bool, $type) { |
|
57 | 57 | $screen = get_current_screen(); |
58 | 58 | $current = is_multisite() ? 'plugins-network' : 'plugins'; |
59 | 59 | |
60 | 60 | if ($screen->{'base'} != $current || $type != 'mustuse' || !current_user_can('activate_plugins')) { |
61 | - return $bool; |
|
61 | + return $bool; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | $this->updateCache(); // May as well update the transient cache whilst here. |
65 | 65 | |
66 | 66 | self::$auto_plugins = array_map(function ($auto_plugin) { |
67 | - $auto_plugin['Name'] .= ' *'; |
|
68 | - return $auto_plugin; |
|
67 | + $auto_plugin['Name'] .= ' *'; |
|
68 | + return $auto_plugin; |
|
69 | 69 | }, self::$auto_plugins); |
70 | 70 | |
71 | 71 | $GLOBALS['plugins']['mustuse'] = array_unique(array_merge(self::$auto_plugins, self::$mu_plugins), SORT_REGULAR); |
72 | 72 | |
73 | 73 | return false; // Prevent WordPress overriding our work. |
74 | - } |
|
74 | + } |
|
75 | 75 | |
76 | - /** |
|
77 | - * This sets the cache or calls for an update |
|
78 | - */ |
|
79 | - private function checkCache() { |
|
76 | + /** |
|
77 | + * This sets the cache or calls for an update |
|
78 | + */ |
|
79 | + private function checkCache() { |
|
80 | 80 | $cache = get_site_option('bedrock_autoloader'); |
81 | 81 | |
82 | 82 | if ($cache === false) { |
83 | - return $this->updateCache(); |
|
83 | + return $this->updateCache(); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | self::$cache = $cache; |
87 | - } |
|
88 | - |
|
89 | - /** |
|
90 | - * Get the plugins and mu-plugins from the mu-plugin path and remove duplicates. |
|
91 | - * Check cache against current plugins for newly activated plugins. |
|
92 | - * After that, we can update the cache. |
|
93 | - */ |
|
94 | - private function updateCache() { |
|
87 | + } |
|
88 | + |
|
89 | + /** |
|
90 | + * Get the plugins and mu-plugins from the mu-plugin path and remove duplicates. |
|
91 | + * Check cache against current plugins for newly activated plugins. |
|
92 | + * After that, we can update the cache. |
|
93 | + */ |
|
94 | + private function updateCache() { |
|
95 | 95 | require_once(ABSPATH . 'wp-admin/includes/plugin.php'); |
96 | 96 | |
97 | 97 | self::$auto_plugins = get_plugins(self::$relative_path); |
@@ -102,49 +102,49 @@ discard block |
||
102 | 102 | self::$cache = array('plugins' => $plugins, 'count' => $this->countPlugins()); |
103 | 103 | |
104 | 104 | update_site_option('bedrock_autoloader', self::$cache); |
105 | - } |
|
106 | - |
|
107 | - /** |
|
108 | - * This accounts for the plugin hooks that would run if the plugins were |
|
109 | - * loaded as usual. Plugins are removed by deletion, so there's no way |
|
110 | - * to deactivate or uninstall. |
|
111 | - */ |
|
112 | - private function pluginHooks() { |
|
105 | + } |
|
106 | + |
|
107 | + /** |
|
108 | + * This accounts for the plugin hooks that would run if the plugins were |
|
109 | + * loaded as usual. Plugins are removed by deletion, so there's no way |
|
110 | + * to deactivate or uninstall. |
|
111 | + */ |
|
112 | + private function pluginHooks() { |
|
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 | |
120 | - /** |
|
121 | - * Check that the plugin file exists, if it doesn't update the cache. |
|
122 | - */ |
|
123 | - private function validatePlugins() { |
|
120 | + /** |
|
121 | + * Check that the plugin file exists, if it doesn't update the cache. |
|
122 | + */ |
|
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 | + } |
|
129 | + } |
|
129 | 130 | } |
130 | - } |
|
131 | 131 | |
132 | - /** |
|
133 | - * Count our plugins (but only once) by counting the top level folders in the |
|
134 | - * mu-plugins dir. If it's more or less than last time, update the cache. |
|
135 | - */ |
|
136 | - private function countPlugins() { |
|
132 | + /** |
|
133 | + * Count our plugins (but only once) by counting the top level folders in the |
|
134 | + * mu-plugins dir. If it's more or less than last time, update the cache. |
|
135 | + */ |
|
136 | + private function countPlugins() { |
|
137 | 137 | if (isset(self::$count)) { return self::$count; } |
138 | 138 | |
139 | 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 | - self::$count = $count; |
|
143 | - $this->updateCache(); |
|
142 | + self::$count = $count; |
|
143 | + $this->updateCache(); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | return self::$count; |
147 | - } |
|
147 | + } |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | new Autoloader(); |
@@ -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; |