@total_onion/onion-library 1.0.134 → 1.0.137
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/block-post-info-v3/group_6866429531436.json +56 -7
- package/components/block-post-info-v3/post-info-v3/post-video.twig +8 -0
- package/components/block-product-info-v3/group_68909995b6550.json +217 -2
- package/components/block-product-info-v3/product-info-v3/product-abv.twig +13 -0
- package/components/block-product-info-v3/product-info-v3/product-headline.twig +13 -0
- package/components/block-product-info-v3/product-info-v3/product-volume.twig +13 -0
- package/components/block-social-networks-v3/group_6891d4d7db414.json +147 -0
- package/components/block-social-networks-v3/social-networks-v3-extra.scss +6 -0
- package/components/block-social-networks-v3/social-networks-v3.js +7 -0
- package/components/block-social-networks-v3/social-networks-v3.php +14 -0
- package/components/block-social-networks-v3/social-networks-v3.scss +11 -0
- package/components/block-social-networks-v3/social-networks-v3.twig +18 -0
- package/components/block-sub-group-container-v3/group_686ceba7d6066.json +106 -9
- package/components/fields-acf-wysiwyg-options/acf-wysiwyg-options.php +221 -0
- package/package.json +1 -1
|
@@ -262,6 +262,55 @@
|
|
|
262
262
|
"acfe_layout_col": "auto",
|
|
263
263
|
"acfe_layout_allowed_col": false
|
|
264
264
|
},
|
|
265
|
+
"layout_6892115b57e2c": {
|
|
266
|
+
"key": "layout_6892115b57e2c",
|
|
267
|
+
"name": "post_video",
|
|
268
|
+
"label": "Post Video",
|
|
269
|
+
"display": "block",
|
|
270
|
+
"sub_fields": [
|
|
271
|
+
{
|
|
272
|
+
"key": "field_6892115b57e30",
|
|
273
|
+
"label": "Grid layout",
|
|
274
|
+
"name": "grid_layout",
|
|
275
|
+
"aria-label": "",
|
|
276
|
+
"type": "clone",
|
|
277
|
+
"instructions": "",
|
|
278
|
+
"required": 0,
|
|
279
|
+
"conditional_logic": 0,
|
|
280
|
+
"wrapper": {
|
|
281
|
+
"width": "",
|
|
282
|
+
"class": "",
|
|
283
|
+
"id": ""
|
|
284
|
+
},
|
|
285
|
+
"wpml_cf_preferences": 3,
|
|
286
|
+
"clone": [
|
|
287
|
+
"group_68822860bda9f"
|
|
288
|
+
],
|
|
289
|
+
"display": "seamless",
|
|
290
|
+
"layout": "block",
|
|
291
|
+
"prefix_label": 0,
|
|
292
|
+
"prefix_name": 0,
|
|
293
|
+
"acfe_seamless_style": 0,
|
|
294
|
+
"acfe_clone_modal": 0,
|
|
295
|
+
"acfe_clone_modal_close": 0,
|
|
296
|
+
"acfe_clone_modal_button": "",
|
|
297
|
+
"acfe_clone_modal_size": "large"
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
"min": "",
|
|
301
|
+
"max": "",
|
|
302
|
+
"acfe_flexible_render_template": false,
|
|
303
|
+
"acfe_flexible_render_style": false,
|
|
304
|
+
"acfe_flexible_render_script": false,
|
|
305
|
+
"acfe_flexible_thumbnail": false,
|
|
306
|
+
"acfe_flexible_settings": false,
|
|
307
|
+
"acfe_flexible_settings_size": "medium",
|
|
308
|
+
"acfe_layout_locations": [],
|
|
309
|
+
"acfe_flexible_modal_edit_size": false,
|
|
310
|
+
"acfe_flexible_category": false,
|
|
311
|
+
"acfe_layout_col": "auto",
|
|
312
|
+
"acfe_layout_allowed_col": false
|
|
313
|
+
},
|
|
265
314
|
"layout_63c1f973486ce": {
|
|
266
315
|
"key": "layout_63c1f973486ce",
|
|
267
316
|
"name": "post_title",
|
|
@@ -1566,7 +1615,7 @@
|
|
|
1566
1615
|
"class": "",
|
|
1567
1616
|
"id": ""
|
|
1568
1617
|
},
|
|
1569
|
-
"wpml_cf_preferences":
|
|
1618
|
+
"wpml_cf_preferences": 3,
|
|
1570
1619
|
"placement": "top",
|
|
1571
1620
|
"endpoint": 0,
|
|
1572
1621
|
"no_preference": 0,
|
|
@@ -1614,7 +1663,7 @@
|
|
|
1614
1663
|
"class": "",
|
|
1615
1664
|
"id": ""
|
|
1616
1665
|
},
|
|
1617
|
-
"wpml_cf_preferences":
|
|
1666
|
+
"wpml_cf_preferences": 3,
|
|
1618
1667
|
"placement": "top",
|
|
1619
1668
|
"endpoint": 0,
|
|
1620
1669
|
"no_preference": 0,
|
|
@@ -1940,6 +1989,9 @@
|
|
|
1940
1989
|
"layout": "block",
|
|
1941
1990
|
"acfe_seamless_style": 0,
|
|
1942
1991
|
"acfe_group_modal": 0,
|
|
1992
|
+
"acfe_group_modal_close": 0,
|
|
1993
|
+
"acfe_group_modal_button": "",
|
|
1994
|
+
"acfe_group_modal_size": "large",
|
|
1943
1995
|
"sub_fields": [
|
|
1944
1996
|
{
|
|
1945
1997
|
"key": "field_686644fafc821",
|
|
@@ -1969,10 +2021,7 @@
|
|
|
1969
2021
|
"acfe_clone_modal_button": "",
|
|
1970
2022
|
"acfe_clone_modal_size": "large"
|
|
1971
2023
|
}
|
|
1972
|
-
]
|
|
1973
|
-
"acfe_group_modal_close": 0,
|
|
1974
|
-
"acfe_group_modal_button": "",
|
|
1975
|
-
"acfe_group_modal_size": "large"
|
|
2024
|
+
]
|
|
1976
2025
|
},
|
|
1977
2026
|
{
|
|
1978
2027
|
"key": "field_686642954506e",
|
|
@@ -2074,5 +2123,5 @@
|
|
|
2074
2123
|
"acfe_display_title": "",
|
|
2075
2124
|
"acfe_meta": "",
|
|
2076
2125
|
"acfe_note": "",
|
|
2077
|
-
"modified":
|
|
2126
|
+
"modified": 1754403266
|
|
2078
2127
|
}
|
|
@@ -579,7 +579,7 @@
|
|
|
579
579
|
},
|
|
580
580
|
"layout_6890c6e2b77a3": {
|
|
581
581
|
"key": "layout_6890c6e2b77a3",
|
|
582
|
-
"name": "
|
|
582
|
+
"name": "product_abv",
|
|
583
583
|
"label": "ABV",
|
|
584
584
|
"display": "block",
|
|
585
585
|
"sub_fields": [
|
|
@@ -694,6 +694,221 @@
|
|
|
694
694
|
"acfe_layout_col": "auto",
|
|
695
695
|
"acfe_layout_allowed_col": false
|
|
696
696
|
},
|
|
697
|
+
"layout_68920ec878b64": {
|
|
698
|
+
"key": "layout_68920ec878b64",
|
|
699
|
+
"name": "product_volume",
|
|
700
|
+
"label": "Volume",
|
|
701
|
+
"display": "block",
|
|
702
|
+
"sub_fields": [
|
|
703
|
+
{
|
|
704
|
+
"key": "field_68920ec878b67",
|
|
705
|
+
"label": "Grid Layout",
|
|
706
|
+
"name": "",
|
|
707
|
+
"aria-label": "",
|
|
708
|
+
"type": "tab",
|
|
709
|
+
"instructions": "",
|
|
710
|
+
"required": 0,
|
|
711
|
+
"conditional_logic": 0,
|
|
712
|
+
"wrapper": {
|
|
713
|
+
"width": "",
|
|
714
|
+
"class": "",
|
|
715
|
+
"id": ""
|
|
716
|
+
},
|
|
717
|
+
"wpml_cf_preferences": 3,
|
|
718
|
+
"placement": "top",
|
|
719
|
+
"endpoint": 0,
|
|
720
|
+
"no_preference": 0,
|
|
721
|
+
"selected": 0
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
"key": "field_68920ec878b68",
|
|
725
|
+
"label": "Grid layout",
|
|
726
|
+
"name": "grid_layout",
|
|
727
|
+
"aria-label": "",
|
|
728
|
+
"type": "clone",
|
|
729
|
+
"instructions": "",
|
|
730
|
+
"required": 0,
|
|
731
|
+
"conditional_logic": 0,
|
|
732
|
+
"wrapper": {
|
|
733
|
+
"width": "",
|
|
734
|
+
"class": "",
|
|
735
|
+
"id": ""
|
|
736
|
+
},
|
|
737
|
+
"wpml_cf_preferences": 3,
|
|
738
|
+
"clone": [
|
|
739
|
+
"group_68822860bda9f"
|
|
740
|
+
],
|
|
741
|
+
"display": "seamless",
|
|
742
|
+
"layout": "block",
|
|
743
|
+
"prefix_label": 0,
|
|
744
|
+
"prefix_name": 0,
|
|
745
|
+
"acfe_seamless_style": 0,
|
|
746
|
+
"acfe_clone_modal": 0,
|
|
747
|
+
"acfe_clone_modal_close": 0,
|
|
748
|
+
"acfe_clone_modal_button": "",
|
|
749
|
+
"acfe_clone_modal_size": "large"
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
"key": "field_68920ec878b69",
|
|
753
|
+
"label": "Style",
|
|
754
|
+
"name": "",
|
|
755
|
+
"aria-label": "",
|
|
756
|
+
"type": "tab",
|
|
757
|
+
"instructions": "",
|
|
758
|
+
"required": 0,
|
|
759
|
+
"conditional_logic": 0,
|
|
760
|
+
"wrapper": {
|
|
761
|
+
"width": "",
|
|
762
|
+
"class": "",
|
|
763
|
+
"id": ""
|
|
764
|
+
},
|
|
765
|
+
"wpml_cf_preferences": 3,
|
|
766
|
+
"placement": "top",
|
|
767
|
+
"endpoint": 0,
|
|
768
|
+
"no_preference": 0,
|
|
769
|
+
"selected": 0
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
"key": "field_68920ec878b6a",
|
|
773
|
+
"label": "Text editor settings fields",
|
|
774
|
+
"name": "text_editor_settings_fields",
|
|
775
|
+
"aria-label": "",
|
|
776
|
+
"type": "clone",
|
|
777
|
+
"instructions": "",
|
|
778
|
+
"required": 0,
|
|
779
|
+
"conditional_logic": 0,
|
|
780
|
+
"wrapper": {
|
|
781
|
+
"width": "",
|
|
782
|
+
"class": "",
|
|
783
|
+
"id": ""
|
|
784
|
+
},
|
|
785
|
+
"wpml_cf_preferences": 3,
|
|
786
|
+
"clone": [
|
|
787
|
+
"group_687a4e2334e37"
|
|
788
|
+
],
|
|
789
|
+
"display": "seamless",
|
|
790
|
+
"layout": "block",
|
|
791
|
+
"prefix_label": 0,
|
|
792
|
+
"prefix_name": 0,
|
|
793
|
+
"acfe_seamless_style": 0,
|
|
794
|
+
"acfe_clone_modal": 0,
|
|
795
|
+
"acfe_clone_modal_close": 0,
|
|
796
|
+
"acfe_clone_modal_button": "",
|
|
797
|
+
"acfe_clone_modal_size": "large"
|
|
798
|
+
}
|
|
799
|
+
],
|
|
800
|
+
"min": "",
|
|
801
|
+
"max": "",
|
|
802
|
+
"acfe_flexible_render_template": false,
|
|
803
|
+
"acfe_flexible_render_style": false,
|
|
804
|
+
"acfe_flexible_render_script": false,
|
|
805
|
+
"acfe_flexible_thumbnail": false,
|
|
806
|
+
"acfe_flexible_settings": false,
|
|
807
|
+
"acfe_flexible_settings_size": "medium",
|
|
808
|
+
"acfe_layout_locations": [],
|
|
809
|
+
"acfe_flexible_modal_edit_size": false,
|
|
810
|
+
"acfe_flexible_category": false,
|
|
811
|
+
"acfe_layout_col": "auto",
|
|
812
|
+
"acfe_layout_allowed_col": false
|
|
813
|
+
},
|
|
814
|
+
"layout_6891e776c5436": {
|
|
815
|
+
"key": "layout_6891e776c5436",
|
|
816
|
+
"name": "product_headline",
|
|
817
|
+
"label": "Product Headline",
|
|
818
|
+
"display": "block",
|
|
819
|
+
"sub_fields": [
|
|
820
|
+
{
|
|
821
|
+
"key": "field_6891e7a9c543d",
|
|
822
|
+
"label": "Headline Text",
|
|
823
|
+
"name": "headline_text",
|
|
824
|
+
"aria-label": "",
|
|
825
|
+
"type": "text",
|
|
826
|
+
"instructions": "",
|
|
827
|
+
"required": 0,
|
|
828
|
+
"conditional_logic": 0,
|
|
829
|
+
"wrapper": {
|
|
830
|
+
"width": "",
|
|
831
|
+
"class": "",
|
|
832
|
+
"id": ""
|
|
833
|
+
},
|
|
834
|
+
"wpml_cf_preferences": 2,
|
|
835
|
+
"default_value": "Headline text!",
|
|
836
|
+
"maxlength": "",
|
|
837
|
+
"placeholder": "",
|
|
838
|
+
"prepend": "",
|
|
839
|
+
"append": ""
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
"key": "field_6891e776c543c",
|
|
843
|
+
"label": "Text style",
|
|
844
|
+
"name": "text_style",
|
|
845
|
+
"aria-label": "",
|
|
846
|
+
"type": "clone",
|
|
847
|
+
"instructions": "",
|
|
848
|
+
"required": 0,
|
|
849
|
+
"conditional_logic": 0,
|
|
850
|
+
"wrapper": {
|
|
851
|
+
"width": "",
|
|
852
|
+
"class": "",
|
|
853
|
+
"id": ""
|
|
854
|
+
},
|
|
855
|
+
"wpml_cf_preferences": 3,
|
|
856
|
+
"clone": [
|
|
857
|
+
"group_687a4e2334e37"
|
|
858
|
+
],
|
|
859
|
+
"display": "seamless",
|
|
860
|
+
"layout": "block",
|
|
861
|
+
"prefix_label": 0,
|
|
862
|
+
"prefix_name": 0,
|
|
863
|
+
"acfe_seamless_style": 0,
|
|
864
|
+
"acfe_clone_modal": 0,
|
|
865
|
+
"acfe_clone_modal_close": 0,
|
|
866
|
+
"acfe_clone_modal_button": "",
|
|
867
|
+
"acfe_clone_modal_size": "large"
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
"key": "field_6891e776c543a",
|
|
871
|
+
"label": "Grid layout",
|
|
872
|
+
"name": "grid_layout",
|
|
873
|
+
"aria-label": "",
|
|
874
|
+
"type": "clone",
|
|
875
|
+
"instructions": "",
|
|
876
|
+
"required": 0,
|
|
877
|
+
"conditional_logic": 0,
|
|
878
|
+
"wrapper": {
|
|
879
|
+
"width": "",
|
|
880
|
+
"class": "",
|
|
881
|
+
"id": ""
|
|
882
|
+
},
|
|
883
|
+
"wpml_cf_preferences": 3,
|
|
884
|
+
"clone": [
|
|
885
|
+
"group_68822860bda9f"
|
|
886
|
+
],
|
|
887
|
+
"display": "seamless",
|
|
888
|
+
"layout": "block",
|
|
889
|
+
"prefix_label": 0,
|
|
890
|
+
"prefix_name": 0,
|
|
891
|
+
"acfe_seamless_style": 0,
|
|
892
|
+
"acfe_clone_modal": 0,
|
|
893
|
+
"acfe_clone_modal_close": 0,
|
|
894
|
+
"acfe_clone_modal_button": "",
|
|
895
|
+
"acfe_clone_modal_size": "large"
|
|
896
|
+
}
|
|
897
|
+
],
|
|
898
|
+
"min": "",
|
|
899
|
+
"max": "",
|
|
900
|
+
"acfe_flexible_render_template": false,
|
|
901
|
+
"acfe_flexible_render_style": false,
|
|
902
|
+
"acfe_flexible_render_script": false,
|
|
903
|
+
"acfe_flexible_thumbnail": false,
|
|
904
|
+
"acfe_flexible_settings": false,
|
|
905
|
+
"acfe_flexible_settings_size": "medium",
|
|
906
|
+
"acfe_layout_locations": [],
|
|
907
|
+
"acfe_flexible_modal_edit_size": false,
|
|
908
|
+
"acfe_flexible_category": false,
|
|
909
|
+
"acfe_layout_col": "auto",
|
|
910
|
+
"acfe_layout_allowed_col": false
|
|
911
|
+
},
|
|
697
912
|
"layout_6890c6f8b77aa": {
|
|
698
913
|
"key": "layout_6890c6f8b77aa",
|
|
699
914
|
"name": "whisky_type",
|
|
@@ -1823,5 +2038,5 @@
|
|
|
1823
2038
|
"acfe_display_title": "",
|
|
1824
2039
|
"acfe_meta": "",
|
|
1825
2040
|
"acfe_note": "",
|
|
1826
|
-
"modified":
|
|
2041
|
+
"modified": 1754402521
|
|
1827
2042
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{% set gridLayoutElement = include('components/grid-layout-element-v3.twig', { fields: field, block: block }, with_context = false) %}
|
|
2
|
+
{% set textEditorStyleVars = include('components/text-editor-settings-variables-v3.twig', { fields: field, block, blockClassName, is_preview }, with_context = false) %}
|
|
3
|
+
{% set textEditorContainerClasses = include('components/text-editor-settings-container-classes-v3.twig', { fields: field, block, blockClassName, is_preview }, with_context = false) %}
|
|
4
|
+
{% set textEditorElementClasses = include('components/text-editor-settings-element-classes-v3.twig', { fields: field, block, blockClassName, is_preview }, with_context = false) %}
|
|
5
|
+
{% set elementType = field.element_type|ru %}
|
|
6
|
+
<style>
|
|
7
|
+
.{{blockClassName}}__product-abv.{{block.id}}, .{{blockClassName}}__content-container.{{block.id}}{
|
|
8
|
+
{{textEditorStyleVars}}
|
|
9
|
+
}
|
|
10
|
+
</style>
|
|
11
|
+
<div class="{{blockClassName}}__content-container {{textEditorContainerClasses}} {{blockClassName}}__info-item {{block.id}}">
|
|
12
|
+
<{{elementType|default('p')}} data-pattern-post-info="abv" class="{{blockClassName}}__product-abv {{textEditorElementClasses}} {{block.id}}">{{post.product_abv}}</{{elementType|default('p')}}>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{% set gridLayoutElement = include('components/grid-layout-element.twig', { fields: field, block: block }, with_context = false) %}
|
|
2
|
+
{% set textEditorStyleVars = include('components/text-editor-settings-variables-v3.twig', { fields: field, block, blockClassName, is_preview }, with_context = false) %}
|
|
3
|
+
{% set textEditorContainerClasses = include('components/text-editor-settings-container-classes-v3.twig', { fields: field, block, blockClassName, is_preview }, with_context = false) %}
|
|
4
|
+
{% set textEditorElementClasses = include('components/text-editor-settings-element-classes-v3.twig', { fields: field, block, blockClassName, is_preview }, with_context = false) %}
|
|
5
|
+
{% set elementType = field.element_type|ru %}
|
|
6
|
+
<style>
|
|
7
|
+
.{{blockClassName}}__product-headline.{{block.id}}, .{{blockClassName}}__content-container.{{block.id}}{
|
|
8
|
+
{{textEditorStyleVars}}
|
|
9
|
+
}
|
|
10
|
+
</style>
|
|
11
|
+
<div class="{{blockClassName}}__content-container {{textEditorContainerClasses}} {{blockClassName}}__info-item {{block.id}}">
|
|
12
|
+
<{{elementType|default('p')}} data-pattern-post-info="headline" class="{{blockClassName}}__product-headline {{textEditorElementClasses}} {{block.id}}">{{field.headline_text}}</{{elementType|default('p')}}>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{% set gridLayoutElement = include('components/grid-layout-element-v3.twig', { fields: field, block: block }, with_context = false) %}
|
|
2
|
+
{% set textEditorStyleVars = include('components/text-editor-settings-variables-v3.twig', { fields: field, block, blockClassName, is_preview }, with_context = false) %}
|
|
3
|
+
{% set textEditorContainerClasses = include('components/text-editor-settings-container-classes-v3.twig', { fields: field, block, blockClassName, is_preview }, with_context = false) %}
|
|
4
|
+
{% set textEditorElementClasses = include('components/text-editor-settings-element-classes-v3.twig', { fields: field, block, blockClassName, is_preview }, with_context = false) %}
|
|
5
|
+
{% set elementType = field.element_type|ru %}
|
|
6
|
+
<style>
|
|
7
|
+
.{{blockClassName}}__product-volume.{{block.id}}, .{{blockClassName}}__content-container.{{block.id}}{
|
|
8
|
+
{{textEditorStyleVars}}
|
|
9
|
+
}
|
|
10
|
+
</style>
|
|
11
|
+
<div class="{{blockClassName}}__content-container {{textEditorContainerClasses}} {{blockClassName}}__info-item {{block.id}}">
|
|
12
|
+
<{{elementType|default('p')}} data-pattern-post-info="volume" class="{{blockClassName}}__product-volume {{textEditorElementClasses}} {{block.id}}">{{post.product_volume}}</{{elementType|default('p')}}>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
{
|
|
2
|
+
"key": "group_6891d4d7db414",
|
|
3
|
+
"title": "Block: Social Networks V3",
|
|
4
|
+
"fields": [
|
|
5
|
+
{
|
|
6
|
+
"key": "field_6892127d4031c",
|
|
7
|
+
"label": "Content",
|
|
8
|
+
"name": "",
|
|
9
|
+
"aria-label": "",
|
|
10
|
+
"type": "tab",
|
|
11
|
+
"instructions": "",
|
|
12
|
+
"required": 0,
|
|
13
|
+
"conditional_logic": 0,
|
|
14
|
+
"wrapper": {
|
|
15
|
+
"width": "",
|
|
16
|
+
"class": "",
|
|
17
|
+
"id": ""
|
|
18
|
+
},
|
|
19
|
+
"wpml_cf_preferences": 3,
|
|
20
|
+
"placement": "top",
|
|
21
|
+
"endpoint": 0,
|
|
22
|
+
"no_preference": 0,
|
|
23
|
+
"selected": 0
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"key": "field_689212874031d",
|
|
27
|
+
"label": "Enable Title",
|
|
28
|
+
"name": "enable_title",
|
|
29
|
+
"aria-label": "",
|
|
30
|
+
"type": "true_false",
|
|
31
|
+
"instructions": "",
|
|
32
|
+
"required": 0,
|
|
33
|
+
"conditional_logic": 0,
|
|
34
|
+
"wrapper": {
|
|
35
|
+
"width": "",
|
|
36
|
+
"class": "",
|
|
37
|
+
"id": ""
|
|
38
|
+
},
|
|
39
|
+
"wpml_cf_preferences": 3,
|
|
40
|
+
"message": "",
|
|
41
|
+
"default_value": 0,
|
|
42
|
+
"ui_on_text": "",
|
|
43
|
+
"ui_off_text": "",
|
|
44
|
+
"ui": 1,
|
|
45
|
+
"style": ""
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"key": "field_689212a24031e",
|
|
49
|
+
"label": "Title",
|
|
50
|
+
"name": "title",
|
|
51
|
+
"aria-label": "",
|
|
52
|
+
"type": "wysiwyg",
|
|
53
|
+
"instructions": "",
|
|
54
|
+
"required": 0,
|
|
55
|
+
"conditional_logic": [
|
|
56
|
+
[
|
|
57
|
+
{
|
|
58
|
+
"field": "field_689212874031d",
|
|
59
|
+
"operator": "==",
|
|
60
|
+
"value": "1"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
],
|
|
64
|
+
"wrapper": {
|
|
65
|
+
"width": "",
|
|
66
|
+
"class": "",
|
|
67
|
+
"id": ""
|
|
68
|
+
},
|
|
69
|
+
"wpml_cf_preferences": 2,
|
|
70
|
+
"default_value": "",
|
|
71
|
+
"acfe_wysiwyg_auto_init": 0,
|
|
72
|
+
"acfe_wysiwyg_height": 300,
|
|
73
|
+
"acfe_wysiwyg_max_height": "",
|
|
74
|
+
"acfe_wysiwyg_valid_elements": "",
|
|
75
|
+
"acfe_wysiwyg_custom_style": "",
|
|
76
|
+
"acfe_wysiwyg_disable_wp_style": 0,
|
|
77
|
+
"acfe_wysiwyg_autoresize": 0,
|
|
78
|
+
"acfe_wysiwyg_disable_resize": 0,
|
|
79
|
+
"acfe_wysiwyg_remove_path": 0,
|
|
80
|
+
"acfe_wysiwyg_menubar": 0,
|
|
81
|
+
"acfe_wysiwyg_transparent": 0,
|
|
82
|
+
"acfe_wysiwyg_merge_toolbar": 0,
|
|
83
|
+
"acfe_wysiwyg_custom_toolbar": 0,
|
|
84
|
+
"tabs": "visual",
|
|
85
|
+
"toolbar": "formatselect_align_bold_italic_underline_link_removeformat",
|
|
86
|
+
"media_upload": 0,
|
|
87
|
+
"delay": 0,
|
|
88
|
+
"acfe_wysiwyg_min_height": 300,
|
|
89
|
+
"acfe_wysiwyg_toolbar_buttons": []
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"key": "field_6891d4da7c7e2",
|
|
93
|
+
"label": "Social networks fields",
|
|
94
|
+
"name": "social_networks_fields",
|
|
95
|
+
"aria-label": "",
|
|
96
|
+
"type": "clone",
|
|
97
|
+
"instructions": "",
|
|
98
|
+
"required": 0,
|
|
99
|
+
"conditional_logic": 0,
|
|
100
|
+
"wrapper": {
|
|
101
|
+
"width": "",
|
|
102
|
+
"class": "",
|
|
103
|
+
"id": ""
|
|
104
|
+
},
|
|
105
|
+
"wpml_cf_preferences": 3,
|
|
106
|
+
"clone": [
|
|
107
|
+
"group_668c110442111"
|
|
108
|
+
],
|
|
109
|
+
"display": "seamless",
|
|
110
|
+
"layout": "block",
|
|
111
|
+
"prefix_label": 0,
|
|
112
|
+
"prefix_name": 0,
|
|
113
|
+
"acfe_seamless_style": 0,
|
|
114
|
+
"acfe_clone_modal": 0,
|
|
115
|
+
"acfe_clone_modal_close": 0,
|
|
116
|
+
"acfe_clone_modal_button": "",
|
|
117
|
+
"acfe_clone_modal_size": "large"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"location": [
|
|
121
|
+
[
|
|
122
|
+
{
|
|
123
|
+
"param": "block",
|
|
124
|
+
"operator": "==",
|
|
125
|
+
"value": "acf\/social-networks-v3"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
],
|
|
129
|
+
"menu_order": 0,
|
|
130
|
+
"position": "normal",
|
|
131
|
+
"style": "default",
|
|
132
|
+
"label_placement": "left",
|
|
133
|
+
"instruction_placement": "label",
|
|
134
|
+
"hide_on_screen": "",
|
|
135
|
+
"active": true,
|
|
136
|
+
"description": "",
|
|
137
|
+
"show_in_rest": 0,
|
|
138
|
+
"acfe_autosync": [
|
|
139
|
+
"json"
|
|
140
|
+
],
|
|
141
|
+
"acfml_field_group_mode": "localization",
|
|
142
|
+
"acfe_form": 0,
|
|
143
|
+
"acfe_display_title": "",
|
|
144
|
+
"acfe_meta": "",
|
|
145
|
+
"acfe_note": "",
|
|
146
|
+
"modified": 1754404344
|
|
147
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
acf_register_block_type(
|
|
4
|
+
array(
|
|
5
|
+
'name' => 'social-networks-v3',
|
|
6
|
+
'title' => __( 'Social networks v3', 'Global-theme Admin' ),
|
|
7
|
+
'render_callback' => 'athena_block_render_post_object',
|
|
8
|
+
'category' => 'common',
|
|
9
|
+
'icon' => get_svg_icon_content('brick.svg'),
|
|
10
|
+
'keywords' => array('content', 'text' ),
|
|
11
|
+
'mode' => 'preview',
|
|
12
|
+
'supports' => array( 'align' => false, 'anchor' => true ),
|
|
13
|
+
)
|
|
14
|
+
);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// @use 'Assets/scss/modules/library-modules/core-mixins/core-mixins';
|
|
2
|
+
@use 'Assets/scss/modules/library-modules/core-functions-v3/core-functions-v3';
|
|
3
|
+
// @use 'Assets/scss/theme/breakpoints';
|
|
4
|
+
@use 'Assets/scss/blocks/social-networks-v3/social-networks-v3-extra';
|
|
5
|
+
.social-networks-v3 {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: core-functions-v3.fluidSize(20,'static');
|
|
9
|
+
|
|
10
|
+
@include social-networks-v3-extra.additionalStyles();
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
{% set blockClassName = "social-networks-v3" %}
|
|
3
|
+
{% set classNameEntryPoint = include('entry-points/entry-point-classes.twig', { fields: fields, block: block }, with_context = false) %}
|
|
4
|
+
{% set htmlEntryPoint = include('entry-points/entry-point-html-v3.twig', { fields: fields, block: block, blockClassName, blockClassName }, with_context = false) %}
|
|
5
|
+
{% set dataAttributeEntryPoint = include('entry-points/entry-point-data-attribute.twig', { fields: fields, block: block }, with_context = false) %}
|
|
6
|
+
{% set styleEntryPoint = include('entry-points/entry-point-style.twig', { fields: fields, block: block, is_preview }, with_context = false) %}
|
|
7
|
+
{% set previewEntryPoint = include('entry-points/entry-point-preview-info.twig', { fields, block, displaytype, is_preview }, with_context = false) %}
|
|
8
|
+
|
|
9
|
+
{% set sectionStyles = styleEntryPoint %}
|
|
10
|
+
|
|
11
|
+
{{previewEntryPoint}}
|
|
12
|
+
<section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.className}} {{classNameEntryPoint}} lazy-fade" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" style="{{sectionStyles}}" data-assetkey="{{blockClassName}}">
|
|
13
|
+
{% if fields.enable_title and fields.title is not empty %}
|
|
14
|
+
{{fields.title}}
|
|
15
|
+
{% endif %}
|
|
16
|
+
{{ include('components/social-networks.twig', {fields, block, blockClassName, is_preview, market_settings}, with_context = false, ignore_missing = true) }}
|
|
17
|
+
{{htmlEntryPoint}}
|
|
18
|
+
</section>
|
|
@@ -74,6 +74,9 @@
|
|
|
74
74
|
"layout": "block",
|
|
75
75
|
"acfe_seamless_style": 0,
|
|
76
76
|
"acfe_group_modal": 0,
|
|
77
|
+
"acfe_group_modal_close": 0,
|
|
78
|
+
"acfe_group_modal_button": "",
|
|
79
|
+
"acfe_group_modal_size": "large",
|
|
77
80
|
"sub_fields": [
|
|
78
81
|
{
|
|
79
82
|
"key": "field_6890ce0bd5ebc",
|
|
@@ -103,10 +106,7 @@
|
|
|
103
106
|
"acfe_clone_modal_button": "",
|
|
104
107
|
"acfe_clone_modal_size": "large"
|
|
105
108
|
}
|
|
106
|
-
]
|
|
107
|
-
"acfe_group_modal_close": 0,
|
|
108
|
-
"acfe_group_modal_button": "",
|
|
109
|
-
"acfe_group_modal_size": "large"
|
|
109
|
+
]
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
112
|
"key": "field_6890ce13d5ebd",
|
|
@@ -134,6 +134,9 @@
|
|
|
134
134
|
"layout": "block",
|
|
135
135
|
"acfe_seamless_style": 0,
|
|
136
136
|
"acfe_group_modal": 0,
|
|
137
|
+
"acfe_group_modal_close": 0,
|
|
138
|
+
"acfe_group_modal_button": "",
|
|
139
|
+
"acfe_group_modal_size": "large",
|
|
137
140
|
"sub_fields": [
|
|
138
141
|
{
|
|
139
142
|
"key": "field_6890ce13d5ebf",
|
|
@@ -163,10 +166,7 @@
|
|
|
163
166
|
"acfe_clone_modal_button": "",
|
|
164
167
|
"acfe_clone_modal_size": "large"
|
|
165
168
|
}
|
|
166
|
-
]
|
|
167
|
-
"acfe_group_modal_close": 0,
|
|
168
|
-
"acfe_group_modal_button": "",
|
|
169
|
-
"acfe_group_modal_size": "large"
|
|
169
|
+
]
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
172
|
"key": "field_686ceba7e6352",
|
|
@@ -1343,6 +1343,103 @@
|
|
|
1343
1343
|
"acfe_layout_col": "auto",
|
|
1344
1344
|
"acfe_layout_allowed_col": false
|
|
1345
1345
|
},
|
|
1346
|
+
"layout_68920fded9d71": {
|
|
1347
|
+
"key": "layout_68920fded9d71",
|
|
1348
|
+
"name": "social_networks_v3",
|
|
1349
|
+
"label": "Social networks v3",
|
|
1350
|
+
"display": "block",
|
|
1351
|
+
"sub_fields": [
|
|
1352
|
+
{
|
|
1353
|
+
"key": "field_68920fded9d74",
|
|
1354
|
+
"label": "Grid Layout",
|
|
1355
|
+
"name": "",
|
|
1356
|
+
"aria-label": "",
|
|
1357
|
+
"type": "tab",
|
|
1358
|
+
"instructions": "",
|
|
1359
|
+
"required": 0,
|
|
1360
|
+
"conditional_logic": 0,
|
|
1361
|
+
"wrapper": {
|
|
1362
|
+
"width": "",
|
|
1363
|
+
"class": "",
|
|
1364
|
+
"id": ""
|
|
1365
|
+
},
|
|
1366
|
+
"wpml_cf_preferences": 3,
|
|
1367
|
+
"placement": "top",
|
|
1368
|
+
"endpoint": 0,
|
|
1369
|
+
"no_preference": 0,
|
|
1370
|
+
"selected": 0
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
"key": "field_68920fded9d75",
|
|
1374
|
+
"label": "grid layout",
|
|
1375
|
+
"name": "grid_layout_copy",
|
|
1376
|
+
"aria-label": "",
|
|
1377
|
+
"type": "clone",
|
|
1378
|
+
"instructions": "",
|
|
1379
|
+
"required": 0,
|
|
1380
|
+
"conditional_logic": 0,
|
|
1381
|
+
"wrapper": {
|
|
1382
|
+
"width": "",
|
|
1383
|
+
"class": "",
|
|
1384
|
+
"id": ""
|
|
1385
|
+
},
|
|
1386
|
+
"wpml_cf_preferences": 3,
|
|
1387
|
+
"clone": [
|
|
1388
|
+
"group_68822860bda9f"
|
|
1389
|
+
],
|
|
1390
|
+
"display": "seamless",
|
|
1391
|
+
"layout": "block",
|
|
1392
|
+
"prefix_label": 0,
|
|
1393
|
+
"prefix_name": 0,
|
|
1394
|
+
"acfe_seamless_style": 0,
|
|
1395
|
+
"acfe_clone_modal": 0,
|
|
1396
|
+
"acfe_clone_modal_close": 0,
|
|
1397
|
+
"acfe_clone_modal_button": "",
|
|
1398
|
+
"acfe_clone_modal_size": "large"
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
"key": "field_68920fded9d76",
|
|
1402
|
+
"label": "Social networks fields",
|
|
1403
|
+
"name": "social_networks_fields",
|
|
1404
|
+
"aria-label": "",
|
|
1405
|
+
"type": "clone",
|
|
1406
|
+
"instructions": "",
|
|
1407
|
+
"required": 0,
|
|
1408
|
+
"conditional_logic": 0,
|
|
1409
|
+
"wrapper": {
|
|
1410
|
+
"width": "",
|
|
1411
|
+
"class": "",
|
|
1412
|
+
"id": ""
|
|
1413
|
+
},
|
|
1414
|
+
"wpml_cf_preferences": 3,
|
|
1415
|
+
"clone": [
|
|
1416
|
+
"group_6891d4d7db414"
|
|
1417
|
+
],
|
|
1418
|
+
"display": "seamless",
|
|
1419
|
+
"layout": "block",
|
|
1420
|
+
"prefix_label": 0,
|
|
1421
|
+
"prefix_name": 0,
|
|
1422
|
+
"acfe_seamless_style": 0,
|
|
1423
|
+
"acfe_clone_modal": 0,
|
|
1424
|
+
"acfe_clone_modal_close": 0,
|
|
1425
|
+
"acfe_clone_modal_button": "",
|
|
1426
|
+
"acfe_clone_modal_size": "large"
|
|
1427
|
+
}
|
|
1428
|
+
],
|
|
1429
|
+
"min": "",
|
|
1430
|
+
"max": "",
|
|
1431
|
+
"acfe_flexible_render_template": false,
|
|
1432
|
+
"acfe_flexible_render_style": false,
|
|
1433
|
+
"acfe_flexible_render_script": false,
|
|
1434
|
+
"acfe_flexible_thumbnail": false,
|
|
1435
|
+
"acfe_flexible_settings": false,
|
|
1436
|
+
"acfe_flexible_settings_size": "medium",
|
|
1437
|
+
"acfe_layout_locations": [],
|
|
1438
|
+
"acfe_flexible_modal_edit_size": false,
|
|
1439
|
+
"acfe_flexible_category": false,
|
|
1440
|
+
"acfe_layout_col": "auto",
|
|
1441
|
+
"acfe_layout_allowed_col": false
|
|
1442
|
+
},
|
|
1346
1443
|
"layout_686fd86550e40": {
|
|
1347
1444
|
"key": "layout_686fd86550e40",
|
|
1348
1445
|
"name": "gradient_layer_v3",
|
|
@@ -1810,5 +1907,5 @@
|
|
|
1810
1907
|
"acfe_display_title": "",
|
|
1811
1908
|
"acfe_meta": "",
|
|
1812
1909
|
"acfe_note": "",
|
|
1813
|
-
"modified":
|
|
1910
|
+
"modified": 1754402896
|
|
1814
1911
|
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ACF Wysiwyg custom options
|
|
5
|
+
*
|
|
6
|
+
* @package Global Theme
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// Add css to the wysiwig to allow default font family and font sizes.
|
|
10
|
+
add_filter(
|
|
11
|
+
'tiny_mce_before_init',
|
|
12
|
+
function ($mce_init) {
|
|
13
|
+
$content_css = gtp_get_asset_uri('wysiwyg.css');
|
|
14
|
+
if (isset($mce_init['content_css'])) {
|
|
15
|
+
$mce_init['content_css'] = "{$mce_init['content_css']},{$content_css}";
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
$style_formats = array(
|
|
19
|
+
array(
|
|
20
|
+
'title' => 'Font Secondary',
|
|
21
|
+
'inline' => 'span',
|
|
22
|
+
'classes' => 'font-secondary',
|
|
23
|
+
'wrapper' => false,
|
|
24
|
+
),
|
|
25
|
+
array(
|
|
26
|
+
'title' => 'Font Tertiary',
|
|
27
|
+
'inline' => 'span',
|
|
28
|
+
'classes' => 'font-tertiary',
|
|
29
|
+
'wrapper' => false,
|
|
30
|
+
),
|
|
31
|
+
array(
|
|
32
|
+
'title' => 'Font Quaternary',
|
|
33
|
+
'inline' => 'span',
|
|
34
|
+
'classes' => 'font-quaternary',
|
|
35
|
+
'wrapper' => false,
|
|
36
|
+
),
|
|
37
|
+
array(
|
|
38
|
+
'title' => 'H Extra Large',
|
|
39
|
+
'inline' => 'span',
|
|
40
|
+
'classes' => 'h-xl-sizing',
|
|
41
|
+
'wrapper' => false,
|
|
42
|
+
),
|
|
43
|
+
array(
|
|
44
|
+
'title' => 'H Large',
|
|
45
|
+
'inline' => 'span',
|
|
46
|
+
'classes' => 'h-l-sizing',
|
|
47
|
+
'wrapper' => false,
|
|
48
|
+
),
|
|
49
|
+
array(
|
|
50
|
+
'title' => 'H Medium',
|
|
51
|
+
'inline' => 'span',
|
|
52
|
+
'classes' => 'h-m-sizing',
|
|
53
|
+
'wrapper' => false,
|
|
54
|
+
),
|
|
55
|
+
array(
|
|
56
|
+
'title' => 'H Small',
|
|
57
|
+
'inline' => 'span',
|
|
58
|
+
'classes' => 'h-s-sizing',
|
|
59
|
+
'wrapper' => false,
|
|
60
|
+
),
|
|
61
|
+
array(
|
|
62
|
+
'title' => 'H Extra Small',
|
|
63
|
+
'inline' => 'span',
|
|
64
|
+
'classes' => 'h-xs-sizing',
|
|
65
|
+
'wrapper' => false,
|
|
66
|
+
),
|
|
67
|
+
array(
|
|
68
|
+
'title' => 'H XX small',
|
|
69
|
+
'inline' => 'span',
|
|
70
|
+
'classes' => 'h-xxs-sizing',
|
|
71
|
+
'wrapper' => false,
|
|
72
|
+
),
|
|
73
|
+
array(
|
|
74
|
+
'title' => 'H XXX small',
|
|
75
|
+
'inline' => 'span',
|
|
76
|
+
'classes' => 'h-xxxs-sizing',
|
|
77
|
+
'wrapper' => false,
|
|
78
|
+
),
|
|
79
|
+
array(
|
|
80
|
+
'title' => 'SH Extra large',
|
|
81
|
+
'inline' => 'span',
|
|
82
|
+
'classes' => 'sh-xl-sizing',
|
|
83
|
+
'wrapper' => false,
|
|
84
|
+
),
|
|
85
|
+
array(
|
|
86
|
+
'title' => 'SH large',
|
|
87
|
+
'inline' => 'span',
|
|
88
|
+
'classes' => 'sh-l-sizing',
|
|
89
|
+
'wrapper' => false,
|
|
90
|
+
),
|
|
91
|
+
array(
|
|
92
|
+
'title' => 'SH medium',
|
|
93
|
+
'inline' => 'span',
|
|
94
|
+
'classes' => 'sh-m-sizing',
|
|
95
|
+
'wrapper' => false,
|
|
96
|
+
),
|
|
97
|
+
array(
|
|
98
|
+
'title' => 'SH small',
|
|
99
|
+
'inline' => 'span',
|
|
100
|
+
'classes' => 'sh-s-sizing',
|
|
101
|
+
'wrapper' => false,
|
|
102
|
+
),
|
|
103
|
+
array(
|
|
104
|
+
'title' => 'SH extra small',
|
|
105
|
+
'inline' => 'span',
|
|
106
|
+
'classes' => 'sh-xs-sizing',
|
|
107
|
+
'wrapper' => false,
|
|
108
|
+
),
|
|
109
|
+
array(
|
|
110
|
+
'title' => 'SH XX small',
|
|
111
|
+
'inline' => 'span',
|
|
112
|
+
'classes' => 'sh-xxs-sizing',
|
|
113
|
+
'wrapper' => false,
|
|
114
|
+
),
|
|
115
|
+
array(
|
|
116
|
+
'title' => 'P large',
|
|
117
|
+
'inline' => 'span',
|
|
118
|
+
'classes' => 'p-l-sizing',
|
|
119
|
+
'wrapper' => false,
|
|
120
|
+
),
|
|
121
|
+
array(
|
|
122
|
+
'title' => 'P',
|
|
123
|
+
'inline' => 'span',
|
|
124
|
+
'classes' => 'p-sizing',
|
|
125
|
+
'wrapper' => false,
|
|
126
|
+
),
|
|
127
|
+
array(
|
|
128
|
+
'title' => 'P small',
|
|
129
|
+
'inline' => 'span',
|
|
130
|
+
'classes' => 'p-s-sizing',
|
|
131
|
+
'wrapper' => false,
|
|
132
|
+
),
|
|
133
|
+
array(
|
|
134
|
+
'title' => 'P xs',
|
|
135
|
+
'inline' => 'span',
|
|
136
|
+
'classes' => 'p-xs-sizing',
|
|
137
|
+
'wrapper' => false,
|
|
138
|
+
),
|
|
139
|
+
array(
|
|
140
|
+
'title' => 'P xxs',
|
|
141
|
+
'inline' => 'span',
|
|
142
|
+
'classes' => 'p-xxs-sizing',
|
|
143
|
+
'wrapper' => false,
|
|
144
|
+
),
|
|
145
|
+
array(
|
|
146
|
+
'title' => 'P xxxs',
|
|
147
|
+
'inline' => 'span',
|
|
148
|
+
'classes' => 'p-xxxs-sizing',
|
|
149
|
+
'wrapper' => false,
|
|
150
|
+
)
|
|
151
|
+
);
|
|
152
|
+
|
|
153
|
+
// $formats = "{h1: { block: 'h1', classes: 'heading' } }";
|
|
154
|
+
|
|
155
|
+
// Define the custom colours.
|
|
156
|
+
if (!defined('THEMES_OPTIONS')) {
|
|
157
|
+
return $mce_init;
|
|
158
|
+
}
|
|
159
|
+
$options = THEMES_OPTIONS;
|
|
160
|
+
$custom_colours = '';
|
|
161
|
+
$custom_colours_row_count = 1;
|
|
162
|
+
|
|
163
|
+
if (
|
|
164
|
+
is_array($options)
|
|
165
|
+
&& array_key_exists('themes', $options)
|
|
166
|
+
&& is_array($options['themes'][0]['text_colours'] ?? false)
|
|
167
|
+
) {
|
|
168
|
+
foreach ($options['themes'][0]['text_colours'] as $option) {
|
|
169
|
+
if (!empty($option['colour'])) {
|
|
170
|
+
$custom_colours .= '"' . substr($option['colour'], 1) . '","' . $option['name'] . '",';
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
if (!empty($custom_colours)) {
|
|
174
|
+
$custom_colours = rtrim($custom_colours, ',');
|
|
175
|
+
$custom_colours_row_count = ceil((count(explode(',', $custom_colours)) + 2) / 16);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Single row of colours and include into textcolor_map.
|
|
180
|
+
$mce_init['textcolor_rows'] = $custom_colours_row_count;
|
|
181
|
+
$mce_init['textcolor_map'] = '[' . $custom_colours . ']';
|
|
182
|
+
|
|
183
|
+
// Insert the array, JSON ENCODED, into 'style_formats'.
|
|
184
|
+
$mce_init['style_formats'] = wp_json_encode($style_formats);
|
|
185
|
+
|
|
186
|
+
// $mce_init['formats'] = '[' . $formats . ']';
|
|
187
|
+
|
|
188
|
+
return $mce_init;
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Remove the Color Picker plugin from tinyMCE. This will
|
|
194
|
+
* prevent users from adding custom colors. Note, the default color
|
|
195
|
+
* palette is still available (and customizable by developers) via
|
|
196
|
+
* textcolor_map using the tiny_mce_before_init hook.
|
|
197
|
+
*
|
|
198
|
+
* @param array $plugins An array of default TinyMCE plugins.
|
|
199
|
+
*/
|
|
200
|
+
add_filter('tiny_mce_plugins', 'wpse_tiny_mce_remove_custom_colors');
|
|
201
|
+
function wpse_tiny_mce_remove_custom_colors($plugins)
|
|
202
|
+
{
|
|
203
|
+
foreach ($plugins as $key => $plugin_name) {
|
|
204
|
+
if ('colorpicker' === $plugin_name) {
|
|
205
|
+
unset($plugins[$key]);
|
|
206
|
+
return $plugins;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return $plugins;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
// Enable font family selects in the editor.
|
|
215
|
+
add_filter(
|
|
216
|
+
'mce_buttons_2',
|
|
217
|
+
function ($buttons) {
|
|
218
|
+
array_unshift($buttons, 'formats', 'styleselect', 'forecolor', 'fontselect'); // Add Font Select 'fontselect', Add custom classes 'styleselect'.
|
|
219
|
+
return $buttons;
|
|
220
|
+
}
|
|
221
|
+
);
|