@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | * |
| 16 | 16 | * @since 0.1.0 |
| 17 | 17 | * |
| 18 | - * @param string $feature Name of the feature. |
|
| 18 | + * @param string $featureName Name of the feature. |
|
| 19 | 19 | * |
| 20 | 20 | * @return array|null Returns an array of options or null if the feature wasn't found. |
| 21 | 21 | */ |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * |
| 33 | 33 | * @since 0.1.0 |
| 34 | 34 | * |
| 35 | - * @param string $feature Name of the feature. |
|
| 35 | + * @param string $featureName Name of the feature. |
|
| 36 | 36 | * @param string $key The option key. |
| 37 | 37 | * |
| 38 | 38 | * @return mixed|null Returns the option or null if the option / the feature doesn't exist. |
@@ -63,11 +63,11 @@ discard block |
||
| 63 | 63 | * |
| 64 | 64 | * @since 0.1.0 |
| 65 | 65 | * |
| 66 | - * @param string $feature Name of the feature. |
|
| 66 | + * @param string $featureName Name of the feature. |
|
| 67 | 67 | * @param string $basePath The feature base path. |
| 68 | 68 | * @param array $options An array of options. Optional. |
| 69 | 69 | * |
| 70 | - * @return boolean |
|
| 70 | + * @return boolean|null |
|
| 71 | 71 | */ |
| 72 | 72 | public static function register($featureName, $basePath, $options = []) |
| 73 | 73 | { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | public static function setTemplateDirectory() |
| 44 | 44 | { |
| 45 | - add_action('after_switch_theme', function () { |
|
| 45 | + add_action('after_switch_theme', function() { |
|
| 46 | 46 | $stylesheet = get_option('stylesheet'); |
| 47 | 47 | |
| 48 | 48 | if (basename($stylesheet) !== 'templates') { |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | } |
| 51 | 51 | }); |
| 52 | 52 | |
| 53 | - add_filter('stylesheet', function ($stylesheet) { |
|
| 53 | + add_filter('stylesheet', function($stylesheet) { |
|
| 54 | 54 | return dirname($stylesheet); |
| 55 | 55 | }); |
| 56 | 56 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | if (!$acfActive || !$flyntCoreActive) { |
| 72 | - add_filter('template_include', function () { |
|
| 72 | + add_filter('template_include', function() { |
|
| 73 | 73 | die( |
| 74 | 74 | 'One or more required plugins are not activated! Please <a href="' |
| 75 | 75 | . esc_url(admin_url('plugins.php')) |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | protected static function notifyRequiredPluginIsMissing($pluginName) |
| 85 | 85 | { |
| 86 | - add_action('admin_notices', function () use ($pluginName) { |
|
| 86 | + add_action('admin_notices', function() use ($pluginName) { |
|
| 87 | 87 | echo "<div class=\"error\"><p>${pluginName} Plugin not activated. Make sure you activate the plugin on the <a href=\"" |
| 88 | 88 | . esc_url(admin_url('plugins.php')) . "\">plugin page</a>.</p></div>"; |
| 89 | 89 | }); |
@@ -149,10 +149,10 @@ |
||
| 149 | 149 | } |
| 150 | 150 | if ($type === 'style') { |
| 151 | 151 | global $wp_styles; |
| 152 | - $repo =& $wp_styles; |
|
| 152 | + $repo = & $wp_styles; |
|
| 153 | 153 | } else { |
| 154 | 154 | global $wp_scripts; |
| 155 | - $repo =& $wp_scripts; |
|
| 155 | + $repo = & $wp_scripts; |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | $asset = $repo->query($handle, 'registered'); |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -add_action('after_setup_theme', function () { |
|
| 3 | +add_action('after_setup_theme', function() { |
|
| 4 | 4 | add_theme_support('title-tag'); |
| 5 | 5 | add_theme_support('post-thumbnails'); |
| 6 | 6 | }); |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use Flynt; |
| 6 | 6 | use Flynt\Utils\Oembed; |
| 7 | 7 | |
| 8 | -add_filter('Flynt/addComponentData?name=BlockVideoOembed', function ($data) { |
|
| 8 | +add_filter('Flynt/addComponentData?name=BlockVideoOembed', function($data) { |
|
| 9 | 9 | $data['video'] = Oembed::setSrcAsDataAttribute( |
| 10 | 10 | $data['oembed'], |
| 11 | 11 | [ |
@@ -5,9 +5,9 @@ |
||
| 5 | 5 | use Flynt; |
| 6 | 6 | use Flynt\Utils\Asset; |
| 7 | 7 | |
| 8 | -add_filter('Flynt/addComponentData?name=ListSocial', function ($data) { |
|
| 8 | +add_filter('Flynt/addComponentData?name=ListSocial', function($data) { |
|
| 9 | 9 | if (!empty($data['social'])) { |
| 10 | - $data['social'] = array_map(function ($item) { |
|
| 10 | + $data['social'] = array_map(function($item) { |
|
| 11 | 11 | $item['icon'] = Asset::getContents("Components/ListSocial/Assets/{$item['platform']}.svg"); |
| 12 | 12 | return $item; |
| 13 | 13 | }, $data['social']); |
@@ -5,13 +5,13 @@ |
||
| 5 | 5 | use Timber\Menu; |
| 6 | 6 | use Flynt\Utils\Asset; |
| 7 | 7 | |
| 8 | -add_action('init', function () { |
|
| 8 | +add_action('init', function() { |
|
| 9 | 9 | register_nav_menus([ |
| 10 | 10 | 'navigation_main' => __('Navigation Main', 'flynt-starter-theme') |
| 11 | 11 | ]); |
| 12 | 12 | }); |
| 13 | 13 | |
| 14 | -add_filter('Flynt/addComponentData?name=NavigationMain', function ($data) { |
|
| 14 | +add_filter('Flynt/addComponentData?name=NavigationMain', function($data) { |
|
| 15 | 15 | $data['maxLevel'] = 0; |
| 16 | 16 | $data['menu'] = new Menu('navigation_main'); |
| 17 | 17 | |
@@ -4,13 +4,13 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Timber\Menu; |
| 6 | 6 | |
| 7 | -add_action('init', function () { |
|
| 7 | +add_action('init', function() { |
|
| 8 | 8 | register_nav_menus([ |
| 9 | 9 | 'navigation_footer' => __('Navigation Footer', 'flynt-starter-theme') |
| 10 | 10 | ]); |
| 11 | 11 | }); |
| 12 | 12 | |
| 13 | -add_filter('Flynt/addComponentData?name=NavigationFooter', function ($data) { |
|
| 13 | +add_filter('Flynt/addComponentData?name=NavigationFooter', function($data) { |
|
| 14 | 14 | $data['maxLevel'] = 0; |
| 15 | 15 | $data['menu'] = new Menu('navigation_footer'); |
| 16 | 16 | |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | use Flynt; |
| 5 | 5 | use Timber\Timber; |
| 6 | 6 | |
| 7 | -add_filter('Flynt/addComponentData?name=ListPostCards', function ($data) { |
|
| 7 | +add_filter('Flynt/addComponentData?name=ListPostCards', function($data) { |
|
| 8 | 8 | $posts = Timber::get_posts([ |
| 9 | 9 | 'post_type' => 'post', |
| 10 | 10 | 'posts_per_page' => 4, |