1 | <?php |
||||||
2 | |||||||
3 | namespace Flynt\Components\NavigationFooter; |
||||||
4 | |||||||
5 | use Flynt\Utils\Options; |
||||||
6 | use Timber\Menu; |
||||||
7 | use Flynt\Shortcodes; |
||||||
0 ignored issues
–
show
|
|||||||
8 | |||||||
9 | add_action('init', function () { |
||||||
10 | register_nav_menus([ |
||||||
11 | 'navigation_footer' => __('Navigation Footer', 'flynt') |
||||||
12 | ]); |
||||||
13 | }); |
||||||
14 | |||||||
15 | add_filter('Flynt/addComponentData?name=NavigationFooter', function ($data) { |
||||||
16 | $data['maxLevel'] = 0; |
||||||
17 | $data['menu'] = new Menu('navigation_footer'); |
||||||
18 | |||||||
19 | return $data; |
||||||
20 | }); |
||||||
21 | |||||||
22 | Options::addTranslatable('NavigationFooter', [ |
||||||
23 | [ |
||||||
24 | 'label' => __('General', 'flynt'), |
||||||
25 | 'name' => 'generalTab', |
||||||
26 | 'type' => 'tab', |
||||||
27 | 'placement' => 'top', |
||||||
28 | 'endpoint' => 0 |
||||||
29 | ], |
||||||
30 | [ |
||||||
31 | 'label' => __('Content', 'flynt'), |
||||||
32 | 'name' => 'contentHtml', |
||||||
33 | 'type' => 'wysiwyg', |
||||||
34 | 'media_upload' => 0, |
||||||
35 | 'delay' => 1, |
||||||
36 | 'toolbar' => 'basic', |
||||||
37 | 'default_value' => '© [year] [sitetitle]' |
||||||
38 | ], |
||||||
39 | [ |
||||||
40 | 'label' => __('Content Examples', 'flynt'), |
||||||
41 | 'name' => 'templateTab', |
||||||
42 | 'type' => 'tab', |
||||||
43 | 'placement' => 'top', |
||||||
44 | 'endpoint' => 0, |
||||||
45 | ], |
||||||
46 | [ |
||||||
47 | 'label' => __('Content Examples', 'flynt'), |
||||||
48 | 'name' => 'groupContentExamples', |
||||||
49 | 'instructions' => __('Want some content inspiration? Here they are!', 'flynt'), |
||||||
50 | 'type' => 'group', |
||||||
51 | 'sub_fields' => [ |
||||||
52 | [ |
||||||
53 | 'label' => sprintf(__('© %s Website Name', 'flynt'), date_i18n('Y')), |
||||||
54 | 'name' => 'messageShortcodeCopyrightYearWebsiteName', |
||||||
55 | 'type' => 'message', |
||||||
56 | 'message' => '<code>©' . htmlspecialchars(' ') . '[year] [sitetitle]</code>', |
||||||
57 | 'new_lines' => 'wpautop', |
||||||
58 | 'esc_html' => 0, |
||||||
59 | 'wrapper' => [ |
||||||
60 | 'width' => 50 |
||||||
61 | ], |
||||||
62 | ], |
||||||
63 | [ |
||||||
64 | 'label' => sprintf(__('© %s Website Name — Subtitle', 'flynt'), date_i18n('Y')), |
||||||
65 | 'name' => 'messageShortcodeCopyrightYearWebsiteNameTagLine', |
||||||
66 | 'type' => 'message', |
||||||
67 | 'message' => '<code>©' . htmlspecialchars(' ') . '[year] [sitetitle] ' . htmlspecialchars('—') . ' [tagline]</code>', |
||||||
68 | 'new_lines' => 'wpautop', |
||||||
69 | 'esc_html' => 0, |
||||||
70 | 'wrapper' => [ |
||||||
71 | 'width' => 50 |
||||||
72 | ] |
||||||
73 | ] |
||||||
74 | ] |
||||||
75 | ], |
||||||
76 | Shortcodes\getShortcodeReference(), |
||||||
0 ignored issues
–
show
The function
getShortcodeReference was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
77 | ]); |
||||||
78 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths