flyntwp /
flynt
| 1 | <?php |
||||||
| 2 | |||||||
| 3 | namespace Flynt\Components\BlockVideoOembed; |
||||||
| 4 | |||||||
| 5 | use Flynt\FieldVariables; |
||||||
|
0 ignored issues
–
show
|
|||||||
| 6 | use Flynt\Utils\Oembed; |
||||||
| 7 | |||||||
| 8 | add_filter('Flynt/addComponentData?name=BlockVideoOembed', function ($data) { |
||||||
| 9 | $data['video'] = Oembed::setSrcAsDataAttribute( |
||||||
| 10 | $data['oembed'], |
||||||
| 11 | [ |
||||||
| 12 | 'autoplay' => 'true' |
||||||
| 13 | ] |
||||||
| 14 | ); |
||||||
| 15 | |||||||
| 16 | return $data; |
||||||
| 17 | }); |
||||||
| 18 | |||||||
| 19 | function getACFLayout() |
||||||
| 20 | { |
||||||
| 21 | return [ |
||||||
| 22 | 'name' => 'blockVideoOembed', |
||||||
| 23 | 'label' => 'Block: Video Oembed', |
||||||
| 24 | 'sub_fields' => [ |
||||||
| 25 | [ |
||||||
| 26 | 'label' => __('General', 'flynt'), |
||||||
| 27 | 'name' => 'generalTab', |
||||||
| 28 | 'type' => 'tab', |
||||||
| 29 | 'placement' => 'top', |
||||||
| 30 | 'endpoint' => 0 |
||||||
| 31 | ], |
||||||
| 32 | [ |
||||||
| 33 | 'label' => __('Poster Image', 'flynt'), |
||||||
| 34 | 'name' => 'posterImage', |
||||||
| 35 | 'type' => 'image', |
||||||
| 36 | 'preview_size' => 'medium', |
||||||
| 37 | 'mime_types' => 'jpg,jpeg,png', |
||||||
| 38 | 'instructions' => __('Recommended Size: Min-Width 1920px; Min-Height: 1080px; Image-Format: JPG, PNG. Aspect Ratio 16/9.', 'flynt'), |
||||||
| 39 | 'required' => 1 |
||||||
| 40 | ], |
||||||
| 41 | [ |
||||||
| 42 | 'label' => __('Video', 'flynt'), |
||||||
| 43 | 'name' => 'oembed', |
||||||
| 44 | 'type' => 'oembed', |
||||||
| 45 | 'required' => 1 |
||||||
| 46 | ], |
||||||
| 47 | [ |
||||||
| 48 | 'label' => __('Options', 'flynt'), |
||||||
| 49 | 'name' => 'optionsTab', |
||||||
| 50 | 'type' => 'tab', |
||||||
| 51 | 'placement' => 'top', |
||||||
| 52 | 'endpoint' => 0 |
||||||
| 53 | ], |
||||||
| 54 | [ |
||||||
| 55 | 'label' => '', |
||||||
| 56 | 'name' => 'options', |
||||||
| 57 | 'type' => 'group', |
||||||
| 58 | 'layout' => 'row', |
||||||
| 59 | 'sub_fields' => [ |
||||||
| 60 | FieldVariables\getTheme(), |
||||||
|
0 ignored issues
–
show
The function
getTheme 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
Loading history...
|
|||||||
| 61 | [ |
||||||
| 62 | 'label' => __('Size', 'flynt'), |
||||||
| 63 | 'name' => 'size', |
||||||
| 64 | 'type' => 'radio', |
||||||
| 65 | 'other_choice' => 0, |
||||||
| 66 | 'save_other_choice' => 0, |
||||||
| 67 | 'layout' => 'horizontal', |
||||||
| 68 | 'choices' => [ |
||||||
| 69 | 'sizeSmall' => __('Small', 'flynt'), |
||||||
| 70 | 'sizeMedium' => __('Medium', 'flynt'), |
||||||
| 71 | 'sizeLarge' => __('Large (Default)', 'flynt'), |
||||||
| 72 | 'sizeHuge' => __('Huge', 'flynt'), |
||||||
| 73 | 'sizeFull' => __('Full', 'flynt'), |
||||||
| 74 | ], |
||||||
| 75 | 'default_value' => 'sizeLarge', |
||||||
| 76 | ], |
||||||
| 77 | ] |
||||||
| 78 | ] |
||||||
| 79 | ] |
||||||
| 80 | ]; |
||||||
| 81 | } |
||||||
| 82 |
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