PluginProbe
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz / 2.12.7
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz v2.12.7
2.12.7 2.12.6 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 All 97 releases
sureforms / modules / gutenberg / classes / class-spec-block-js.php

class-spec-block-js.php in SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz 2.12.7, at modules/gutenberg/classes/class-spec-block-js.php

80 lines 3.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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