Merged in release/release-1.09 (pull request #10)
Release/release 1.09 * Install missing plugins * rs set to 1 * rebase pantheon for aws * rebase pantheon for aws * prod config change * prod config change * fix campaing issue * revert Approved-by: Jay Sharma
This commit is contained in:
committed by
Jay Sharma
parent
779393381f
commit
22f10a9edd
@@ -1,168 +1,168 @@
|
||||
<?php
|
||||
/**
|
||||
* Schema Pro Admin Helper.
|
||||
*
|
||||
* @package Schema Pro
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'BSF_SP_Admin_Helper' ) ) {
|
||||
|
||||
/**
|
||||
* Class BSF_SP_Admin_Helper.
|
||||
*/
|
||||
final class BSF_SP_Admin_Helper {
|
||||
|
||||
/**
|
||||
* Member Variable
|
||||
*
|
||||
* @since 0.0.1
|
||||
* @var instance
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
/**
|
||||
* Initiator
|
||||
*
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public static function get_instance() {
|
||||
if ( ! isset( self::$instance ) ) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an option from the database for
|
||||
* the admin settings page.
|
||||
*
|
||||
* @param string $key The option key.
|
||||
* @param mixed $default Option default value if option is not available.
|
||||
* @param boolean $network_override Whether to allow the network admin setting to be overridden on subsites.
|
||||
* @return string Return the option value
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public static function get_admin_settings_option( $key, $default = false, $network_override = false ) {
|
||||
|
||||
// Get the site-wide option if we're in the network admin.
|
||||
if ( $network_override && is_multisite() ) {
|
||||
$value = get_site_option( $key, $default );
|
||||
} else {
|
||||
$value = get_option( $key, $default );
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide Widget settings.
|
||||
*
|
||||
* @return array()
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public static function get_block_options() {
|
||||
|
||||
$blocks = BSF_SP_Helper::$block_list;
|
||||
$saved_blocks = self::get_admin_settings_option( '_wpsp_blocks' );
|
||||
if ( is_array( $blocks ) ) {
|
||||
foreach ( $blocks as $slug => $data ) {
|
||||
$_slug = str_replace( 'wpsp/', '', $slug );
|
||||
|
||||
if ( isset( $saved_blocks[ $_slug ] ) ) {
|
||||
if ( 'disabled' === $saved_blocks[ $_slug ] ) {
|
||||
$blocks[ $slug ]['is_activate'] = false;
|
||||
} else {
|
||||
$blocks[ $slug ]['is_activate'] = true;
|
||||
}
|
||||
} else {
|
||||
$blocks[ $slug ]['is_activate'] = ( isset( $data['default'] ) ) ? $data['default'] : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BSF_SP_Helper::$block_list = $blocks;
|
||||
|
||||
return apply_filters( 'wpsp_enabled_blocks', BSF_SP_Helper::$block_list );
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an option from the admin settings page.
|
||||
*
|
||||
* @param string $key The option key.
|
||||
* @param mixed $value The value to update.
|
||||
* @param bool $network Whether to allow the network admin setting to be overridden on subsites.
|
||||
* @return mixed
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public static function update_admin_settings_option( $key, $value, $network = false ) {
|
||||
|
||||
// Update the site-wide option since we're in the network admin.
|
||||
if ( $network && is_multisite() ) {
|
||||
update_site_option( $key, $value );
|
||||
} else {
|
||||
update_option( $key, $value );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Specific Stylesheet
|
||||
*
|
||||
* @since 1.13.4
|
||||
*/
|
||||
public static function create_specific_stylesheet() {
|
||||
|
||||
$saved_blocks = self::get_admin_settings_option( '_wpsp_blocks' );
|
||||
$combined = array();
|
||||
$is_already_faq = false;
|
||||
|
||||
foreach ( BSF_SP_Config::$block_attributes as $key => $block ) {
|
||||
|
||||
$block_name = str_replace( 'wpsp/', '', $key );
|
||||
|
||||
if ( isset( $saved_blocks[ $block_name ] ) && 'disabled' === $saved_blocks[ $block_name ] ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
switch ( $block_name ) {
|
||||
case 'faq-child':
|
||||
case 'faq':
|
||||
if ( ! $is_already_faq ) {
|
||||
$combined[] = 'faq';
|
||||
$combined[] = 'faq-child';
|
||||
$is_already_faq = true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
$combined[] = $block_name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$combined_path = plugin_dir_path( BSF_AIOSRS_PRO_FILE ) . 'dist/style-blocks.css';
|
||||
wp_delete_file( $combined_path );
|
||||
|
||||
$style = '';
|
||||
|
||||
$wp_filesystem = BSF_SP_Helper::get_instance()->get_filesystem();
|
||||
|
||||
foreach ( $combined as $key => $c_block ) {
|
||||
$style .= $wp_filesystem->get_contents( plugin_dir_path( BSF_AIOSRS_PRO_FILE ) . 'wpsp-blocks/assets/css/blocks/' . $c_block . '.css' );
|
||||
|
||||
}
|
||||
$wp_filesystem->put_contents( $combined_path, $style, FS_CHMOD_FILE );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare if class 'WPSP_Admin_Helper' exist.
|
||||
* Kicking this off by calling 'get_instance()' method
|
||||
*/
|
||||
BSF_SP_Admin_Helper::get_instance();
|
||||
}
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Schema Pro Admin Helper.
|
||||
*
|
||||
* @package Schema Pro
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'BSF_SP_Admin_Helper' ) ) {
|
||||
|
||||
/**
|
||||
* Class BSF_SP_Admin_Helper.
|
||||
*/
|
||||
final class BSF_SP_Admin_Helper {
|
||||
|
||||
/**
|
||||
* Member Variable
|
||||
*
|
||||
* @since 0.0.1
|
||||
* @var instance
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
/**
|
||||
* Initiator
|
||||
*
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public static function get_instance() {
|
||||
if ( ! isset( self::$instance ) ) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an option from the database for
|
||||
* the admin settings page.
|
||||
*
|
||||
* @param string $key The option key.
|
||||
* @param mixed $default Option default value if option is not available.
|
||||
* @param boolean $network_override Whether to allow the network admin setting to be overridden on subsites.
|
||||
* @return string Return the option value
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public static function get_admin_settings_option( $key, $default = false, $network_override = false ) {
|
||||
|
||||
// Get the site-wide option if we're in the network admin.
|
||||
if ( $network_override && is_multisite() ) {
|
||||
$value = get_site_option( $key, $default );
|
||||
} else {
|
||||
$value = get_option( $key, $default );
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide Widget settings.
|
||||
*
|
||||
* @return array()
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public static function get_block_options() {
|
||||
|
||||
$blocks = BSF_SP_Helper::$block_list;
|
||||
$saved_blocks = self::get_admin_settings_option( '_wpsp_blocks' );
|
||||
if ( is_array( $blocks ) ) {
|
||||
foreach ( $blocks as $slug => $data ) {
|
||||
$_slug = str_replace( 'wpsp/', '', $slug );
|
||||
|
||||
if ( isset( $saved_blocks[ $_slug ] ) ) {
|
||||
if ( 'disabled' === $saved_blocks[ $_slug ] ) {
|
||||
$blocks[ $slug ]['is_activate'] = false;
|
||||
} else {
|
||||
$blocks[ $slug ]['is_activate'] = true;
|
||||
}
|
||||
} else {
|
||||
$blocks[ $slug ]['is_activate'] = ( isset( $data['default'] ) ) ? $data['default'] : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BSF_SP_Helper::$block_list = $blocks;
|
||||
|
||||
return apply_filters( 'wpsp_enabled_blocks', BSF_SP_Helper::$block_list );
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an option from the admin settings page.
|
||||
*
|
||||
* @param string $key The option key.
|
||||
* @param mixed $value The value to update.
|
||||
* @param bool $network Whether to allow the network admin setting to be overridden on subsites.
|
||||
* @return mixed
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public static function update_admin_settings_option( $key, $value, $network = false ) {
|
||||
|
||||
// Update the site-wide option since we're in the network admin.
|
||||
if ( $network && is_multisite() ) {
|
||||
update_site_option( $key, $value );
|
||||
} else {
|
||||
update_option( $key, $value );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Specific Stylesheet
|
||||
*
|
||||
* @since 1.13.4
|
||||
*/
|
||||
public static function create_specific_stylesheet() {
|
||||
|
||||
$saved_blocks = self::get_admin_settings_option( '_wpsp_blocks' );
|
||||
$combined = array();
|
||||
$is_already_faq = false;
|
||||
|
||||
foreach ( BSF_SP_Config::$block_attributes as $key => $block ) {
|
||||
|
||||
$block_name = str_replace( 'wpsp/', '', $key );
|
||||
|
||||
if ( isset( $saved_blocks[ $block_name ] ) && 'disabled' === $saved_blocks[ $block_name ] ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
switch ( $block_name ) {
|
||||
case 'faq-child':
|
||||
case 'faq':
|
||||
if ( ! $is_already_faq ) {
|
||||
$combined[] = 'faq';
|
||||
$combined[] = 'faq-child';
|
||||
$is_already_faq = true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
$combined[] = $block_name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$combined_path = plugin_dir_path( BSF_AIOSRS_PRO_FILE ) . 'dist/style-blocks.css';
|
||||
wp_delete_file( $combined_path );
|
||||
|
||||
$style = '';
|
||||
|
||||
$wp_filesystem = BSF_SP_Helper::get_instance()->get_filesystem();
|
||||
|
||||
foreach ( $combined as $key => $c_block ) {
|
||||
$style .= $wp_filesystem->get_contents( plugin_dir_path( BSF_AIOSRS_PRO_FILE ) . 'wpsp-blocks/assets/css/blocks/' . $c_block . '.css' );
|
||||
|
||||
}
|
||||
$wp_filesystem->put_contents( $combined_path, $style, FS_CHMOD_FILE );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare if class 'WPSP_Admin_Helper' exist.
|
||||
* Kicking this off by calling 'get_instance()' method
|
||||
*/
|
||||
BSF_SP_Admin_Helper::get_instance();
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,98 +1,98 @@
|
||||
<?php
|
||||
/**
|
||||
* Schema Pro Block Helper.
|
||||
*
|
||||
* @package Schema Pro
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'BSF_SP_Block_JS' ) ) {
|
||||
|
||||
/**
|
||||
* Class BSF_SP_Block_JS.
|
||||
*/
|
||||
class BSF_SP_Block_JS {
|
||||
|
||||
/**
|
||||
* Adds Google fonts for FAQ block.
|
||||
*
|
||||
* @since 1.15.0
|
||||
* @param array $attr the blocks attr.
|
||||
*/
|
||||
public static function blocks_faq_gfont( $attr ) {
|
||||
|
||||
$question_load_google_font = isset( $attr['questionloadGoogleFonts'] ) ? $attr['questionloadGoogleFonts'] : '';
|
||||
$question_font_family = isset( $attr['questionFontFamily'] ) ? $attr['questionFontFamily'] : '';
|
||||
$question_font_weight = isset( $attr['questionFontWeight'] ) ? $attr['questionFontWeight'] : '';
|
||||
$question_font_subset = isset( $attr['questionFontSubset'] ) ? $attr['questionFontSubset'] : '';
|
||||
|
||||
$answer_load_google_font = isset( $attr['answerloadGoogleFonts'] ) ? $attr['answerloadGoogleFonts'] : '';
|
||||
$answer_font_family = isset( $attr['answerFontFamily'] ) ? $attr['answerFontFamily'] : '';
|
||||
$answer_font_weight = isset( $attr['answerFontWeight'] ) ? $attr['answerFontWeight'] : '';
|
||||
$answer_font_subset = isset( $attr['answerFontSubset'] ) ? $attr['answerFontSubset'] : '';
|
||||
|
||||
BSF_SP_Helper::blocks_google_font( $question_load_google_font, $question_font_family, $question_font_weight, $question_font_subset );
|
||||
BSF_SP_Helper::blocks_google_font( $answer_load_google_font, $answer_font_family, $answer_font_weight, $answer_font_subset );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds Google fonts for How To block.
|
||||
*
|
||||
* @since 2.4.0
|
||||
* @param array $attr the blocks attr.
|
||||
*/
|
||||
public static function blocks_how_to_gfont( $attr ) {
|
||||
|
||||
$head_load_google_font = isset( $attr['headLoadGoogleFonts'] ) ? $attr['headLoadGoogleFonts'] : '';
|
||||
$head_font_family = isset( $attr['headFontFamily'] ) ? $attr['headFontFamily'] : '';
|
||||
$head_font_weight = isset( $attr['headFontWeight'] ) ? $attr['headFontWeight'] : '';
|
||||
$head_font_subset = isset( $attr['headFontSubset'] ) ? $attr['headFontSubset'] : '';
|
||||
|
||||
$subhead_load_google_font = isset( $attr['subHeadLoadGoogleFonts'] ) ? $attr['subHeadLoadGoogleFonts'] : '';
|
||||
$subhead_font_family = isset( $attr['subHeadFontFamily'] ) ? $attr['subHeadFontFamily'] : '';
|
||||
$subhead_font_weight = isset( $attr['subHeadFontWeight'] ) ? $attr['subHeadFontWeight'] : '';
|
||||
$subhead_font_subset = isset( $attr['subHeadFontSubset'] ) ? $attr['subHeadFontSubset'] : '';
|
||||
|
||||
$price_load_google_font = isset( $attr['priceLoadGoogleFonts'] ) ? $attr['priceLoadGoogleFonts'] : '';
|
||||
$price_font_family = isset( $attr['priceFontFamily'] ) ? $attr['priceFontFamily'] : '';
|
||||
$price_font_weight = isset( $attr['priceFontWeight'] ) ? $attr['priceFontWeight'] : '';
|
||||
$price_font_subset = isset( $attr['priceFontSubset'] ) ? $attr['priceFontSubset'] : '';
|
||||
|
||||
BSF_SP_Helper::blocks_google_font( $head_load_google_font, $head_font_family, $head_font_weight, $head_font_subset );
|
||||
BSF_SP_Helper::blocks_google_font( $subhead_load_google_font, $subhead_font_family, $subhead_font_weight, $subhead_font_subset );
|
||||
BSF_SP_Helper::blocks_google_font( $price_load_google_font, $price_font_family, $price_font_weight, $price_font_subset );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds Google fonts for HowTo Child Block.
|
||||
*
|
||||
* @since 2.4.0
|
||||
* @param array $attr the blocks attr.
|
||||
*/
|
||||
public static function blocks_how_to_child_gfont( $attr ) {
|
||||
|
||||
$head_load_google_font = isset( $attr['headLoadGoogleFonts'] ) ? $attr['headLoadGoogleFonts'] : '';
|
||||
$head_font_family = isset( $attr['headFontFamily'] ) ? $attr['headFontFamily'] : '';
|
||||
$head_font_weight = isset( $attr['headFontWeight'] ) ? $attr['headFontWeight'] : '';
|
||||
$head_font_subset = isset( $attr['headFontSubset'] ) ? $attr['headFontSubset'] : '';
|
||||
|
||||
$subhead_load_google_font = isset( $attr['subHeadLoadGoogleFonts'] ) ? $attr['subHeadLoadGoogleFonts'] : '';
|
||||
$subhead_font_family = isset( $attr['subHeadFontFamily'] ) ? $attr['subHeadFontFamily'] : '';
|
||||
$subhead_font_weight = isset( $attr['subHeadFontWeight'] ) ? $attr['subHeadFontWeight'] : '';
|
||||
$subhead_font_subset = isset( $attr['subHeadFontSubset'] ) ? $attr['subHeadFontSubset'] : '';
|
||||
|
||||
$cta_load_google_font = isset( $attr['ctaLoadGoogleFonts'] ) ? $attr['ctaLoadGoogleFonts'] : '';
|
||||
$cta_font_family = isset( $attr['ctaFontFamily'] ) ? $attr['ctaFontFamily'] : '';
|
||||
$cta_font_weight = isset( $attr['ctaFontWeight'] ) ? $attr['ctaFontWeight'] : '';
|
||||
$cta_font_subset = isset( $attr['ctaFontSubset'] ) ? $attr['ctaFontSubset'] : '';
|
||||
|
||||
BSF_SP_Helper::blocks_google_font( $cta_load_google_font, $cta_font_family, $cta_font_weight, $cta_font_subset );
|
||||
BSF_SP_Helper::blocks_google_font( $head_load_google_font, $head_font_family, $head_font_weight, $head_font_subset );
|
||||
BSF_SP_Helper::blocks_google_font( $subhead_load_google_font, $subhead_font_family, $subhead_font_weight, $subhead_font_subset );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Schema Pro Block Helper.
|
||||
*
|
||||
* @package Schema Pro
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'BSF_SP_Block_JS' ) ) {
|
||||
|
||||
/**
|
||||
* Class BSF_SP_Block_JS.
|
||||
*/
|
||||
class BSF_SP_Block_JS {
|
||||
|
||||
/**
|
||||
* Adds Google fonts for FAQ block.
|
||||
*
|
||||
* @since 1.15.0
|
||||
* @param array $attr the blocks attr.
|
||||
*/
|
||||
public static function blocks_faq_gfont( $attr ) {
|
||||
|
||||
$question_load_google_font = isset( $attr['questionloadGoogleFonts'] ) ? $attr['questionloadGoogleFonts'] : '';
|
||||
$question_font_family = isset( $attr['questionFontFamily'] ) ? $attr['questionFontFamily'] : '';
|
||||
$question_font_weight = isset( $attr['questionFontWeight'] ) ? $attr['questionFontWeight'] : '';
|
||||
$question_font_subset = isset( $attr['questionFontSubset'] ) ? $attr['questionFontSubset'] : '';
|
||||
|
||||
$answer_load_google_font = isset( $attr['answerloadGoogleFonts'] ) ? $attr['answerloadGoogleFonts'] : '';
|
||||
$answer_font_family = isset( $attr['answerFontFamily'] ) ? $attr['answerFontFamily'] : '';
|
||||
$answer_font_weight = isset( $attr['answerFontWeight'] ) ? $attr['answerFontWeight'] : '';
|
||||
$answer_font_subset = isset( $attr['answerFontSubset'] ) ? $attr['answerFontSubset'] : '';
|
||||
|
||||
BSF_SP_Helper::blocks_google_font( $question_load_google_font, $question_font_family, $question_font_weight, $question_font_subset );
|
||||
BSF_SP_Helper::blocks_google_font( $answer_load_google_font, $answer_font_family, $answer_font_weight, $answer_font_subset );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds Google fonts for How To block.
|
||||
*
|
||||
* @since 2.4.0
|
||||
* @param array $attr the blocks attr.
|
||||
*/
|
||||
public static function blocks_how_to_gfont( $attr ) {
|
||||
|
||||
$head_load_google_font = isset( $attr['headLoadGoogleFonts'] ) ? $attr['headLoadGoogleFonts'] : '';
|
||||
$head_font_family = isset( $attr['headFontFamily'] ) ? $attr['headFontFamily'] : '';
|
||||
$head_font_weight = isset( $attr['headFontWeight'] ) ? $attr['headFontWeight'] : '';
|
||||
$head_font_subset = isset( $attr['headFontSubset'] ) ? $attr['headFontSubset'] : '';
|
||||
|
||||
$subhead_load_google_font = isset( $attr['subHeadLoadGoogleFonts'] ) ? $attr['subHeadLoadGoogleFonts'] : '';
|
||||
$subhead_font_family = isset( $attr['subHeadFontFamily'] ) ? $attr['subHeadFontFamily'] : '';
|
||||
$subhead_font_weight = isset( $attr['subHeadFontWeight'] ) ? $attr['subHeadFontWeight'] : '';
|
||||
$subhead_font_subset = isset( $attr['subHeadFontSubset'] ) ? $attr['subHeadFontSubset'] : '';
|
||||
|
||||
$price_load_google_font = isset( $attr['priceLoadGoogleFonts'] ) ? $attr['priceLoadGoogleFonts'] : '';
|
||||
$price_font_family = isset( $attr['priceFontFamily'] ) ? $attr['priceFontFamily'] : '';
|
||||
$price_font_weight = isset( $attr['priceFontWeight'] ) ? $attr['priceFontWeight'] : '';
|
||||
$price_font_subset = isset( $attr['priceFontSubset'] ) ? $attr['priceFontSubset'] : '';
|
||||
|
||||
BSF_SP_Helper::blocks_google_font( $head_load_google_font, $head_font_family, $head_font_weight, $head_font_subset );
|
||||
BSF_SP_Helper::blocks_google_font( $subhead_load_google_font, $subhead_font_family, $subhead_font_weight, $subhead_font_subset );
|
||||
BSF_SP_Helper::blocks_google_font( $price_load_google_font, $price_font_family, $price_font_weight, $price_font_subset );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds Google fonts for HowTo Child Block.
|
||||
*
|
||||
* @since 2.4.0
|
||||
* @param array $attr the blocks attr.
|
||||
*/
|
||||
public static function blocks_how_to_child_gfont( $attr ) {
|
||||
|
||||
$head_load_google_font = isset( $attr['headLoadGoogleFonts'] ) ? $attr['headLoadGoogleFonts'] : '';
|
||||
$head_font_family = isset( $attr['headFontFamily'] ) ? $attr['headFontFamily'] : '';
|
||||
$head_font_weight = isset( $attr['headFontWeight'] ) ? $attr['headFontWeight'] : '';
|
||||
$head_font_subset = isset( $attr['headFontSubset'] ) ? $attr['headFontSubset'] : '';
|
||||
|
||||
$subhead_load_google_font = isset( $attr['subHeadLoadGoogleFonts'] ) ? $attr['subHeadLoadGoogleFonts'] : '';
|
||||
$subhead_font_family = isset( $attr['subHeadFontFamily'] ) ? $attr['subHeadFontFamily'] : '';
|
||||
$subhead_font_weight = isset( $attr['subHeadFontWeight'] ) ? $attr['subHeadFontWeight'] : '';
|
||||
$subhead_font_subset = isset( $attr['subHeadFontSubset'] ) ? $attr['subHeadFontSubset'] : '';
|
||||
|
||||
$cta_load_google_font = isset( $attr['ctaLoadGoogleFonts'] ) ? $attr['ctaLoadGoogleFonts'] : '';
|
||||
$cta_font_family = isset( $attr['ctaFontFamily'] ) ? $attr['ctaFontFamily'] : '';
|
||||
$cta_font_weight = isset( $attr['ctaFontWeight'] ) ? $attr['ctaFontWeight'] : '';
|
||||
$cta_font_subset = isset( $attr['ctaFontSubset'] ) ? $attr['ctaFontSubset'] : '';
|
||||
|
||||
BSF_SP_Helper::blocks_google_font( $cta_load_google_font, $cta_font_family, $cta_font_weight, $cta_font_subset );
|
||||
BSF_SP_Helper::blocks_google_font( $head_load_google_font, $head_font_family, $head_font_weight, $head_font_subset );
|
||||
BSF_SP_Helper::blocks_google_font( $subhead_load_google_font, $subhead_font_family, $subhead_font_weight, $subhead_font_subset );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,338 +1,338 @@
|
||||
<?php
|
||||
/**
|
||||
* Schema Pro Config.
|
||||
*
|
||||
* @package Schema Pro
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'BSF_SP_Config' ) ) {
|
||||
|
||||
/**
|
||||
* Class BSF_SP_Config.
|
||||
*/
|
||||
class BSF_SP_Config {
|
||||
|
||||
/**
|
||||
* Block Attributes
|
||||
*
|
||||
* @var block_attributes
|
||||
*/
|
||||
public static $block_attributes = null;
|
||||
|
||||
/**
|
||||
* Block Assets
|
||||
*
|
||||
* @var block_attributes
|
||||
*/
|
||||
public static $block_assets = null;
|
||||
|
||||
/**
|
||||
* Get Widget List.
|
||||
*
|
||||
* @since 0.0.1
|
||||
*
|
||||
* @return array The Widget List.
|
||||
*/
|
||||
public static function get_block_attributes() {
|
||||
|
||||
if ( null === self::$block_attributes ) {
|
||||
self::$block_attributes = array(
|
||||
'wpsp/faq' => array(
|
||||
'slug' => '',
|
||||
'title' => __( 'FAQ - Schema Pro', 'wp-schema-pro' ),
|
||||
'description' => __( 'This block helps you add a FAQ section with inbuilt schema support.', 'wp-schema-pro' ),
|
||||
'default' => true,
|
||||
'js_assets' => array( 'wpsp-faq-js' ),
|
||||
'attributes' => array(
|
||||
'block_id' => '',
|
||||
'layout' => 'accordion',
|
||||
'inactiveOtherItems' => true,
|
||||
'expandFirstItem' => false,
|
||||
'enableSchemaSupport' => false,
|
||||
'align' => 'left',
|
||||
'enableSeparator' => false,
|
||||
'rowsGap' => 10,
|
||||
'columnsGap' => 10,
|
||||
'boxBgColor' => '#FFFFFF',
|
||||
'boxPaddingTypeMobile' => 'px',
|
||||
'boxPaddingTypeTablet' => 'px',
|
||||
'boxPaddingTypeDesktop' => 'px',
|
||||
'vBoxPaddingMobile' => 10,
|
||||
'hBoxPaddingMobile' => 10,
|
||||
'vBoxPaddingTablet' => 10,
|
||||
'hBoxPaddingTablet' => 10,
|
||||
'vBoxPaddingDesktop' => 10,
|
||||
'hBoxPaddingDesktop' => 10,
|
||||
'borderStyle' => 'solid',
|
||||
'borderWidth' => 1,
|
||||
'borderRadius' => 2,
|
||||
'borderColor' => '#D2D2D2',
|
||||
'questionTextColor' => '#313131',
|
||||
'questionTextActiveColor' => '#313131',
|
||||
'questionPaddingTypeDesktop' => 'px',
|
||||
'vquestionPaddingMobile' => 10,
|
||||
'vquestionPaddingTablet' => 10,
|
||||
'vquestionPaddingDesktop' => 10,
|
||||
'hquestionPaddingMobile' => 10,
|
||||
'hquestionPaddingTablet' => 10,
|
||||
'hquestionPaddingDesktop' => 10,
|
||||
'answerTextColor' => '#313131',
|
||||
'answerPaddingTypeDesktop' => 'px',
|
||||
'vanswerPaddingMobile' => 10,
|
||||
'vanswerPaddingTablet' => 10,
|
||||
'vanswerPaddingDesktop' => 10,
|
||||
'hanswerPaddingMobile' => 10,
|
||||
'hanswerPaddingTablet' => 10,
|
||||
'hanswerPaddingDesktop' => 10,
|
||||
'iconColor' => '',
|
||||
'iconActiveColor' => '',
|
||||
'gapBtwIconQUestion' => 10,
|
||||
'questionloadGoogleFonts' => false,
|
||||
'answerloadGoogleFonts' => false,
|
||||
'questionFontFamily' => 'Default',
|
||||
'questionFontWeight' => '',
|
||||
'questionFontSubset' => '',
|
||||
'questionFontSize' => '',
|
||||
'questionFontSizeType' => 'px',
|
||||
'questionFontSizeTablet' => '',
|
||||
'questionFontSizeMobile' => '',
|
||||
'questionLineHeight' => '',
|
||||
'questionLineHeightType' => 'em',
|
||||
'questionLineHeightTablet' => '',
|
||||
'questionLineHeightMobile' => '',
|
||||
'answerFontFamily' => 'Default',
|
||||
'answerFontWeight' => '',
|
||||
'answerFontSubset' => '',
|
||||
'answerFontSize' => '',
|
||||
'answerFontSizeType' => 'px',
|
||||
'answerFontSizeTablet' => '',
|
||||
'answerFontSizeMobile' => '',
|
||||
'answerLineHeight' => '',
|
||||
'answerLineHeightType' => 'em',
|
||||
'answerLineHeightTablet' => '',
|
||||
'answerLineHeightMobile' => '',
|
||||
'icon' => 'fas fa-plus',
|
||||
'iconActive' => 'fas fa-minus',
|
||||
'iconAlign' => 'row',
|
||||
'iconSize' => 15,
|
||||
'iconSizeMobile' => 15,
|
||||
'iconSizeTablet' => 15,
|
||||
'iconSizeType' => 'px',
|
||||
'columns' => 2,
|
||||
'tcolumns' => 2,
|
||||
'mcolumns' => 1,
|
||||
'schema' => '',
|
||||
'enableToggle' => true,
|
||||
'questionLeftPaddingTablet' => 10,
|
||||
'questionBottomPaddingTablet' => 10,
|
||||
'questionLeftPaddingDesktop' => 10,
|
||||
'questionBottomPaddingDesktop' => 10,
|
||||
'questionLeftPaddingMobile' => 10,
|
||||
'questionBottomPaddingMobile' => 10,
|
||||
),
|
||||
),
|
||||
'wpsp/faq-child' => array(
|
||||
'slug' => '',
|
||||
'title' => __( 'FAQ - Schema Pro Child', 'wp-schema-pro' ),
|
||||
'description' => __( 'This block helps you add single FAQ.', 'wp-schema-pro' ),
|
||||
'default' => true,
|
||||
'attributes' => array(
|
||||
'block_id' => '',
|
||||
'question' => '',
|
||||
'answer' => '',
|
||||
'icon' => 'fas fa-plus',
|
||||
'iconActive' => 'fas fa-minus',
|
||||
'layout' => 'accordion',
|
||||
),
|
||||
),
|
||||
'wpsp/how-to' => array(
|
||||
'slug' => '',
|
||||
'title' => __( 'How-to - Schema Pro', 'wp-schema-pro' ),
|
||||
'description' => __( 'This block allows you to design attractive How-to pages or articles with automatically adding How-to Schema to your page.', 'wp-schema-pro' ),
|
||||
'default' => true,
|
||||
'attributes' => array(
|
||||
'block_id' => '',
|
||||
'overallAlignment' => 'left',
|
||||
'toolsCount' => 1,
|
||||
'materialCount' => 1,
|
||||
'tools' => '',
|
||||
'materials' => '',
|
||||
'showTotaltime' => false,
|
||||
'showEstcost' => false,
|
||||
'showTools' => false,
|
||||
'showMaterials' => false,
|
||||
'mainimage' => '',
|
||||
'imgSize' => 'thumbnail',
|
||||
'timeSpace' => 5,
|
||||
'costSpace' => 5,
|
||||
'time' => '30',
|
||||
'cost' => '65',
|
||||
'currencyType' => ' USD',
|
||||
'headingAlign' => 'left',
|
||||
'descriptionAlign' => 'left',
|
||||
'headingColor' => '',
|
||||
'showEstcostcolor' => '',
|
||||
'showTotaltimecolor' => '',
|
||||
'subHeadingColor' => '',
|
||||
'headingTag' => 'h3',
|
||||
'headSpace' => 15,
|
||||
'headFontFamily' => 'Default',
|
||||
'headFontWeight' => '',
|
||||
'headFontSubset' => '',
|
||||
'headFontSizeType' => 'px',
|
||||
'headLineHeightType' => 'em',
|
||||
'headFontSize' => '',
|
||||
'headFontSizeTablet' => '',
|
||||
'headFontSizeMobile' => '',
|
||||
'headLineHeight' => '',
|
||||
'headLineHeightTablet' => '',
|
||||
'headLineHeightMobile' => '',
|
||||
'subHeadFontFamily' => 'Default',
|
||||
'subHeadFontWeight' => '',
|
||||
'subHeadFontSubset' => '',
|
||||
'subHeadFontSize' => '',
|
||||
'subHeadFontSizeType' => 'px',
|
||||
'subHeadFontSizeTablet' => '',
|
||||
'subHeadFontSizeMobile' => '',
|
||||
'subHeadLineHeight' => '',
|
||||
'subHeadLineHeightType' => 'em',
|
||||
'subHeadLineHeightTablet' => '',
|
||||
'subHeadLineHeightMobile' => '',
|
||||
'separatorSpace' => 15,
|
||||
'headLoadGoogleFonts' => false,
|
||||
'subHeadLoadGoogleFonts' => false,
|
||||
'priceFontSizeType' => 'px',
|
||||
'priceFontSize' => '',
|
||||
'priceFontSizeTablet' => '',
|
||||
'priceFontSizeMobile' => '',
|
||||
'priceFontFamily' => 'Default',
|
||||
'priceFontWeight' => '',
|
||||
'priceFontSubset' => '',
|
||||
'priceLineHeightType' => 'em',
|
||||
'priceLineHeight' => '',
|
||||
'priceLineHeightTablet' => '',
|
||||
'priceLineHeightMobile' => '',
|
||||
'priceLoadGoogleFonts' => false,
|
||||
'row_gap' => 20,
|
||||
'step_gap' => 20,
|
||||
'schema' => '',
|
||||
),
|
||||
),
|
||||
'wpsp/how-to-child' => array(
|
||||
'slug' => '',
|
||||
'title' => __( 'Steps', 'wp-schema-pro' ),
|
||||
'description' => __( 'This steps box allows you to place an image along with a heading and description within a single block.', 'wp-schema-pro' ),
|
||||
'default' => true,
|
||||
'attributes' => array(
|
||||
'classMigrate' => false,
|
||||
'headingAlign' => 'left',
|
||||
'headingColor' => '',
|
||||
'subHeadingColor' => '',
|
||||
'headFontSize' => '',
|
||||
'headFontSizeType' => 'px',
|
||||
'headFontSizeTablet' => '',
|
||||
'headFontSizeMobile' => '',
|
||||
'headFontFamily' => '',
|
||||
'headFontWeight' => '',
|
||||
'headFontSubset' => '',
|
||||
'headLineHeightType' => 'em',
|
||||
'headLineHeight' => '',
|
||||
'headLineHeightTablet' => '',
|
||||
'headLineHeightMobile' => '',
|
||||
'headLoadGoogleFonts' => false,
|
||||
'subHeadFontSize' => '',
|
||||
'subHeadFontSizeType' => 'px',
|
||||
'subHeadFontSizeTablet' => '',
|
||||
'subHeadFontSizeMobile' => '',
|
||||
'subHeadFontFamily' => '',
|
||||
'subHeadFontWeight' => '',
|
||||
'subHeadFontSubset' => '',
|
||||
'subHeadLineHeightType' => 'em',
|
||||
'subHeadLineHeight' => '',
|
||||
'subHeadLineHeightTablet' => '',
|
||||
'subHeadLineHeightMobile' => '',
|
||||
'subHeadLoadGoogleFonts' => false,
|
||||
'separatorWidth' => '',
|
||||
'separatorHeight' => '',
|
||||
'separatorWidthType' => '%',
|
||||
'headSpace' => '10',
|
||||
'separatorSpace' => '10',
|
||||
'subHeadSpace' => '10',
|
||||
'iconColor' => '#333',
|
||||
'iconSize' => '40',
|
||||
'iconimgPosition' => 'above-title',
|
||||
'block_id' => '',
|
||||
'iconHover' => '',
|
||||
'iconimgBorderRadius' => '0',
|
||||
'seperatorStyle' => 'solid',
|
||||
'seperatorWidth' => '30',
|
||||
'seperatorColor' => '#333',
|
||||
'seperatorThickness' => '2',
|
||||
'ctaLinkColor' => '#333',
|
||||
'ctaFontSize' => '',
|
||||
'ctaFontSizeType' => 'px',
|
||||
'ctaFontSizeMobile' => '',
|
||||
'ctaFontSizeTablet' => '',
|
||||
'ctaFontFamily' => '',
|
||||
'ctaFontWeight' => '',
|
||||
'ctaFontSubset' => '',
|
||||
'ctaLoadGoogleFonts' => false,
|
||||
'ctaBtnLinkColor' => '#333',
|
||||
'ctaBgColor' => 'transparent',
|
||||
'ctaBtnVertPadding' => '10',
|
||||
'ctaBtnHrPadding' => '14',
|
||||
'ctaBorderStyle' => 'solid',
|
||||
'ctaBorderColor' => '#333',
|
||||
'ctaBorderWidth' => '1',
|
||||
'ctaBorderRadius' => '0',
|
||||
'iconLeftMargin' => '5',
|
||||
'iconRightMargin' => '10',
|
||||
'iconTopMargin' => '5',
|
||||
'iconBottomMargin' => '5',
|
||||
'imageSize' => 'thumbnail',
|
||||
'imageWidthType' => false,
|
||||
'imageWidth' => '120',
|
||||
'seperatorSpace' => '15',
|
||||
'ctaLinkHoverColor' => '',
|
||||
'ctaBgHoverColor' => '',
|
||||
'ctaBorderhoverColor' => '',
|
||||
'ctaIconSpace' => '5',
|
||||
),
|
||||
),
|
||||
|
||||
);
|
||||
}
|
||||
return self::$block_attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Block Assets.
|
||||
*
|
||||
* @since 1.13.4
|
||||
*
|
||||
* @return array The Asset List.
|
||||
*/
|
||||
public static function get_block_assets() {
|
||||
|
||||
$minify = BSF_AIOSRS_Pro_Helper::bsf_schema_pro_is_wp_debug_enable() ? 'js/faq.js' : 'min-js/faq.min.js';
|
||||
$faq_js = BSF_AIOSRS_PRO_URI . 'wpsp-blocks/assets/' . $minify;
|
||||
|
||||
if ( null === self::$block_assets ) {
|
||||
self::$block_assets = array(
|
||||
|
||||
'wpsp-faq-js' => array(
|
||||
'src' => $faq_js,
|
||||
'dep' => array(),
|
||||
'skipEditor' => true,
|
||||
),
|
||||
);
|
||||
}
|
||||
return self::$block_assets;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Schema Pro Config.
|
||||
*
|
||||
* @package Schema Pro
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'BSF_SP_Config' ) ) {
|
||||
|
||||
/**
|
||||
* Class BSF_SP_Config.
|
||||
*/
|
||||
class BSF_SP_Config {
|
||||
|
||||
/**
|
||||
* Block Attributes
|
||||
*
|
||||
* @var block_attributes
|
||||
*/
|
||||
public static $block_attributes = null;
|
||||
|
||||
/**
|
||||
* Block Assets
|
||||
*
|
||||
* @var block_attributes
|
||||
*/
|
||||
public static $block_assets = null;
|
||||
|
||||
/**
|
||||
* Get Widget List.
|
||||
*
|
||||
* @since 0.0.1
|
||||
*
|
||||
* @return array The Widget List.
|
||||
*/
|
||||
public static function get_block_attributes() {
|
||||
|
||||
if ( null === self::$block_attributes ) {
|
||||
self::$block_attributes = array(
|
||||
'wpsp/faq' => array(
|
||||
'slug' => '',
|
||||
'title' => __( 'FAQ - Schema Pro', 'wp-schema-pro' ),
|
||||
'description' => __( 'This block helps you add a FAQ section with inbuilt schema support.', 'wp-schema-pro' ),
|
||||
'default' => true,
|
||||
'js_assets' => array( 'wpsp-faq-js' ),
|
||||
'attributes' => array(
|
||||
'block_id' => '',
|
||||
'layout' => 'accordion',
|
||||
'inactiveOtherItems' => true,
|
||||
'expandFirstItem' => false,
|
||||
'enableSchemaSupport' => false,
|
||||
'align' => 'left',
|
||||
'enableSeparator' => false,
|
||||
'rowsGap' => 10,
|
||||
'columnsGap' => 10,
|
||||
'boxBgColor' => '#FFFFFF',
|
||||
'boxPaddingTypeMobile' => 'px',
|
||||
'boxPaddingTypeTablet' => 'px',
|
||||
'boxPaddingTypeDesktop' => 'px',
|
||||
'vBoxPaddingMobile' => 10,
|
||||
'hBoxPaddingMobile' => 10,
|
||||
'vBoxPaddingTablet' => 10,
|
||||
'hBoxPaddingTablet' => 10,
|
||||
'vBoxPaddingDesktop' => 10,
|
||||
'hBoxPaddingDesktop' => 10,
|
||||
'borderStyle' => 'solid',
|
||||
'borderWidth' => 1,
|
||||
'borderRadius' => 2,
|
||||
'borderColor' => '#D2D2D2',
|
||||
'questionTextColor' => '#313131',
|
||||
'questionTextActiveColor' => '#313131',
|
||||
'questionPaddingTypeDesktop' => 'px',
|
||||
'vquestionPaddingMobile' => 10,
|
||||
'vquestionPaddingTablet' => 10,
|
||||
'vquestionPaddingDesktop' => 10,
|
||||
'hquestionPaddingMobile' => 10,
|
||||
'hquestionPaddingTablet' => 10,
|
||||
'hquestionPaddingDesktop' => 10,
|
||||
'answerTextColor' => '#313131',
|
||||
'answerPaddingTypeDesktop' => 'px',
|
||||
'vanswerPaddingMobile' => 10,
|
||||
'vanswerPaddingTablet' => 10,
|
||||
'vanswerPaddingDesktop' => 10,
|
||||
'hanswerPaddingMobile' => 10,
|
||||
'hanswerPaddingTablet' => 10,
|
||||
'hanswerPaddingDesktop' => 10,
|
||||
'iconColor' => '',
|
||||
'iconActiveColor' => '',
|
||||
'gapBtwIconQUestion' => 10,
|
||||
'questionloadGoogleFonts' => false,
|
||||
'answerloadGoogleFonts' => false,
|
||||
'questionFontFamily' => 'Default',
|
||||
'questionFontWeight' => '',
|
||||
'questionFontSubset' => '',
|
||||
'questionFontSize' => '',
|
||||
'questionFontSizeType' => 'px',
|
||||
'questionFontSizeTablet' => '',
|
||||
'questionFontSizeMobile' => '',
|
||||
'questionLineHeight' => '',
|
||||
'questionLineHeightType' => 'em',
|
||||
'questionLineHeightTablet' => '',
|
||||
'questionLineHeightMobile' => '',
|
||||
'answerFontFamily' => 'Default',
|
||||
'answerFontWeight' => '',
|
||||
'answerFontSubset' => '',
|
||||
'answerFontSize' => '',
|
||||
'answerFontSizeType' => 'px',
|
||||
'answerFontSizeTablet' => '',
|
||||
'answerFontSizeMobile' => '',
|
||||
'answerLineHeight' => '',
|
||||
'answerLineHeightType' => 'em',
|
||||
'answerLineHeightTablet' => '',
|
||||
'answerLineHeightMobile' => '',
|
||||
'icon' => 'fas fa-plus',
|
||||
'iconActive' => 'fas fa-minus',
|
||||
'iconAlign' => 'row',
|
||||
'iconSize' => 15,
|
||||
'iconSizeMobile' => 15,
|
||||
'iconSizeTablet' => 15,
|
||||
'iconSizeType' => 'px',
|
||||
'columns' => 2,
|
||||
'tcolumns' => 2,
|
||||
'mcolumns' => 1,
|
||||
'schema' => '',
|
||||
'enableToggle' => true,
|
||||
'questionLeftPaddingTablet' => 10,
|
||||
'questionBottomPaddingTablet' => 10,
|
||||
'questionLeftPaddingDesktop' => 10,
|
||||
'questionBottomPaddingDesktop' => 10,
|
||||
'questionLeftPaddingMobile' => 10,
|
||||
'questionBottomPaddingMobile' => 10,
|
||||
),
|
||||
),
|
||||
'wpsp/faq-child' => array(
|
||||
'slug' => '',
|
||||
'title' => __( 'FAQ - Schema Pro Child', 'wp-schema-pro' ),
|
||||
'description' => __( 'This block helps you add single FAQ.', 'wp-schema-pro' ),
|
||||
'default' => true,
|
||||
'attributes' => array(
|
||||
'block_id' => '',
|
||||
'question' => '',
|
||||
'answer' => '',
|
||||
'icon' => 'fas fa-plus',
|
||||
'iconActive' => 'fas fa-minus',
|
||||
'layout' => 'accordion',
|
||||
),
|
||||
),
|
||||
'wpsp/how-to' => array(
|
||||
'slug' => '',
|
||||
'title' => __( 'How-to - Schema Pro', 'wp-schema-pro' ),
|
||||
'description' => __( 'This block allows you to design attractive How-to pages or articles with automatically adding How-to Schema to your page.', 'wp-schema-pro' ),
|
||||
'default' => true,
|
||||
'attributes' => array(
|
||||
'block_id' => '',
|
||||
'overallAlignment' => 'left',
|
||||
'toolsCount' => 1,
|
||||
'materialCount' => 1,
|
||||
'tools' => '',
|
||||
'materials' => '',
|
||||
'showTotaltime' => false,
|
||||
'showEstcost' => false,
|
||||
'showTools' => false,
|
||||
'showMaterials' => false,
|
||||
'mainimage' => '',
|
||||
'imgSize' => 'thumbnail',
|
||||
'timeSpace' => 5,
|
||||
'costSpace' => 5,
|
||||
'time' => '30',
|
||||
'cost' => '65',
|
||||
'currencyType' => ' USD',
|
||||
'headingAlign' => 'left',
|
||||
'descriptionAlign' => 'left',
|
||||
'headingColor' => '',
|
||||
'showEstcostcolor' => '',
|
||||
'showTotaltimecolor' => '',
|
||||
'subHeadingColor' => '',
|
||||
'headingTag' => 'h3',
|
||||
'headSpace' => 15,
|
||||
'headFontFamily' => 'Default',
|
||||
'headFontWeight' => '',
|
||||
'headFontSubset' => '',
|
||||
'headFontSizeType' => 'px',
|
||||
'headLineHeightType' => 'em',
|
||||
'headFontSize' => '',
|
||||
'headFontSizeTablet' => '',
|
||||
'headFontSizeMobile' => '',
|
||||
'headLineHeight' => '',
|
||||
'headLineHeightTablet' => '',
|
||||
'headLineHeightMobile' => '',
|
||||
'subHeadFontFamily' => 'Default',
|
||||
'subHeadFontWeight' => '',
|
||||
'subHeadFontSubset' => '',
|
||||
'subHeadFontSize' => '',
|
||||
'subHeadFontSizeType' => 'px',
|
||||
'subHeadFontSizeTablet' => '',
|
||||
'subHeadFontSizeMobile' => '',
|
||||
'subHeadLineHeight' => '',
|
||||
'subHeadLineHeightType' => 'em',
|
||||
'subHeadLineHeightTablet' => '',
|
||||
'subHeadLineHeightMobile' => '',
|
||||
'separatorSpace' => 15,
|
||||
'headLoadGoogleFonts' => false,
|
||||
'subHeadLoadGoogleFonts' => false,
|
||||
'priceFontSizeType' => 'px',
|
||||
'priceFontSize' => '',
|
||||
'priceFontSizeTablet' => '',
|
||||
'priceFontSizeMobile' => '',
|
||||
'priceFontFamily' => 'Default',
|
||||
'priceFontWeight' => '',
|
||||
'priceFontSubset' => '',
|
||||
'priceLineHeightType' => 'em',
|
||||
'priceLineHeight' => '',
|
||||
'priceLineHeightTablet' => '',
|
||||
'priceLineHeightMobile' => '',
|
||||
'priceLoadGoogleFonts' => false,
|
||||
'row_gap' => 20,
|
||||
'step_gap' => 20,
|
||||
'schema' => '',
|
||||
),
|
||||
),
|
||||
'wpsp/how-to-child' => array(
|
||||
'slug' => '',
|
||||
'title' => __( 'Steps', 'wp-schema-pro' ),
|
||||
'description' => __( 'This steps box allows you to place an image along with a heading and description within a single block.', 'wp-schema-pro' ),
|
||||
'default' => true,
|
||||
'attributes' => array(
|
||||
'classMigrate' => false,
|
||||
'headingAlign' => 'left',
|
||||
'headingColor' => '',
|
||||
'subHeadingColor' => '',
|
||||
'headFontSize' => '',
|
||||
'headFontSizeType' => 'px',
|
||||
'headFontSizeTablet' => '',
|
||||
'headFontSizeMobile' => '',
|
||||
'headFontFamily' => '',
|
||||
'headFontWeight' => '',
|
||||
'headFontSubset' => '',
|
||||
'headLineHeightType' => 'em',
|
||||
'headLineHeight' => '',
|
||||
'headLineHeightTablet' => '',
|
||||
'headLineHeightMobile' => '',
|
||||
'headLoadGoogleFonts' => false,
|
||||
'subHeadFontSize' => '',
|
||||
'subHeadFontSizeType' => 'px',
|
||||
'subHeadFontSizeTablet' => '',
|
||||
'subHeadFontSizeMobile' => '',
|
||||
'subHeadFontFamily' => '',
|
||||
'subHeadFontWeight' => '',
|
||||
'subHeadFontSubset' => '',
|
||||
'subHeadLineHeightType' => 'em',
|
||||
'subHeadLineHeight' => '',
|
||||
'subHeadLineHeightTablet' => '',
|
||||
'subHeadLineHeightMobile' => '',
|
||||
'subHeadLoadGoogleFonts' => false,
|
||||
'separatorWidth' => '',
|
||||
'separatorHeight' => '',
|
||||
'separatorWidthType' => '%',
|
||||
'headSpace' => '10',
|
||||
'separatorSpace' => '10',
|
||||
'subHeadSpace' => '10',
|
||||
'iconColor' => '#333',
|
||||
'iconSize' => '40',
|
||||
'iconimgPosition' => 'above-title',
|
||||
'block_id' => '',
|
||||
'iconHover' => '',
|
||||
'iconimgBorderRadius' => '0',
|
||||
'seperatorStyle' => 'solid',
|
||||
'seperatorWidth' => '30',
|
||||
'seperatorColor' => '#333',
|
||||
'seperatorThickness' => '2',
|
||||
'ctaLinkColor' => '#333',
|
||||
'ctaFontSize' => '',
|
||||
'ctaFontSizeType' => 'px',
|
||||
'ctaFontSizeMobile' => '',
|
||||
'ctaFontSizeTablet' => '',
|
||||
'ctaFontFamily' => '',
|
||||
'ctaFontWeight' => '',
|
||||
'ctaFontSubset' => '',
|
||||
'ctaLoadGoogleFonts' => false,
|
||||
'ctaBtnLinkColor' => '#333',
|
||||
'ctaBgColor' => 'transparent',
|
||||
'ctaBtnVertPadding' => '10',
|
||||
'ctaBtnHrPadding' => '14',
|
||||
'ctaBorderStyle' => 'solid',
|
||||
'ctaBorderColor' => '#333',
|
||||
'ctaBorderWidth' => '1',
|
||||
'ctaBorderRadius' => '0',
|
||||
'iconLeftMargin' => '5',
|
||||
'iconRightMargin' => '10',
|
||||
'iconTopMargin' => '5',
|
||||
'iconBottomMargin' => '5',
|
||||
'imageSize' => 'thumbnail',
|
||||
'imageWidthType' => false,
|
||||
'imageWidth' => '120',
|
||||
'seperatorSpace' => '15',
|
||||
'ctaLinkHoverColor' => '',
|
||||
'ctaBgHoverColor' => '',
|
||||
'ctaBorderhoverColor' => '',
|
||||
'ctaIconSpace' => '5',
|
||||
),
|
||||
),
|
||||
|
||||
);
|
||||
}
|
||||
return self::$block_attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Block Assets.
|
||||
*
|
||||
* @since 1.13.4
|
||||
*
|
||||
* @return array The Asset List.
|
||||
*/
|
||||
public static function get_block_assets() {
|
||||
|
||||
$minify = BSF_AIOSRS_Pro_Helper::bsf_schema_pro_is_wp_debug_enable() ? 'js/faq.js' : 'min-js/faq.min.js';
|
||||
$faq_js = BSF_AIOSRS_PRO_URI . 'wpsp-blocks/assets/' . $minify;
|
||||
|
||||
if ( null === self::$block_assets ) {
|
||||
self::$block_assets = array(
|
||||
|
||||
'wpsp-faq-js' => array(
|
||||
'src' => $faq_js,
|
||||
'dep' => array(),
|
||||
'skipEditor' => true,
|
||||
),
|
||||
);
|
||||
}
|
||||
return self::$block_assets;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,79 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* Schema Pro Blocks Loader.
|
||||
*
|
||||
* @package Schema Pro
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'BSF_SP_Loader' ) ) {
|
||||
|
||||
/**
|
||||
* Class BSF_Schema_Pro_Loader.
|
||||
*/
|
||||
final class BSF_SP_Loader {
|
||||
|
||||
/**
|
||||
* Member Variable
|
||||
*
|
||||
* @var instance
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
/**
|
||||
* Initiator
|
||||
*/
|
||||
public static function get_instance() {
|
||||
if ( ! isset( self::$instance ) ) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
$this->wpsp_define_constants();
|
||||
|
||||
$this->wpsp_load_plugin();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines all constants
|
||||
*
|
||||
* @since 2.2.0
|
||||
*/
|
||||
public function wpsp_define_constants() {
|
||||
define( 'SP_SLUG', 'wpsp' );
|
||||
define( 'WPSP_TABLET_BREAKPOINT', '976' );
|
||||
define( 'WPSP_MOBILE_BREAKPOINT', '767' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads plugin files.
|
||||
*
|
||||
* @since 2.2.0
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function wpsp_load_plugin() {
|
||||
|
||||
require_once BSF_AIOSRS_PRO_DIR . 'wpsp-blocks/classes/class-bsf-sp-init-blocks.php';
|
||||
require_once BSF_AIOSRS_PRO_DIR . 'wpsp-blocks/classes/class-bsf-sp-helper.php';
|
||||
require_once BSF_AIOSRS_PRO_DIR . 'wpsp-blocks/classes/class-bsf-sp-admin-helper.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare if class 'BSF_SP_Loader' exist.
|
||||
* Kicking this off by calling 'get_instance()' method
|
||||
*/
|
||||
|
||||
}
|
||||
BSF_SP_Loader::get_instance();
|
||||
}
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Schema Pro Blocks Loader.
|
||||
*
|
||||
* @package Schema Pro
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'BSF_SP_Loader' ) ) {
|
||||
|
||||
/**
|
||||
* Class BSF_Schema_Pro_Loader.
|
||||
*/
|
||||
final class BSF_SP_Loader {
|
||||
|
||||
/**
|
||||
* Member Variable
|
||||
*
|
||||
* @var instance
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
/**
|
||||
* Initiator
|
||||
*/
|
||||
public static function get_instance() {
|
||||
if ( ! isset( self::$instance ) ) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
$this->wpsp_define_constants();
|
||||
|
||||
$this->wpsp_load_plugin();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines all constants
|
||||
*
|
||||
* @since 2.2.0
|
||||
*/
|
||||
public function wpsp_define_constants() {
|
||||
define( 'SP_SLUG', 'wpsp' );
|
||||
define( 'WPSP_TABLET_BREAKPOINT', '976' );
|
||||
define( 'WPSP_MOBILE_BREAKPOINT', '767' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads plugin files.
|
||||
*
|
||||
* @since 2.2.0
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function wpsp_load_plugin() {
|
||||
|
||||
require_once BSF_AIOSRS_PRO_DIR . 'wpsp-blocks/classes/class-bsf-sp-init-blocks.php';
|
||||
require_once BSF_AIOSRS_PRO_DIR . 'wpsp-blocks/classes/class-bsf-sp-helper.php';
|
||||
require_once BSF_AIOSRS_PRO_DIR . 'wpsp-blocks/classes/class-bsf-sp-admin-helper.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare if class 'BSF_SP_Loader' exist.
|
||||
* Kicking this off by calling 'get_instance()' method
|
||||
*/
|
||||
|
||||
}
|
||||
BSF_SP_Loader::get_instance();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user