PluginProbe ʕ •ᴥ•ʔ
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz / trunk
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz vtrunk
2.12.5 2.12.4 2.12.3 2.12.2 2.12.1 2.12.0 2.11.1 2.11.0 2.10.1 2.10.0 2.9.1 2.9.0 2.8.2 2.8.1 2.7.0 2.7.1 2.8.0 trunk 0.0.10 0.0.11 0.0.12 0.0.13 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.0.7 0.0.8 0.0.9 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.1.0 1.1.1 1.1.2 1.10.0 1.10.1 1.11.0 1.12.0 1.12.1 1.12.2 1.12.3 1.13.0 1.13.1 1.13.2 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.5.0 1.5.1 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.8.0 1.9.0 1.9.1 2.0.0 2.0.1 2.0.2 2.1.0 2.1.1 2.2.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.0 2.5.2 2.6.0
sureforms / modules / gutenberg / classes / class-spec-block-js.php
sureforms / modules / gutenberg / classes Last commit date
class-spec-block-config.php 2 years ago class-spec-block-helper.php 1 year ago class-spec-block-js.php 2 years ago class-spec-block-loader.php 2 years ago class-spec-filesystem.php 2 months ago class-spec-gb-helper.php 11 months ago class-spec-init-blocks.php 5 months ago class-spec-spectra-compatibility.php 5 months ago
class-spec-block-js.php
80 lines
1 <?php
2 /**
3 * Sureforms Block Js.
4 *
5 * @package Sureforms
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly.
10 }
11
12 if ( ! class_exists( 'Spec_Block_JS' ) ) {
13
14 /**
15 * Class Sureforms_Spec_Block_JS.
16 */
17 class Spec_Block_JS {
18
19 /**
20 * Adds Google fonts for Next Step Button.
21 *
22 * @since 0.0.1
23 * @param array $attr the blocks attr.
24 */
25 public static function blocks_separator_gfont( $attr ) {
26
27 $element_text_load_google_font = isset( $attr['elementTextLoadGoogleFonts'] ) ? $attr['elementTextLoadGoogleFonts'] : '';
28 $element_text_font_family = isset( $attr['elementTextFontFamily'] ) ? $attr['elementTextFontFamily'] : '';
29 $element_text_font_weight = isset( $attr['elementTextFontWeight'] ) ? $attr['elementTextFontWeight'] : '';
30
31 Spec_Gb_Helper::blocks_google_font( $element_text_load_google_font, $element_text_font_family, $element_text_font_weight );
32 }
33
34 /**
35 * Adds Google fonts for Advanced Heading block.
36 *
37 * @since 0.0.1
38 * @param array $attr the blocks attr.
39 */
40 public static function blocks_advanced_heading_gfont( $attr ) {
41
42 $head_load_google_font = isset( $attr['headLoadGoogleFonts'] ) ? $attr['headLoadGoogleFonts'] : '';
43 $head_font_family = isset( $attr['headFontFamily'] ) ? $attr['headFontFamily'] : '';
44 $head_font_weight = isset( $attr['headFontWeight'] ) ? $attr['headFontWeight'] : '';
45
46 $subhead_load_google_font = isset( $attr['subHeadLoadGoogleFonts'] ) ? $attr['subHeadLoadGoogleFonts'] : '';
47 $subhead_font_family = isset( $attr['subHeadFontFamily'] ) ? $attr['subHeadFontFamily'] : '';
48 $subhead_font_weight = isset( $attr['subHeadFontWeight'] ) ? $attr['subHeadFontWeight'] : '';
49
50 $highlight_head_load_google_font = isset( $attr['highLightLoadGoogleFonts'] ) ? $attr['highLightLoadGoogleFonts'] : '';
51 $highlight_head_font_family = isset( $attr['highLightFontFamily'] ) ? $attr['highLightFontFamily'] : '';
52 $highlight_head_font_weight = isset( $attr['highLightFontWeight'] ) ? $attr['highLightFontWeight'] : '';
53
54 Spec_Gb_Helper::blocks_google_font( $head_load_google_font, $head_font_family, $head_font_weight );
55 Spec_Gb_Helper::blocks_google_font( $subhead_load_google_font, $subhead_font_family, $subhead_font_weight );
56 Spec_Gb_Helper::blocks_google_font( $highlight_head_load_google_font, $highlight_head_font_family, $highlight_head_font_weight );
57 }
58
59 /**
60 * Adds Google fonts for Advanced Image block.
61 *
62 * @since 0.0.1
63 * @param array $attr the blocks attr.
64 */
65 public static function blocks_image_gfont( $attr ) {
66
67 $heading_load_google_font = isset( $attr['headingLoadGoogleFonts'] ) ? $attr['headingLoadGoogleFonts'] : '';
68 $heading_font_family = isset( $attr['headingFontFamily'] ) ? $attr['headingFontFamily'] : '';
69 $heading_font_weight = isset( $attr['headingFontWeight'] ) ? $attr['headingFontWeight'] : '';
70
71 $caption_load_google_font = isset( $attr['captionLoadGoogleFonts'] ) ? $attr['captionLoadGoogleFonts'] : '';
72 $caption_font_family = isset( $attr['captionFontFamily'] ) ? $attr['captionFontFamily'] : '';
73 $caption_font_weight = isset( $attr['captionFontWeight'] ) ? $attr['captionFontWeight'] : '';
74
75 Spec_Gb_Helper::blocks_google_font( $heading_load_google_font, $heading_font_family, $heading_font_weight );
76 Spec_Gb_Helper::blocks_google_font( $caption_load_google_font, $caption_font_family, $caption_font_weight );
77 }
78 }
79 }
80