@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | ]); |
14 | 14 | } |
15 | 15 | |
16 | -add_action('init', __NAMESPACE__ . '\\setControllers'); |
|
16 | +add_action('init', __NAMESPACE__.'\\setControllers'); |
|
17 | 17 | |
18 | 18 | function setup() |
19 | 19 | { |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | // Make theme available for translation |
29 | 29 | // Community translations can be found at https://github.com/roots/sage-translations |
30 | - load_theme_textdomain('stash', get_template_directory() . '/lang'); |
|
30 | + load_theme_textdomain('stash', get_template_directory().'/lang'); |
|
31 | 31 | |
32 | 32 | // Enable plugins to manage the document title |
33 | 33 | // http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag |
@@ -56,4 +56,4 @@ discard block |
||
56 | 56 | add_theme_support('menus'); |
57 | 57 | } |
58 | 58 | |
59 | -add_action('after_setup_theme', __NAMESPACE__ . '\\setup'); |
|
59 | +add_action('after_setup_theme', __NAMESPACE__.'\\setup'); |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | $root_dir = dirname(__DIR__); |
5 | 5 | |
6 | 6 | /** @var string Document Root */ |
7 | -$webroot_dir = $root_dir . '/web'; |
|
7 | +$webroot_dir = $root_dir.'/web'; |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * Expose global env() function from oscarotero/env |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * Use Dotenv to set required environment variables and load .env file in root |
16 | 16 | */ |
17 | 17 | $dotenv = new Dotenv\Dotenv($root_dir); |
18 | -if (file_exists($root_dir . '/.env')) { |
|
18 | +if (file_exists($root_dir.'/.env')) { |
|
19 | 19 | $dotenv->load(); |
20 | 20 | $dotenv->required(['DB_NAME', 'DB_USER', 'DB_PASSWORD', 'ENV_DEVELOPMENT']); |
21 | 21 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | define('WP_ENV', env('WP_ENV') ?: 'development'); |
28 | 28 | |
29 | -$env_config = __DIR__ . '/environments/' . WP_ENV . '.php'; |
|
29 | +$env_config = __DIR__.'/environments/'.WP_ENV.'.php'; |
|
30 | 30 | |
31 | 31 | if (file_exists($env_config)) { |
32 | 32 | require_once $env_config; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $WP_HOME = $envs['development']; |
57 | 57 | } |
58 | 58 | |
59 | -$WP_SITEURL = $WP_HOME . '/wp'; |
|
59 | +$WP_SITEURL = $WP_HOME.'/wp'; |
|
60 | 60 | |
61 | 61 | define('WP_HOME', $WP_HOME); |
62 | 62 | define('WP_SITEURL', $WP_SITEURL); |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | * Custom Content Directory |
66 | 66 | */ |
67 | 67 | define('CONTENT_DIR', '/app'); |
68 | -define('WP_CONTENT_DIR', $webroot_dir . CONTENT_DIR); |
|
69 | -define('WP_CONTENT_URL', WP_HOME . CONTENT_DIR); |
|
68 | +define('WP_CONTENT_DIR', $webroot_dir.CONTENT_DIR); |
|
69 | +define('WP_CONTENT_URL', WP_HOME.CONTENT_DIR); |
|
70 | 70 | |
71 | 71 | /** |
72 | 72 | * DB settings |
@@ -102,5 +102,5 @@ discard block |
||
102 | 102 | * Bootstrap WordPress |
103 | 103 | */ |
104 | 104 | if (!defined('ABSPATH')) { |
105 | - define('ABSPATH', $webroot_dir . '/wp/'); |
|
105 | + define('ABSPATH', $webroot_dir.'/wp/'); |
|
106 | 106 | } |
107 | 107 | \ No newline at end of file |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | self::$_single = $this; |
55 | - self::$relative_path = '/../' . basename(__DIR__); |
|
55 | + self::$relative_path = '/../'.basename(__DIR__); |
|
56 | 56 | |
57 | 57 | if (is_admin()) { |
58 | 58 | add_filter('show_advanced_plugins', [$this, 'showInAdmin'], 0, 2); |
@@ -70,8 +70,8 @@ discard block |
||
70 | 70 | $this->validatePlugins(); |
71 | 71 | $this->countPlugins(); |
72 | 72 | |
73 | - array_map(static function () { |
|
74 | - include_once(WPMU_PLUGIN_DIR . '/' . func_get_args()[0]); |
|
73 | + array_map(static function() { |
|
74 | + include_once(WPMU_PLUGIN_DIR.'/'.func_get_args()[0]); |
|
75 | 75 | }, array_keys(self::$cache['plugins'])); |
76 | 76 | |
77 | 77 | $this->pluginHooks(); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | $this->updateCache(); |
97 | 97 | |
98 | - self::$auto_plugins = array_map(function ($auto_plugin) { |
|
98 | + self::$auto_plugins = array_map(function($auto_plugin) { |
|
99 | 99 | $auto_plugin['Name'] .= ' *'; |
100 | 100 | |
101 | 101 | return $auto_plugin; |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | */ |
130 | 130 | private function updateCache() |
131 | 131 | { |
132 | - require_once(ABSPATH . 'wp-admin/includes/plugin.php'); |
|
132 | + require_once(ABSPATH.'wp-admin/includes/plugin.php'); |
|
133 | 133 | |
134 | 134 | self::$auto_plugins = get_plugins(self::$relative_path); |
135 | 135 | self::$mu_plugins = get_mu_plugins(); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | } |
154 | 154 | |
155 | 155 | foreach (self::$activated as $plugin_file => $plugin_info) { |
156 | - do_action('activate_' . $plugin_file); |
|
156 | + do_action('activate_'.$plugin_file); |
|
157 | 157 | } |
158 | 158 | } |
159 | 159 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | private function validatePlugins() |
164 | 164 | { |
165 | 165 | foreach (self::$cache['plugins'] as $plugin_file => $plugin_info) { |
166 | - if (!file_exists(WPMU_PLUGIN_DIR . '/' . $plugin_file)) { |
|
166 | + if (!file_exists(WPMU_PLUGIN_DIR.'/'.$plugin_file)) { |
|
167 | 167 | $this->updateCache(); |
168 | 168 | break; |
169 | 169 | } |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | return self::$count; |
185 | 185 | } |
186 | 186 | |
187 | - $count = count(glob(WPMU_PLUGIN_DIR . '/*/', GLOB_ONLYDIR | GLOB_NOSORT)); |
|
187 | + $count = count(glob(WPMU_PLUGIN_DIR.'/*/', GLOB_ONLYDIR | GLOB_NOSORT)); |
|
188 | 188 | |
189 | 189 | if (!isset(self::$cache['count']) || $count != self::$cache['count']) { |
190 | 190 | self::$count = $count; |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | function get($name) |
13 | 13 | { |
14 | - return get_template_directory_uri() . '/dist/images/' . $name; |
|
14 | + return get_template_directory_uri().'/dist/images/'.$name; |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | /** |
@@ -22,12 +22,12 @@ discard block |
||
22 | 22 | */ |
23 | 23 | function fetch($name) |
24 | 24 | { |
25 | - return get_stylesheet_directory() . '/dist/images/' . $name; |
|
25 | + return get_stylesheet_directory().'/dist/images/'.$name; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | function display($name) |
29 | 29 | { |
30 | - return "<img src='" . $this->get($name) . "' />"; |
|
30 | + return "<img src='".$this->get($name)."' />"; |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
@@ -2,19 +2,19 @@ |
||
2 | 2 | |
3 | 3 | $context['title'] = 'Archive'; |
4 | 4 | if (is_day()) { |
5 | - $context['title'] = 'Archive: ' . get_the_date('D M Y'); |
|
5 | + $context['title'] = 'Archive: '.get_the_date('D M Y'); |
|
6 | 6 | } else if (is_month()) { |
7 | - $context['title'] = 'Archive: ' . get_the_date('M Y'); |
|
7 | + $context['title'] = 'Archive: '.get_the_date('M Y'); |
|
8 | 8 | } else if (is_year()) { |
9 | - $context['title'] = 'Archive: ' . get_the_date('Y'); |
|
9 | + $context['title'] = 'Archive: '.get_the_date('Y'); |
|
10 | 10 | } else if (is_tag()) { |
11 | 11 | $context['title'] = single_tag_title('', false); |
12 | 12 | } else if (is_category()) { |
13 | 13 | $context['title'] = single_cat_title('', false); |
14 | - array_unshift($templates, 'archive-' . get_query_var('cat') . '.twig'); |
|
14 | + array_unshift($templates, 'archive-'.get_query_var('cat').'.twig'); |
|
15 | 15 | } else if (is_post_type_archive()) { |
16 | 16 | $context['title'] = post_type_archive_title('', false); |
17 | - array_unshift($templates, 'archive-' . get_post_type() . '.twig'); |
|
17 | + array_unshift($templates, 'archive-'.get_post_type().'.twig'); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | $context['posts'] = Timber::get_posts(); |
@@ -1,4 +1,4 @@ |
||
1 | 1 | <?php |
2 | 2 | use Undefined\Stash\Cache; |
3 | 3 | |
4 | -Timber::render(array('single-' . $context['post']->ID . '.twig', 'single-' . $context['post']->post_type . '.twig', 'single.twig'), $context, Cache::getTimerTime()); |
|
4 | +Timber::render(array('single-'.$context['post']->ID.'.twig', 'single-'.$context['post']->post_type.'.twig', 'single.twig'), $context, Cache::getTimerTime()); |
@@ -58,7 +58,7 @@ |
||
58 | 58 | $twig->addExtension(new Twig_Extension_StringLoader()); |
59 | 59 | $twig->addGlobal('image', new ImageHelper()); |
60 | 60 | |
61 | - $filter = new Twig_SimpleFilter("translate", function ($string) { |
|
61 | + $filter = new Twig_SimpleFilter("translate", function ($string) { |
|
62 | 62 | pll_register_string($string, $string, "stash"); |
63 | 63 | |
64 | 64 | return pll__($string); |
@@ -6,8 +6,8 @@ discard block |
||
6 | 6 | */ |
7 | 7 | |
8 | 8 | if (!class_exists('Timber')) { |
9 | - add_action('admin_notices', function () { |
|
10 | - echo '<div class="error"><p>Timber not activated. Make sure you activate the plugin in <a href="' . esc_url(admin_url('plugins.php#timber')) . '">' . esc_url(admin_url('plugins.php')) . '</a></p></div>'; |
|
9 | + add_action('admin_notices', function() { |
|
10 | + echo '<div class="error"><p>Timber not activated. Make sure you activate the plugin in <a href="'.esc_url(admin_url('plugins.php#timber')).'">'.esc_url(admin_url('plugins.php')).'</a></p></div>'; |
|
11 | 11 | }); |
12 | 12 | |
13 | 13 | return; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $twig->addExtension(new Twig_Extension_StringLoader()); |
59 | 59 | $twig->addGlobal('image', new ImageHelper()); |
60 | 60 | |
61 | - $filter = new Twig_SimpleFilter("translate", function ($string) { |
|
61 | + $filter = new Twig_SimpleFilter("translate", function($string) { |
|
62 | 62 | pll_register_string($string, $string, "stash"); |
63 | 63 | |
64 | 64 | return pll__($string); |