本文整理汇总了PHP中et_is_builder_plugin_active函数的典型用法代码示例。如果您正苦于以下问题:PHP et_is_builder_plugin_active函数的具体用法?PHP et_is_builder_plugin_active怎么用?PHP et_is_builder_plugin_active使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了et_is_builder_plugin_active函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: extra_set_modules_default_values
/**
* Setup default values for Extra specific modules. Default values are also define
* the unit used in advanced design settings
* @return array
*/
function extra_set_modules_default_values($defaults)
{
$extra_defaults = array('et_pb_posts-header_font_size' => '16px', 'et_pb_posts-header_font_style' => 'uppercase', 'et_pb_posts-header_text_color' => '', 'et_pb_posts-header_line_height' => '1', 'et_pb_posts-header_letter_spacing' => '1.2px', 'et_pb_posts-subheader_font_size' => '14px', 'et_pb_posts-subheader_font_style' => '', 'et_pb_posts-subheader_text_color' => '', 'et_pb_posts-subheader_line_height' => '1em', 'et_pb_posts-subheader_letter_spacing' => '0px', 'et_pb_posts-main_title_font_size' => '16px', 'et_pb_posts-main_title_font_style' => '', 'et_pb_posts-main_title_text_color' => 'rgba(0,0,0,0.75)', 'et_pb_posts-main_title_line_height' => '1.3em', 'et_pb_posts-main_title_letter_spacing' => '0.5px', 'et_pb_posts-main_meta_font_size' => '12px', 'et_pb_posts-main_meta_font_style' => '', 'et_pb_posts-main_meta_text_color' => 'rgba(0, 0, 0, 0.5)', 'et_pb_posts-main_meta_line_height' => '1.7em', 'et_pb_posts-main_meta_letter_spacing' => '0px', 'et_pb_posts-main_body_font_size' => '14px', 'et_pb_posts-main_body_font_style' => '', 'et_pb_posts-main_body_text_color' => 'rgba(0, 0, 0, 0.6)', 'et_pb_posts-main_body_line_height' => '1.8em', 'et_pb_posts-main_body_letter_spacing' => '0px', 'et_pb_posts-list_title_font_size' => '14px', 'et_pb_posts-list_title_font_style' => '', 'et_pb_posts-list_title_text_color' => 'rgba(0,0,0,0.75)', 'et_pb_posts-list_title_line_height' => '1.3em', 'et_pb_posts-list_title_letter_spacing' => '0px', 'et_pb_posts-list_meta_font_size' => '12px', 'et_pb_posts-list_meta_font_style' => '', 'et_pb_posts-list_meta_text_color' => 'rgba(0, 0, 0, 0.5)', 'et_pb_posts-list_meta_line_height' => '1.7em', 'et_pb_posts-list_meta_letter_spacing' => '0px', 'et_pb_posts-remove_drop_shadow' => 'off', 'et_pb_posts-border_radius' => '3px', 'et_pb_tabbed_posts-active_tab_background_color' => '#ffffff', 'et_pb_tabbed_posts-inactive_tab_background_color' => '#f6f9fd', 'et_pb_tabbed_posts-tab_font_size' => '16px', 'et_pb_tabbed_posts-tab_font_style' => '', 'et_pb_tabbed_posts-tab_text_color' => '', 'et_pb_tabbed_posts-tab_line_height' => '1em', 'et_pb_tabbed_posts-tab_letter_spacing' => '1.2px', 'et_pb_tabbed_posts-main_title_font_size' => '16px', 'et_pb_tabbed_posts-main_title_font_style' => '', 'et_pb_tabbed_posts-main_title_text_color' => 'rgba(0,0,0,0.75)', 'et_pb_tabbed_posts-main_title_line_height' => '1.3em', 'et_pb_tabbed_posts-main_title_letter_spacing' => '0.5px', 'et_pb_tabbed_posts-main_meta_font_size' => '12px', 'et_pb_tabbed_posts-main_meta_font_style' => '', 'et_pb_tabbed_posts-main_meta_text_color' => 'rgba(0, 0, 0, 0.5)', 'et_pb_tabbed_posts-main_meta_line_height' => '1.7em', 'et_pb_tabbed_posts-main_meta_letter_spacing' => '0px', 'et_pb_tabbed_posts-main_body_font_size' => '14px', 'et_pb_tabbed_posts-main_body_font_style' => '', 'et_pb_tabbed_posts-main_body_text_color' => 'rgba(0, 0, 0, 0.6)', 'et_pb_tabbed_posts-main_body_line_height' => '1.8em', 'et_pb_tabbed_posts-main_body_letter_spacing' => '0px', 'et_pb_tabbed_posts-list_title_font_size' => '14px', 'et_pb_tabbed_posts-list_title_font_style' => '', 'et_pb_tabbed_posts-list_title_text_color' => 'rgba(0,0,0,0.75)', 'et_pb_tabbed_posts-list_title_line_height' => '1.3em', 'et_pb_tabbed_posts-list_title_letter_spacing' => '0px', 'et_pb_tabbed_posts-list_meta_font_size' => '12px', 'et_pb_tabbed_posts-list_meta_font_style' => '', 'et_pb_tabbed_posts-list_meta_text_color' => 'rgba(0, 0, 0, 0.5)', 'et_pb_tabbed_posts-list_meta_line_height' => '1.7em', 'et_pb_tabbed_posts-list_meta_letter_spacing' => '0px', 'et_pb_tabbed_posts-remove_drop_shadow' => 'off', 'et_pb_tabbed_posts-border_radius' => '3px', 'et_pb_posts_carousel-hover_overlay_color' => 'rgba(0, 0, 0, 0.3)', 'et_pb_posts_carousel-hover_overlay_icon_color' => '#FFFFFF', 'et_pb_posts_carousel-hover_overlay_icon' => '\\e050', 'et_pb_posts_carousel-header_font_size' => '16px', 'et_pb_posts_carousel-header_font_style' => 'uppercase', 'et_pb_posts_carousel-header_text_color' => '', 'et_pb_posts_carousel-header_line_height' => '1', 'et_pb_posts_carousel-header_letter_spacing' => '1.2px', 'et_pb_posts_carousel-subheader_font_size' => '14px', 'et_pb_posts_carousel-subheader_font_style' => '', 'et_pb_posts_carousel-subheader_text_color' => '', 'et_pb_posts_carousel-subheader_line_height' => '1em', 'et_pb_posts_carousel-subheader_letter_spacing' => '0px', 'et_pb_posts_carousel-title_font_size' => '14px', 'et_pb_posts_carousel-title_font_style' => '', 'et_pb_posts_carousel-title_text_color' => 'rgba(0,0,0,0.75)', 'et_pb_posts_carousel-title_line_height' => '1.3em', 'et_pb_posts_carousel-title_letter_spacing' => '0.5px', 'et_pb_posts_carousel-meta_font_size' => '12px', 'et_pb_posts_carousel-meta_font_style' => '', 'et_pb_posts_carousel-meta_text_color' => 'rgba(0, 0, 0, 0.5)', 'et_pb_posts_carousel-meta_line_height' => '1.9em', 'et_pb_posts_carousel-meta_letter_spacing' => '0px', 'et_pb_posts_carousel-remove_drop_shadow' => 'off', 'et_pb_posts_carousel-border_radius' => '3px', 'et_pb_featured_posts_slider-title_font_size' => '20px', 'et_pb_featured_posts_slider-title_font_style' => '', 'et_pb_featured_posts_slider-title_text_color' => '#ffffff', 'et_pb_featured_posts_slider-title_line_height' => '1.3em', 'et_pb_featured_posts_slider-title_letter_spacing' => '0.5px', 'et_pb_featured_posts_slider-meta_font_size' => '12px', 'et_pb_featured_posts_slider-meta_font_style' => '', 'et_pb_featured_posts_slider-meta_text_color' => 'rgba(255, 255, 255, 0.6)', 'et_pb_featured_posts_slider-meta_line_height' => '1.7em', 'et_pb_featured_posts_slider-meta_letter_spacing' => '0px', 'et_pb_featured_posts_slider-slide_caption_background' => 'rgba(0, 0, 0, 0.6)', 'et_pb_featured_posts_slider-remove_drop_shadow' => 'off', 'et_pb_featured_posts_slider-border_radius' => '3px', 'et_pb_posts_blog_feed_standard-header_font_size' => '16px', 'et_pb_posts_blog_feed_standard-header_font_style' => 'uppercase', 'et_pb_posts_blog_feed_standard-header_text_color' => '', 'et_pb_posts_blog_feed_standard-header_line_height' => '1', 'et_pb_posts_blog_feed_standard-header_letter_spacing' => '1.2px', 'et_pb_posts_blog_feed_standard-title_font_size' => '18px', 'et_pb_posts_blog_feed_standard-title_font_style' => '', 'et_pb_posts_blog_feed_standard-title_text_color' => '', 'et_pb_posts_blog_feed_standard-title_letter_spacing' => '0.5px', 'et_pb_posts_blog_feed_standard-title_line_height' => '1.3em', 'et_pb_posts_blog_feed_standard-meta_font_size' => '12px', 'et_pb_posts_blog_feed_standard-meta_font_style' => '', 'et_pb_posts_blog_feed_standard-meta_text_color' => 'rgba(0, 0, 0, 0.5)', 'et_pb_posts_blog_feed_standard-meta_letter_spacing' => '0px', 'et_pb_posts_blog_feed_standard-meta_line_height' => '1.7em', 'et_pb_posts_blog_feed_standard-body_font_size' => '14px', 'et_pb_posts_blog_feed_standard-body_font_style' => '', 'et_pb_posts_blog_feed_standard-body_text_color' => 'rgba(0, 0, 0, 0.6)', 'et_pb_posts_blog_feed_standard-body_letter_spacing' => '0px', 'et_pb_posts_blog_feed_standard-body_line_height' => '1.7em', 'et_pb_posts_blog_feed_standard-read_more_text_size' => '14px', 'et_pb_posts_blog_feed_standard-read_more_font' => '', 'et_pb_posts_blog_feed_standard-read_more_text_color' => 'rgba(0, 0, 0, 0.6)', 'et_pb_posts_blog_feed_standard-read_more_letter_spacing' => '0px', 'et_pb_posts_blog_feed_standard-read_more_bg_color' => 'rgba(0, 0, 0, 0.1)', 'et_pb_posts_blog_feed_standard-read_more_border_radius' => '3px', 'et_pb_posts_blog_feed_standard-remove_drop_shadow' => 'off', 'et_pb_posts_blog_feed_standard-border_radius' => '3px', 'et_pb_posts_blog_feed_standard-hover_overlay_color' => 'rgba(0, 0, 0, 0.3)', 'et_pb_posts_blog_feed_standard-hover_overlay_icon_color' => '#FFFFFF', 'et_pb_posts_blog_feed_standard-hover_overlay_icon' => '\\e050', 'et_pb_posts_blog_feed_masonry-title_font_size' => '16px', 'et_pb_posts_blog_feed_masonry-title_font_style' => '', 'et_pb_posts_blog_feed_masonry-title_text_color' => 'rgba(0,0,0,0.75)', 'et_pb_posts_blog_feed_masonry-title_letter_spacing' => '0.5px', 'et_pb_posts_blog_feed_masonry-title_line_height' => '1.3em', 'et_pb_posts_blog_feed_masonry-meta_font_size' => '12px', 'et_pb_posts_blog_feed_masonry-meta_font_style' => '', 'et_pb_posts_blog_feed_masonry-meta_text_color' => 'rgba(0, 0, 0, 0.5)', 'et_pb_posts_blog_feed_masonry-meta_letter_spacing' => '0px', 'et_pb_posts_blog_feed_masonry-meta_line_height' => '1.7em', 'et_pb_posts_blog_feed_masonry-body_font_size' => '14px', 'et_pb_posts_blog_feed_masonry-body_font_style' => '', 'et_pb_posts_blog_feed_masonry-body_text_color' => '', 'et_pb_posts_blog_feed_masonry-body_letter_spacing' => '0px', 'et_pb_posts_blog_feed_masonry-body_line_height' => '1.7em', 'et_pb_posts_blog_feed_masonry-read_more_text_size' => '14px', 'et_pb_posts_blog_feed_masonry-read_more_font' => '', 'et_pb_posts_blog_feed_masonry-read_more_text_color' => 'rgba(0, 0, 0, 0.6)', 'et_pb_posts_blog_feed_masonry-read_more_letter_spacing' => '0px', 'et_pb_posts_blog_feed_masonry-read_more_bg_color' => 'rgba(0, 0, 0, 0.1)', 'et_pb_posts_blog_feed_masonry-read_more_border_radius' => '3px', 'et_pb_posts_blog_feed_masonry-remove_drop_shadow' => 'off', 'et_pb_posts_blog_feed_masonry-border_radius' => '3px', 'et_pb_posts_blog_feed_masonry-hover_overlay_color' => 'rgba(0, 0, 0, 0.3)', 'et_pb_posts_blog_feed_masonry-hover_overlay_icon_color' => '#FFFFFF', 'et_pb_posts_blog_feed_masonry-hover_overlay_icon' => '\\e050', 'et_pb_ads-background_color' => '#FFFFFF', 'et_pb_ads-remove_drop_shadow' => 'off', 'et_pb_ads-border_radius' => '3px', 'et_pb_ads-header_font_size' => '16px', 'et_pb_ads-header_font_style' => 'uppercase', 'et_pb_ads-header_text_color' => '', 'et_pb_ads-header_line_height' => '1', 'et_pb_ads-header_letter_spacing' => '1.2px');
foreach ($extra_defaults as $setting_name => $default_value) {
$extra_defaults[$setting_name] = array('default' => $default_value);
$actual_value = !et_is_builder_plugin_active() ? et_get_option($setting_name, '', '', true) : '';
if ('' !== $actual_value) {
$extra_defaults[$setting_name]['actual'] = $actual_value;
}
}
return array_merge($defaults, $extra_defaults);
}
开发者ID:rthburke,项目名称:fltHub,代码行数:17,代码来源:modules-defaults.php
示例2: et_builder_load_modules_styles
function et_builder_load_modules_styles()
{
$current_page_id = apply_filters('et_is_ab_testing_active_post_id', get_the_ID());
wp_register_script('google-maps-api', esc_url(add_query_arg(array('v' => 3, 'sensor' => 'false'), is_ssl() ? 'https://maps-api-ssl.google.com/maps/api/js' : 'http://maps.google.com/maps/api/js')), array(), ET_BUILDER_VERSION, true);
wp_enqueue_script('divi-fitvids', ET_BUILDER_URI . '/scripts/jquery.fitvids.js', array('jquery'), ET_BUILDER_VERSION, true);
wp_enqueue_script('waypoints', ET_BUILDER_URI . '/scripts/waypoints.min.js', array('jquery'), ET_BUILDER_VERSION, true);
wp_enqueue_script('magnific-popup', ET_BUILDER_URI . '/scripts/jquery.magnific-popup.js', array('jquery'), ET_BUILDER_VERSION, true);
wp_register_script('hashchange', ET_BUILDER_URI . '/scripts/jquery.hashchange.js', array('jquery'), ET_BUILDER_VERSION, true);
wp_register_script('salvattore', ET_BUILDER_URI . '/scripts/salvattore.min.js', array(), ET_BUILDER_VERSION, true);
wp_register_script('easypiechart', ET_BUILDER_URI . '/scripts/jquery.easypiechart.js', array('jquery'), ET_BUILDER_VERSION, true);
if (et_is_builder_plugin_active()) {
wp_register_script('fittext', ET_BUILDER_URI . '/scripts/jquery.fittext.js', array('jquery'), ET_BUILDER_VERSION, true);
}
// Load main styles CSS file only if the Builder plugin is active
if (et_is_builder_plugin_active()) {
wp_enqueue_style('et-builder-modules-style', ET_BUILDER_URI . '/styles/frontend-builder-plugin-style.css', array(), ET_BUILDER_VERSION);
}
// Load visible.min.js only if AB testing active on current page
if (et_is_ab_testing_active()) {
wp_enqueue_script('et-jquery-visible-viewport', ET_BUILDER_URI . '/scripts/ext/jquery.visible.min.js', array('jquery', 'et-builder-modules-script'), ET_BUILDER_VERSION, true);
}
wp_enqueue_style('magnific-popup', ET_BUILDER_URI . '/styles/magnific_popup.css', array(), ET_BUILDER_VERSION);
wp_enqueue_script('et-jquery-touch-mobile', ET_BUILDER_URI . '/scripts/jquery.mobile.custom.min.js', array('jquery'), ET_BUILDER_VERSION, true);
wp_enqueue_script('et-builder-modules-script', ET_BUILDER_URI . '/scripts/frontend-builder-scripts.js', array('jquery', 'et-jquery-touch-mobile'), ET_BUILDER_VERSION, true);
wp_localize_script('et-builder-modules-script', 'et_pb_custom', array('ajaxurl' => admin_url('admin-ajax.php'), 'images_uri' => get_template_directory_uri() . '/images', 'builder_images_uri' => ET_BUILDER_URI . '/images', 'et_frontend_nonce' => wp_create_nonce('et_frontend_nonce'), 'subscription_failed' => esc_html__('Please, check the fields below to make sure you entered the correct information.', 'et_builder'), 'et_ab_log_nonce' => wp_create_nonce('et_ab_testing_log_nonce'), 'fill_message' => esc_html__('Please, fill in the following fields:', 'et_builder'), 'contact_error_message' => esc_html__('Please, fix the following errors:', 'et_builder'), 'invalid' => esc_html__('Invalid email', 'et_builder'), 'captcha' => esc_html__('Captcha', 'et_builder'), 'prev' => esc_html__('Prev', 'et_builder'), 'previous' => esc_html__('Previous', 'et_builder'), 'next' => esc_html__('Next', 'et_builder'), 'wrong_captcha' => esc_html__('You entered the wrong number in captcha.', 'et_builder'), 'is_builder_plugin_used' => et_is_builder_plugin_active(), 'is_divi_theme_used' => function_exists('et_divi_fonts_url'), 'widget_search_selector' => apply_filters('et_pb_widget_search_selector', '.widget_search'), 'is_ab_testing_active' => et_is_ab_testing_active(), 'page_id' => $current_page_id, 'unique_test_id' => get_post_meta($current_page_id, '_et_pb_ab_testing_id', true), 'ab_bounce_rate' => '' !== get_post_meta($current_page_id, '_et_pb_ab_bounce_rate_limit', true) ? get_post_meta($current_page_id, '_et_pb_ab_bounce_rate_limit', true) : 5, 'is_cache_plugin_active' => false === et_pb_detect_cache_plugins() ? 'no' : 'yes', 'is_shortcode_tracking' => get_post_meta($current_page_id, '_et_pb_enable_shortcode_tracking', true)));
/**
* Only load this during builder preview screen session
*/
if (is_et_pb_preview()) {
// Set fixed protocol for preview URL to prevent cross origin issue
$preview_scheme = is_ssl() ? 'https' : 'http';
// Get home url, then parse it
$preview_origin_component = parse_url(home_url('', $preview_scheme));
// Rebuild origin URL, strip sub-directory address if there's any (postMessage e.origin doesn't pass sub-directory address)
$preview_origin = "";
// Perform check, prevent unnecessary error
if (isset($preview_origin_component['scheme']) && isset($preview_origin_component['host'])) {
$preview_origin = "{$preview_origin_component['scheme']}://{$preview_origin_component['host']}";
// Append port number if different port number is being used
if (isset($preview_origin_component['port'])) {
$preview_origin = "{$preview_origin}:{$preview_origin_component['port']}";
}
}
// Enqueue theme's style.css if it hasn't been enqueued (possibly being hardcoded by theme)
if (!et_builder_has_theme_style_enqueued() && et_is_builder_plugin_active()) {
wp_enqueue_style('et-builder-theme-style-css', get_stylesheet_uri(), array());
}
wp_enqueue_style('et-builder-preview-style', ET_BUILDER_URI . '/styles/preview.css', array(), ET_BUILDER_VERSION);
wp_enqueue_script('et-builder-preview-script', ET_BUILDER_URI . '/scripts/frontend-builder-preview.js', array('jquery'), ET_BUILDER_VERSION, true);
wp_localize_script('et-builder-preview-script', 'et_preview_params', array('preview_origin' => esc_url($preview_origin), 'alert_origin_not_matched' => sprintf(esc_html__('Unauthorized access. Preview cannot be accessed outside %1$s.', 'et_builder'), esc_url(home_url('', $preview_scheme)))));
}
}
开发者ID:michaeldyrynda,项目名称:SaxonHyde,代码行数:52,代码来源:framework.php
示例3: set_values
private static function set_values()
{
$font_defaults = array('size' => '14', 'color' => '#666666', 'letter_spacing' => '0px', 'line_height' => '1.7em');
$defaults = array('et_pb_image-animation' => 'left', 'et_pb_gallery-hover_overlay_color' => 'rgba(255,255,255,0.9)', 'et_pb_gallery-title_font_size' => '16', 'et_pb_gallery-title_color' => '#333333', 'et_pb_gallery-title_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_gallery-title_line_height' => '1em', 'et_pb_gallery-title_font_style' => '', 'et_pb_gallery-caption_font_size' => '14', 'et_pb_gallery-caption_font_style' => '', 'et_pb_gallery-caption_color' => '#f3f3f3', 'et_pb_gallery-caption_line_height' => '18px', 'et_pb_gallery-caption_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_tabs-tab_font_size' => $font_defaults['size'], 'et_pb_tabs-tab_line_height' => $font_defaults['line_height'], 'et_pb_tabs-tab_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_tabs-body_font_size' => $font_defaults['size'], 'et_pb_tabs-body_line_height' => $font_defaults['line_height'], 'et_pb_tabs-body_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_tabs-title_font_style' => '', 'et_pb_tabs-padding' => '30', 'et_pb_slider-header_font_size' => '46', 'et_pb_slider-header_line_height' => '1em', 'et_pb_slider-header_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_slider-header_font_style' => '', 'et_pb_slider-body_font_size' => '16', 'et_pb_slider-body_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_slider-body_line_height' => $font_defaults['line_height'], 'et_pb_slider-body_font_style' => '', 'et_pb_slider-padding' => '16', 'et_pb_slider-header_color' => '#ffffff', 'et_pb_slider-header_line_height' => '1em', 'et_pb_slider-body_color' => '#ffffff', 'et_pb_testimonial-portrait_border_radius' => '90', 'et_pb_testimonial-portrait_width' => '90', 'et_pb_testimonial-portrait_height' => '90', 'et_pb_testimonial-author_name_font_style' => 'bold', 'et_pb_testimonial-author_details_font_style' => 'bold', 'et_pb_testimonial-border_color' => '#ffffff', 'et_pb_testimonial-border_width' => '1px', 'et_pb_testimonial-body_font_size' => $font_defaults['size'], 'et_pb_testimonial-body_line_height' => '1.5em', 'et_pb_testimonial-body_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_pricing_tables-header_font_size' => '22', 'et_pb_pricing_tables-header_font_style' => '', 'et_pb_pricing_tables-subheader_font_size' => '16', 'et_pb_pricing_tables-subheader_font_style' => '', 'et_pb_pricing_tables-price_font_size' => '80', 'et_pb_pricing_tables-price_font_style' => '', 'et_pb_pricing_tables-header_color' => '#ffffff', 'et_pb_pricing_tables-header_line_height' => '1em', 'et_pb_pricing_tables-subheader_color' => '#ffffff', 'et_pb_pricing_tables-currency_frequency_font_size' => '16px', 'et_pb_pricing_tables-currency_frequency_letter_spacing' => '0px', 'et_pb_pricing_tables-currency_frequency_line_height' => '1.7em', 'et_pb_pricing_tables-price_letter_spacing' => '0px', 'et_pb_pricing_tables-price_color' => '#2EA3F2', 'et_pb_pricing_tables-price_line_height' => '82px', 'et_pb_pricing_tables-body_line_height' => '24px', 'et_pb_fullwidth_post_title-title_font_size' => '26px', 'et_pb_fullwidth_post_title-title_line_height' => '1em', 'et_pb_fullwidth_post_title-title_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_fullwidth_post_title-meta_font_size' => $font_defaults['size'], 'et_pb_fullwidth_post_title-meta_line_height' => '1em', 'et_pb_fullwidth_post_title-meta_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_fullwidth_post_title-module_bg_color' => 'rgba(255,255,255,0)', 'et_pb_fullwidth_header-scroll_down_icon_size' => '50px', 'et_pb_fullwidth_header-subhead_font_size' => '18px', 'et_pb_fullwidth_header-button_one_font_size' => '20px', 'et_pb_fullwidth_header-button_one_border_radius' => '3px', 'et_pb_fullwidth_header-button_two_font_size' => '20px', 'et_pb_fullwidth_header-button_two_border_radius' => '3px', 'et_pb_post_title-title_font_size' => '26px', 'et_pb_post_title-title_line_height' => '1em', 'et_pb_post_title-title_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_post_title-meta_font_size' => $font_defaults['size'], 'et_pb_post_title-meta_line_height' => '1em', 'et_pb_post_title-meta_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_post_title-module_bg_color' => 'rgba(255,255,255,0)', 'et_pb_cta-header_font_size' => '26', 'et_pb_cta-header_font_style' => '', 'et_pb_cta-custom_padding' => '40', 'et_pb_cta-header_text_color' => '#333333', 'et_pb_cta-header_line_height' => '1em', 'et_pb_cta-header_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_cta-body_font_size' => $font_defaults['size'], 'et_pb_cta-body_line_height' => $font_defaults['line_height'], 'et_pb_cta-body_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_blurb-header_font_size' => '18', 'et_pb_blurb-header_color' => '#333333', 'et_pb_blurb-header_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_blurb-header_line_height' => '1em', 'et_pb_blurb-body_font_size' => $font_defaults['size'], 'et_pb_blurb-body_color' => '#666666', 'et_pb_blurb-body_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_blurb-body_line_height' => $font_defaults['line_height'], 'et_pb_text-text_font_size' => $font_defaults['size'], 'et_pb_text-text_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_text-text_line_height' => $font_defaults['line_height'], 'et_pb_text-border_color' => '#ffffff', 'et_pb_text-border_width' => '1px', 'et_pb_slide-header_font_size' => '26px', 'et_pb_slide-header_color' => '#ffffff', 'et_pb_slide-header_line_height' => '1em', 'et_pb_slide-body_font_size' => '16px', 'et_pb_slide-body_color' => '#ffffff', 'et_pb_pricing_table-header_font_size' => '22px', 'et_pb_pricing_table-header_color' => '#ffffff', 'et_pb_pricing_table-header_line_height' => '1em', 'et_pb_pricing_table-subheader_font_size' => '16px', 'et_pb_pricing_table-subheader_color' => '#ffffff', 'et_pb_pricing_table-price_font_size' => '80px', 'et_pb_pricing_table-price_color' => '#2EA3F2', 'et_pb_pricing_table-price_line_height' => '82px', 'et_pb_pricing_table-body_line_height' => '24px', 'et_pb_audio-title_font_size' => '26', 'et_pb_audio-title_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_audio-title_line_height' => $font_defaults['line_height'], 'et_pb_audio-title_font_style' => '', 'et_pb_audio-caption_font_size' => $font_defaults['size'], 'et_pb_audio-caption_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_audio-caption_line_height' => $font_defaults['line_height'], 'et_pb_audio-caption_font_style' => '', 'et_pb_audio-title_text_color' => '#666666', 'et_pb_signup-header_font_size' => '26', 'et_pb_signup-header_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_signup-header_line_height' => $font_defaults['line_height'], 'et_pb_signup-body_font_size' => $font_defaults['size'], 'et_pb_signup-body_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_signup-body_line_height' => $font_defaults['line_height'], 'et_pb_signup-header_font_style' => '', 'et_pb_signup-padding' => '20', 'et_pb_signup-focus_border_color' => '#ffffff', 'et_pb_login-header_font_size' => '26', 'et_pb_login-header_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_login-header_line_height' => $font_defaults['line_height'], 'et_pb_login-body_font_size' => $font_defaults['size'], 'et_pb_login-body_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_login-body_line_height' => $font_defaults['line_height'], 'et_pb_login-header_font_style' => '', 'et_pb_login-custom_padding' => '40', 'et_pb_login-focus_border_color' => '#ffffff', 'et_pb_portfolio-hover_overlay_color' => 'rgba(255,255,255,0.9)', 'et_pb_portfolio-title_font_size' => '18', 'et_pb_portfolio-title_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_portfolio-title_line_height' => $font_defaults['line_height'], 'et_pb_portfolio-title_font_style' => '', 'et_pb_portfolio-caption_font_size' => '14', 'et_pb_portfolio-caption_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_portfolio-caption_line_height' => $font_defaults['line_height'], 'et_pb_portfolio-caption_font_style' => '', 'et_pb_portfolio-title_color' => '#333333', 'et_pb_filterable_portfolio-hover_overlay_color' => 'rgba(255,255,255,0.9)', 'et_pb_filterable_portfolio-title_font_size' => '18', 'et_pb_filterable_portfolio-title_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_filterable_portfolio-title_line_height' => $font_defaults['line_height'], 'et_pb_filterable_portfolio-title_font_style' => '', 'et_pb_filterable_portfolio-caption_font_size' => '14', 'et_pb_filterable_portfolio-caption_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_filterable_portfolio-caption_line_height' => $font_defaults['line_height'], 'et_pb_filterable_portfolio-caption_font_style' => '', 'et_pb_filterable_portfolio-filter_font_size' => '14', 'et_pb_filterable_portfolio-filter_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_filterable_portfolio-filter_line_height' => $font_defaults['line_height'], 'et_pb_filterable_portfolio-filter_font_style' => '', 'et_pb_filterable_portfolio-title_color' => '#333333', 'et_pb_counters-title_font_size' => '12', 'et_pb_counters-title_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_counters-title_line_height' => $font_defaults['line_height'], 'et_pb_counters-title_font_style' => '', 'et_pb_counters-percent_font_size' => '12', 'et_pb_counters-percent_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_counters-percent_line_height' => $font_defaults['line_height'], 'et_pb_counters-percent_font_style' => '', 'et_pb_counters-border_radius' => '0', 'et_pb_counters-padding' => '0', 'et_pb_counters-title_color' => '#999999', 'et_pb_counters-percent_color' => '#ffffff', 'et_pb_circle_counter-title_font_size' => '16', 'et_pb_circle_counter-title_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_circle_counter-title_line_height' => '1em', 'et_pb_circle_counter-title_font_style' => '', 'et_pb_circle_counter-number_font_size' => '46', 'et_pb_circle_counter-number_font_style' => '', 'et_pb_circle_counter-title_color' => '#333333', 'et_pb_circle_counter-number_line_height' => '225px', 'et_pb_circle_counter-number_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_number_counter-title_font_size' => '16', 'et_pb_number_counter-title_line_height' => '1em', 'et_pb_number_counter-title_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_number_counter-title_font_style' => '', 'et_pb_number_counter-number_font_size' => '72', 'et_pb_number_counter-number_line_height' => '72px', 'et_pb_number_counter-number_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_number_counter-number_font_style' => '', 'et_pb_number_counter-title_color' => '#333333', 'et_pb_accordion-toggle_font_size' => '16', 'et_pb_accordion-toggle_font_style' => '', 'et_pb_accordion-inactive_toggle_font_style' => '', 'et_pb_accordion-toggle_icon_size' => '16', 'et_pb_accordion-custom_padding' => '20', 'et_pb_accordion-toggle_line_height' => '1em', 'et_pb_accordion-toggle_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_accordion-body_font_size' => $font_defaults['size'], 'et_pb_accordion-body_line_height' => $font_defaults['line_height'], 'et_pb_accordion-body_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_toggle-title_font_size' => '16', 'et_pb_toggle-title_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_toggle-title_font_style' => '', 'et_pb_toggle-inactive_title_font_style' => '', 'et_pb_toggle-toggle_icon_size' => '16', 'et_pb_toggle-title_color' => '#333333', 'et_pb_toggle-title_line_height' => '1em', 'et_pb_toggle-custom_padding' => '20', 'et_pb_toggle-body_font_size' => $font_defaults['size'], 'et_pb_toggle-body_line_height' => $font_defaults['line_height'], 'et_pb_toggle-body_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_contact_form-title_font_size' => '26', 'et_pb_contact_form-title_font_style' => '', 'et_pb_contact_form-form_field_font_size' => '14', 'et_pb_contact_form-form_field_font_style' => '', 'et_pb_contact_form-captcha_font_size' => '14', 'et_pb_contact_form-captcha_font_style' => '', 'et_pb_contact_form-padding' => '16', 'et_pb_contact_form-title_color' => '#333333', 'et_pb_contact_form-title_line_height' => '1em', 'et_pb_contact_form-title_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_contact_form-form_field_color' => '#999999', 'et_pb_contact_form-form_field_line_height' => $font_defaults['line_height'], 'et_pb_contact_form-form_field_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_sidebar-header_font_size' => '18', 'et_pb_sidebar-header_font_style' => '', 'et_pb_sidebar-header_color' => '#333333', 'et_pb_sidebar-header_line_height' => '1em', 'et_pb_sidebar-header_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_sidebar-remove_border' => 'off', 'et_pb_sidebar-body_font_size' => $font_defaults['size'], 'et_pb_sidebar-body_line_height' => $font_defaults['line_height'], 'et_pb_sidebar-body_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_divider-show_divider' => 'off', 'et_pb_divider-divider_style' => 'none', 'et_pb_divider-divider_weight' => '1', 'et_pb_divider-height' => '1', 'et_pb_divider-divider_position' => 'none', 'et_pb_team_member-header_font_size' => '18', 'et_pb_team_member-header_font_style' => '', 'et_pb_team_member-subheader_font_size' => '14', 'et_pb_team_member-subheader_font_style' => '', 'et_pb_team_member-social_network_icon_size' => '16', 'et_pb_team_member-header_color' => '#333333', 'et_pb_team_member-header_line_height' => '1em', 'et_pb_team_member-header_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_team_member-body_font_size' => $font_defaults['size'], 'et_pb_team_member-body_line_height' => $font_defaults['line_height'], 'et_pb_team_member-body_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_shop-title_font_size' => '16', 'et_pb_shop-title_font_style' => '', 'et_pb_shop-sale_badge_font_size' => '16', 'et_pb_shop-sale_badge_font_style' => '', 'et_pb_shop-price_font_size' => '14', 'et_pb_shop-price_font_style' => '', 'et_pb_shop-sale_price_font_size' => '14', 'et_pb_shop-sale_price_font_style' => '', 'et_pb_shop-title_color' => '#333333', 'et_pb_shop-title_line_height' => '1em', 'et_pb_shop-title_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_shop-price_line_height' => '26px', 'et_pb_shop-price_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_countdown_timer-header_font_size' => '22', 'et_pb_countdown_timer-header_font_style' => '', 'et_pb_countdown_timer-header_color' => '#333333', 'et_pb_countdown_timer-header_line_height' => '1em', 'et_pb_countdown_timer-header_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_countdown_timer-numbers_font_size' => '64px', 'et_pb_countdown_timer-numbers_line_height' => '64px', 'et_pb_countdown_timer-numbers_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_countdown_timer-label_line_height' => '25px', 'et_pb_countdown_timer-label_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_countdown_timer-label_font_size' => $font_defaults['size'], 'et_pb_social_media_follow-icon_size' => '14', 'et_pb_social_media_follow-button_font_style' => '', 'et_pb_fullwidth_slider-header_font_size' => '46', 'et_pb_fullwidth_slider-header_font_style' => '', 'et_pb_fullwidth_slider-body_font_size' => '16', 'et_pb_fullwidth_slider-body_font_style' => '', 'et_pb_fullwidth_slider-body_line_height' => $font_defaults['line_height'], 'et_pb_fullwidth_slider-body_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_fullwidth_slider-padding' => '16', 'et_pb_fullwidth_slider-header_color' => '#ffffff', 'et_pb_fullwidth_slider-header_line_height' => '1em', 'et_pb_fullwidth_slider-header_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_fullwidth_slider-body_color' => '#ffffff', 'et_pb_blog-header_font_size' => '18', 'et_pb_blog-header_font_style' => '', 'et_pb_blog-meta_font_size' => '14', 'et_pb_blog-meta_font_style' => '', 'et_pb_blog-meta_line_height' => $font_defaults['line_height'], 'et_pb_blog-meta_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_blog-header_color' => '#333333', 'et_pb_blog-header_line_height' => '1em', 'et_pb_blog-header_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_blog-body_font_size' => $font_defaults['size'], 'et_pb_blog-body_line_height' => $font_defaults['line_height'], 'et_pb_blog-body_letter_spacing' => $font_defaults['letter_spacing'], 'et_pb_blog_masonry-header_font_size' => '26', 'et_pb_blog_masonry-header_font_style' => '', 'et_pb_blog_masonry-meta_font_size' => '14', 'et_pb_blog_masonry-meta_font_style' => '', 'all_buttons_font_size' => '20', 'all_buttons_border_width' => '2', 'all_buttons_border_radius' => '3', 'all_buttons_spacing' => '0', 'all_buttons_font_style' => '', 'all_buttons_border_radius_hover' => '3', 'all_buttons_spacing_hover' => '0');
if (!et_is_builder_plugin_active()) {
$defaults['et_pb_gallery-zoom_icon_color'] = et_get_option('accent_color', '#2EA3F2');
$defaults['et_pb_portfolio-zoom_icon_color'] = et_get_option('accent_color', '#2EA3F2');
$defaults['et_pb_filterable_portfolio-zoom_icon_color'] = et_get_option('accent_color', '#2EA3F2');
}
// reformat defaults array and add actual values to it
foreach ($defaults as $setting_name => $default_value) {
$defaults[$setting_name] = array('default' => $default_value);
$actual_value = !et_is_builder_plugin_active() ? et_get_option($setting_name, '', '', true) : '';
if ('' !== $actual_value) {
$defaults[$setting_name]['actual'] = $actual_value;
}
}
self::$_settings = apply_filters('et_set_default_values', $defaults);
}
开发者ID:iinspiration,项目名称:theme,代码行数:19,代码来源:class-et-global-settings.php
示例4: et_builder_load_modules_styles
function et_builder_load_modules_styles()
{
wp_register_script('google-maps-api', esc_url(add_query_arg(array('v' => 3, 'sensor' => 'false'), is_ssl() ? 'https://maps-api-ssl.google.com/maps/api/js' : 'http://maps.google.com/maps/api/js')), array(), ET_BUILDER_VERSION, true);
wp_enqueue_script('divi-fitvids', ET_BUILDER_URI . '/scripts/jquery.fitvids.js', array('jquery'), ET_BUILDER_VERSION, true);
wp_enqueue_script('waypoints', ET_BUILDER_URI . '/scripts/waypoints.min.js', array('jquery'), ET_BUILDER_VERSION, true);
wp_enqueue_script('magnific-popup', ET_BUILDER_URI . '/scripts/jquery.magnific-popup.js', array('jquery'), ET_BUILDER_VERSION, true);
wp_register_script('hashchange', ET_BUILDER_URI . '/scripts/jquery.hashchange.js', array('jquery'), ET_BUILDER_VERSION, true);
wp_register_script('salvattore', ET_BUILDER_URI . '/scripts/salvattore.min.js', array(), ET_BUILDER_VERSION, true);
wp_register_script('easypiechart', ET_BUILDER_URI . '/scripts/jquery.easypiechart.js', array('jquery'), ET_BUILDER_VERSION, true);
// Load main styles CSS file only if the Builder plugin is active
if (et_is_builder_plugin_active()) {
wp_enqueue_style('et-builder-modules-style', ET_BUILDER_URI . '/styles/frontend-builder-plugin-style.css', array(), ET_BUILDER_VERSION);
}
wp_enqueue_script('et-builder-modules-script', ET_BUILDER_URI . '/scripts/frontend-builder-scripts.js', array('jquery'), ET_BUILDER_VERSION, true);
wp_localize_script('et-builder-modules-script', 'et_custom', array('ajaxurl' => admin_url('admin-ajax.php'), 'images_uri' => get_template_directory_uri() . '/images', 'builder_images_uri' => get_template_directory_uri() . '/includes/builder/images', 'et_load_nonce' => wp_create_nonce('et_load_nonce'), 'subscription_failed' => __('Please, check the fields below to make sure you entered the correct information.', 'Divi'), 'fill' => esc_html__('Fill', 'Divi'), 'field' => esc_html__('field', 'Divi'), 'invalid' => esc_html__('Invalid email', 'Divi'), 'captcha' => esc_html__('Captcha', 'Divi'), 'prev' => esc_html__('Prev', 'Divi'), 'previous' => esc_html__('Previous', 'Divi'), 'next' => esc_html__('Next', 'Divi'), 'is_builder_plugin_used' => et_is_builder_plugin_active()));
/**
* Only load this during builder preview screen session
*/
if (is_et_pb_preview()) {
// Set fixed protocol for preview URL to prevent cross origin issue
$preview_scheme = is_ssl() ? 'https' : 'http';
// Get home url, then parse it
$preview_origin_component = parse_url(home_url('', $preview_scheme));
// Rebuild origin URL, strip sub-directory address if there's any (postMessage e.origin doesn't pass sub-directory address)
$preview_origin = "";
// Perform check, prevent unnecessary error
if (isset($preview_origin_component['scheme']) && isset($preview_origin_component['host'])) {
$preview_origin = "{$preview_origin_component['scheme']}://{$preview_origin_component['host']}";
// Append port number if different port number is being used
if (isset($preview_origin_component['port'])) {
$preview_origin = "{$preview_origin}:{$preview_origin_component['port']}";
}
}
wp_enqueue_style('et-builder-preview-style', ET_BUILDER_URI . '/styles/preview.css', array(), ET_BUILDER_VERSION);
wp_enqueue_script('et-builder-preview-script', ET_BUILDER_URI . '/scripts/frontend-builder-preview.js', array('jquery'), ET_BUILDER_VERSION, true);
wp_localize_script('et-builder-preview-script', 'et_preview_params', array('preview_origin' => esc_url($preview_origin), 'alert_origin_not_matched' => sprintf(esc_html__('Unauthorized access. Preview cannot be accessed outside %1$s.', 'Divi'), esc_url(home_url('', $preview_scheme)))));
}
}
开发者ID:acchs,项目名称:test,代码行数:38,代码来源:framework.php
示例5: shortcode_callback
//.........这里部分代码省略.........
$custom_css_main_2 = $this->shortcode_atts['custom_css_main_2'];
$custom_css_main_3 = $this->shortcode_atts['custom_css_main_3'];
$custom_css_after_1 = $this->shortcode_atts['custom_css_after_1'];
$custom_css_after_2 = $this->shortcode_atts['custom_css_after_2'];
$custom_css_after_3 = $this->shortcode_atts['custom_css_after_3'];
if ('' !== $global_module) {
$global_content = et_pb_load_global_module($global_module);
if ('' !== $global_content) {
return do_shortcode($global_content);
}
}
$module_class = ET_Builder_Element::add_module_order_class($module_class, $function_name);
$gutter_class = '';
$padding_mobile_values = array('tablet' => explode('|', $custom_padding_tablet), 'phone' => explode('|', $custom_padding_phone));
if ('on' === $specialty) {
global $et_pb_column_backgrounds, $et_pb_column_paddings, $et_pb_columns_counter, $et_pb_column_css, $et_pb_column_paddings_mobile;
$module_class .= 'on' === $make_equal ? ' et_pb_equal_columns' : '';
if ('on' === $use_custom_gutter && '' !== $gutter_width) {
$gutter_width = '0' === $gutter_width ? '1' : $gutter_width;
// set the gutter to 1 if 0 entered by user
$gutter_class .= ' et_pb_gutters' . $gutter_width;
}
$et_pb_columns_counter = 0;
$et_pb_column_backgrounds = array(array($background_color_1, $bg_img_1), array($background_color_2, $bg_img_2), array($background_color_3, $bg_img_3));
$et_pb_column_paddings = array(array('padding-top' => $padding_top_1, 'padding-right' => $padding_right_1, 'padding-bottom' => $padding_bottom_1, 'padding-left' => $padding_left_1), array('padding-top' => $padding_top_2, 'padding-right' => $padding_right_2, 'padding-bottom' => $padding_bottom_2, 'padding-left' => $padding_left_2), array('padding-top' => $padding_top_3, 'padding-right' => $padding_right_3, 'padding-bottom' => $padding_bottom_3, 'padding-left' => $padding_left_3));
$et_pb_column_paddings_mobile = array(array('tablet' => explode('|', $padding_1_tablet), 'phone' => explode('|', $padding_1_phone)), array('tablet' => explode('|', $padding_2_tablet), 'phone' => explode('|', $padding_2_phone)), array('tablet' => explode('|', $padding_3_tablet), 'phone' => explode('|', $padding_3_phone)));
if ('on' === $make_fullwidth && 'off' === $use_custom_width) {
$module_class .= ' et_pb_specialty_fullwidth';
}
if ('on' === $use_custom_width) {
ET_Builder_Element::set_style($function_name, array('selector' => '%%order_class%% > .et_pb_row', 'declaration' => sprintf('max-width:%1$s !important;', 'on' === $width_unit ? esc_attr($custom_width_px) : esc_attr($custom_width_percent))));
}
$et_pb_column_css = array('css_class' => array($module_class_1, $module_class_2, $module_class_3), 'css_id' => array($module_id_1, $module_id_2, $module_id_3), 'custom_css_before' => array($custom_css_before_1, $custom_css_before_2, $custom_css_before_3), 'custom_css_main' => array($custom_css_main_1, $custom_css_main_2, $custom_css_main_3), 'custom_css_after' => array($custom_css_after_1, $custom_css_after_2, $custom_css_after_3));
}
$background_video = '';
if ('' !== $background_video_mp4 || '' !== $background_video_webm) {
$background_video = sprintf('<div class="et_pb_section_video_bg%2$s">
%1$s
</div>', do_shortcode(sprintf('
<video loop="loop" %3$s%4$s>
%1$s
%2$s
</video>', '' !== $background_video_mp4 ? sprintf('<source type="video/mp4" src="%s" />', esc_attr($background_video_mp4)) : '', '' !== $background_video_webm ? sprintf('<source type="video/webm" src="%s" />', esc_attr($background_video_webm)) : '', '' !== $background_video_width ? sprintf(' width="%s"', esc_attr(intval($background_video_width))) : '', '' !== $background_video_height ? sprintf(' height="%s"', esc_attr(intval($background_video_height))) : '')), 'on' === $allow_player_pause ? ' et_pb_allow_player_pause' : '');
wp_enqueue_style('wp-mediaelement');
wp_enqueue_script('wp-mediaelement');
}
// set the correct default value for $transparent_background option if plugin activated.
if (et_is_builder_plugin_active() && 'default' === $transparent_background) {
$transparent_background = '' !== $background_color ? 'off' : 'on';
} elseif ('default' === $transparent_background) {
$transparent_background = 'off';
}
if ('' !== $background_color && 'off' === $transparent_background) {
ET_Builder_Element::set_style($function_name, array('selector' => '%%order_class%%.et_pb_section', 'declaration' => sprintf('background-color:%s !important;', esc_attr($background_color))));
}
if ('' !== $background_image && 'on' !== $parallax) {
ET_Builder_Element::set_style($function_name, array('selector' => '%%order_class%%', 'declaration' => sprintf('background-image:url(%s);', esc_attr($background_image))));
}
$padding_values = explode('|', $custom_padding);
if (!empty($padding_values)) {
// old version of sections supports only top and bottom padding, so we need to handle it along with the full padding in the recent version
if (2 === count($padding_values)) {
$padding_settings = array('top' => isset($padding_values[0]) ? $padding_values[0] : '', 'bottom' => isset($padding_values[1]) ? $padding_values[1] : '');
} else {
$padding_settings = array('top' => isset($padding_values[0]) ? $padding_values[0] : '', 'right' => isset($padding_values[1]) ? $padding_values[1] : '', 'bottom' => isset($padding_values[2]) ? $padding_values[2] : '', 'left' => isset($padding_values[3]) ? $padding_values[3] : '');
}
foreach ($padding_settings as $padding_side => $value) {
if ('' !== $value) {
$element_style = array('selector' => '%%order_class%%.et_pb_section', 'declaration' => sprintf('padding-%1$s: %2$s;', esc_html($padding_side), esc_html($value)));
if ('on' !== $padding_mobile) {
$element_style['media_query'] = ET_Builder_Element::get_media_query('min_width_981');
}
ET_Builder_Element::set_style($function_name, $element_style);
}
}
}
if (!empty($padding_mobile_values['tablet']) || !empty($padding_values['phone'])) {
$padding_mobile_values_processed = array();
foreach (array('tablet', 'phone') as $device) {
if (empty($padding_mobile_values[$device])) {
continue;
}
$padding_mobile_values_processed[$device] = array('padding-top' => isset($padding_mobile_values[$device][0]) ? $padding_mobile_values[$device][0] : '', 'padding-right' => isset($padding_mobile_values[$device][1]) ? $padding_mobile_values[$device][1] : '', 'padding-bottom' => isset($padding_mobile_values[$device][2]) ? $padding_mobile_values[$device][2] : '', 'padding-left' => isset($padding_mobile_values[$device][3]) ? $padding_mobile_values[$device][3] : '');
}
if (!empty($padding_mobile_values_processed)) {
et_pb_generate_responsive_css($padding_mobile_values_processed, '%%order_class%%.et_pb_section', '', $function_name);
}
}
if ('' !== $background_video_mp4 || '' !== $background_video_webm || '' !== $background_color && 'off' === $transparent_background || '' !== $background_image) {
$module_class .= ' et_pb_with_background';
}
$output = sprintf('<div%7$s class="et_pb_section%3$s%4$s%5$s%6$s%8$s%12$s%13$s">
%11$s
%9$s
%2$s
%1$s
%10$s
</div> <!-- .et_pb_section -->', do_shortcode(et_pb_fix_shortcodes($content)), $background_video, '' !== $background_video ? ' et_pb_section_video et_pb_preload' : '', 'off' !== $inner_shadow && !('' !== $background_image && 'on' === $parallax && 'off' === $parallax_method) ? ' et_pb_inner_shadow' : '', 'on' === $parallax ? ' et_pb_section_parallax' : '', 'off' !== $fullwidth ? ' et_pb_fullwidth_section' : '', '' !== $module_id ? sprintf(' id="%1$s"', esc_attr($module_id)) : '', '' !== $module_class ? sprintf(' %1$s', esc_attr($module_class)) : '', 'on' === $specialty ? sprintf('<div class="et_pb_row%1$s">', $gutter_class) : '', 'on' === $specialty ? '</div> <!-- .et_pb_row -->' : '', '' !== $background_image && 'on' === $parallax ? sprintf('<div class="et_parallax_bg%2$s%3$s" style="background-image: url(%1$s);"></div>', esc_attr($background_image), 'off' === $parallax_method ? ' et_pb_parallax_css' : '', 'off' !== $inner_shadow && 'off' === $parallax_method ? ' et_pb_inner_shadow' : '') : '', 'on' === $specialty ? ' et_section_specialty' : ' et_section_regular', 'on' === $transparent_background ? ' et_section_transparent' : '');
return $output;
}
开发者ID:pacificano,项目名称:pacificano,代码行数:101,代码来源:main-structure-elements.php
示例6: esc_attr
<div class="<?php
echo esc_attr(apply_filters('et_pb_preview_wrap_class', 'entry-content post-content entry content'));
?>
">
<?php
if (isset($_POST['shortcode'])) {
if (!isset($_POST['et_pb_preview_nonce']) || !wp_verify_nonce($_POST['et_pb_preview_nonce'], 'et_pb_preview_nonce')) {
// Auth nonce
printf('<p class="et-pb-preview-message">%1$s</p>', esc_html__('Authentication failed. You cannot preview this item.', 'et_builder'));
} elseif (!current_user_can('edit_posts')) {
// Auth user
printf('<p class="et-pb-preview-message">%1$s</p>', esc_html__('Authentication failed. You have no permission to preview this item.', 'et_builder'));
} else {
// process content for builder plugin
if (et_is_builder_plugin_active()) {
$content = do_shortcode(wp_unslash($_POST['shortcode']));
$content = str_replace(']]>', ']]>', $content);
$outer_class = apply_filters('et_builder_outer_content_class', array('et_builder_outer_content'));
$outer_classes = implode(' ', $outer_class);
$outer_id = apply_filters("et_builder_outer_content_id", "et_builder_outer_content");
$inner_class = apply_filters('et_builder_inner_content_class', array('et_builder_inner_content'));
$inner_classes = implode(' ', $inner_class);
$content = sprintf('<div class="%2$s" id="%4$s">
<div class="%3$s">
%1$s
</div>
</div>', $content, esc_attr($outer_classes), esc_attr($inner_classes), esc_attr($outer_id));
} else {
$content = apply_filters('the_content', wp_unslash($_POST['shortcode']));
$content = str_replace(']]>', ']]>', $content);
开发者ID:Rehabescapi,项目名称:GVSU-Senior-Project-Hola,代码行数:31,代码来源:template-preview.php
示例7: shortcode_callback
function shortcode_callback($atts, $content = null, $function_name)
{
$module_id = $this->shortcode_atts['module_id'];
$module_class = $this->shortcode_atts['module_class'];
$background_color = $this->shortcode_atts['background_color'];
$background_layout = $this->shortcode_atts['background_layout'];
$text_orientation = $this->shortcode_atts['text_orientation'];
$menu_id = $this->shortcode_atts['menu_id'];
$submenu_direction = $this->shortcode_atts['submenu_direction'];
$fullwidth_menu = $this->shortcode_atts['fullwidth_menu'] === 'on' ? ' et_pb_fullwidth_menu_fullwidth' : '';
$active_link_color = $this->shortcode_atts['active_link_color'];
$dropdown_menu_bg_color = $this->shortcode_atts['dropdown_menu_bg_color'];
$dropdown_menu_line_color = $this->shortcode_atts['dropdown_menu_line_color'];
$dropdown_menu_text_color = $this->shortcode_atts['dropdown_menu_text_color'];
$dropdown_menu_animation = $this->shortcode_atts['dropdown_menu_animation'];
$mobile_menu_bg_color = $this->shortcode_atts['mobile_menu_bg_color'];
$mobile_menu_text_color = $this->shortcode_atts['mobile_menu_text_color'];
if (is_rtl() && 'left' === $text_orientation) {
$text_orientation = 'right';
}
$style = '';
if ('' !== $background_color) {
$style .= sprintf(' style="background-color: %s;"', esc_attr($background_color));
}
$module_class = ET_Builder_Element::add_module_order_class($module_class, $function_name);
$class = " et_pb_module et_pb_bg_layout_{$background_layout} et_pb_text_align_{$text_orientation} et_dropdown_animation_{$dropdown_menu_animation}{$fullwidth_menu}";
$menu = '<nav class="fullwidth-menu-nav">';
$menuClass = 'fullwidth-menu nav';
if (!et_is_builder_plugin_active() && 'on' == et_get_option('divi_disable_toptier')) {
$menuClass .= ' et_disable_top_tier';
}
$menuClass .= '' !== $submenu_direction ? sprintf(' %s', esc_attr($submenu_direction)) : '';
$primaryNav = '';
$menu_args = array('theme_location' => 'primary-menu', 'container' => '', 'fallback_cb' => '', 'm
|
请发表评论