@@ -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') |
| 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 | |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use Flynt\Api; |
| 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 | [ |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | use ACFComposer\ACFComposer; |
| 4 | 4 | use Flynt\Api; |
| 5 | 5 | |
| 6 | -add_action('Flynt/afterRegisterComponents', function () { |
|
| 6 | +add_action('Flynt/afterRegisterComponents', function() { |
|
| 7 | 7 | ACFComposer::registerFieldGroup([ |
| 8 | 8 | 'name' => 'pageComponents', |
| 9 | 9 | 'title' => 'Page Components', |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | use ACFComposer\ACFComposer; |
| 4 | 4 | use Flynt\Api; |
| 5 | 5 | |
| 6 | -add_action('Flynt/afterRegisterComponents', function () { |
|
| 6 | +add_action('Flynt/afterRegisterComponents', function() { |
|
| 7 | 7 | ACFComposer::registerFieldGroup([ |
| 8 | 8 | 'name' => 'postComponents', |
| 9 | 9 | 'title' => 'Post Components', |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | |
| 9 | 9 | use Flynt\Utils\Asset; |
| 10 | 10 | |
| 11 | -add_action('wp_enqueue_scripts', function () { |
|
| 11 | +add_action('wp_enqueue_scripts', function() { |
|
| 12 | 12 | $jqueryVersion = wp_scripts()->registered['jquery']->ver; |
| 13 | 13 | wp_deregister_script('jquery'); |
| 14 | 14 | |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | define(__NAMESPACE__ . '\NS', __NAMESPACE__ . '\\'); |
| 12 | 12 | |
| 13 | -add_action('Flynt/afterRegisterComponents', function () { |
|
| 13 | +add_action('Flynt/afterRegisterComponents', function() { |
|
| 14 | 14 | if ((WP_ENV === 'development' || current_user_can('editor') || current_user_can('administrator')) && isset($_GET['log'])) { |
| 15 | 15 | if (isset($_GET['component']) && !empty($_GET['component'])) { |
| 16 | 16 | define(__NAMESPACE__ . '\COMPONENT_WHITELIST', explode(',', $_GET['component'])); |
@@ -36,21 +36,21 @@ discard block |
||
| 36 | 36 | { |
| 37 | 37 | $type = gettype($data); |
| 38 | 38 | $output = json_encode($data); |
| 39 | - $result = "<script>console.log({$output});</script>\n"; |
|
| 39 | + $result = "<script>console.log({$output});</script>\n"; |
|
| 40 | 40 | echoDebug($result, $postpone); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | function consoleTable($data, $postpone = true) |
| 44 | 44 | { |
| 45 | 45 | $output = json_encode($data); |
| 46 | - $result = "<script>console.table({$output});</script>\n"; |
|
| 46 | + $result = "<script>console.table({$output});</script>\n"; |
|
| 47 | 47 | echoDebug($result, $postpone); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | function echoDebug($data, $postpone) |
| 51 | 51 | { |
| 52 | 52 | if ($postpone) { |
| 53 | - add_action('wp_footer', function () use ($data) { |
|
| 53 | + add_action('wp_footer', function() use ($data) { |
|
| 54 | 54 | echo $data; |
| 55 | 55 | }, 30); |
| 56 | 56 | } else { |
@@ -21,12 +21,12 @@ discard block |
||
| 21 | 21 | function disallowRobots() |
| 22 | 22 | { |
| 23 | 23 | if (defined('WPSEO_VERSION')) { |
| 24 | - add_filter('wpseo_robots', function () { |
|
| 24 | + add_filter('wpseo_robots', function() { |
|
| 25 | 25 | return "noindex,nofollow"; |
| 26 | 26 | }); |
| 27 | 27 | } else { |
| 28 | 28 | remove_action('wp_head', 'noindex', 1); |
| 29 | - add_action('wp_head', function () { |
|
| 29 | + add_action('wp_head', function() { |
|
| 30 | 30 | echo "<meta name='robots' content='noindex,nofollow' />\n"; |
| 31 | 31 | }); |
| 32 | 32 | } |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | $rules = get_option('rewrite_rules'); |
| 43 | 43 | |
| 44 | - if (! isset($rules["{$routeName}/(.*?)/?$"])) { |
|
| 44 | + if (!isset($rules["{$routeName}/(.*?)/?$"])) { |
|
| 45 | 45 | flush_rewrite_rules(); |
| 46 | 46 | } |
| 47 | 47 | } |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | */ |
| 6 | 6 | namespace Flynt\HideProtectedPosts; |
| 7 | 7 | |
| 8 | -add_action('pre_get_posts', function ($query) { |
|
| 8 | +add_action('pre_get_posts', function($query) { |
|
| 9 | 9 | if (!$query->is_singular() && !is_admin()) { |
| 10 | 10 | $query->set('has_password', false); |
| 11 | 11 | } |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | */ |
| 5 | 5 | namespace Flynt\RemoveEditor; |
| 6 | 6 | |
| 7 | -add_action('init', function () { |
|
| 7 | +add_action('init', function() { |
|
| 8 | 8 | remove_post_type_support('page', 'editor'); |
| 9 | 9 | remove_post_type_support('post', 'editor'); |
| 10 | 10 | }); |