当前位置: 首页>>代码示例>>PHP>>正文


PHP et_pb_is_pagebuilder_used函数代码示例

本文整理汇总了PHP中et_pb_is_pagebuilder_used函数的典型用法代码示例。如果您正苦于以下问题:PHP et_pb_is_pagebuilder_used函数的具体用法?PHP et_pb_is_pagebuilder_used怎么用?PHP et_pb_is_pagebuilder_used使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了et_pb_is_pagebuilder_used函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: has_theme_compat

 /**
  * Check whether current page should load theme compatibility file or not
  * @return bool
  */
 function has_theme_compat()
 {
     $post_id = get_the_ID();
     // in dashboard and preview, always load theme-compat file
     $is_using_pagebuilder = is_admin() || is_et_pb_preview() ? true : isset($post_id) && et_pb_is_pagebuilder_used($post_id);
     // Check whether: 1) current page uses Divi builder or 2) current theme has compatibility file
     if ($is_using_pagebuilder && in_array($this->get_theme_name(), $this->theme_list())) {
         return true;
     }
     return false;
 }
开发者ID:thirteen05-creative,项目名称:icy-install,代码行数:15,代码来源:theme-compat.php

示例2: shortcode_callback


//.........这里部分代码省略.........
                }
                ?>
				<div class="et_pb_container clearfix">
					<?php 
                if ('off' !== $show_image && has_post_thumbnail() && !in_array($image_placement, array('background', 'bottom'))) {
                    ?>
						<div class="et_pb_slide_image">
							<?php 
                    the_post_thumbnail();
                    ?>
						</div>
					<?php 
                }
                ?>
					<div class="et_pb_slide_description">
						<h2 class="et_pb_slide_title"><a href="<?php 
                esc_url(the_permalink());
                ?>
"><?php 
                the_title();
                ?>
</a></h2>
						<div class="et_pb_slide_content <?php 
                if ('on' === $hide_content_on_mobile) {
                    echo esc_attr($hide_on_mobile_class);
                }
                ?>
">
							<?php 
                if ('off' !== $show_meta) {
                    printf('<p class="post-meta">%1$s | %2$s | %3$s | %4$s</p>', et_get_safe_localization(sprintf(__('by %s', 'et_builder'), '<span class="author vcard">' . et_pb_get_the_author_posts_link() . '</span>')), et_get_safe_localization(sprintf(__('%s', 'et_builder'), '<span class="published">' . esc_html(get_the_date()) . '</span>')), get_the_category_list(', '), sprintf(esc_html(_nx('1 Comment', '%s Comments', get_comments_number(), 'number of comments', 'et_builder')), number_format_i18n(get_comments_number())));
                }
                ?>
							<?php 
                $post_content = get_the_content();
                // do not display the content if it contains Blog, Post Slider, Fullwidth Post Slider, or Portfolio modules to avoid infinite loops
                if (!has_shortcode($post_content, 'et_pb_blog') && !has_shortcode($post_content, 'et_pb_portfolio') && !has_shortcode($post_content, 'et_pb_post_slider') && !has_shortcode($post_content, 'et_pb_fullwidth_post_slider')) {
                    if ('on' === $content_source) {
                        global $more;
                        $post_content = et_strip_shortcodes($post_content);
                        // page builder doesn't support more tag, so display the_content() in case of post made with page builder
                        if (et_pb_is_pagebuilder_used(get_the_ID())) {
                            $more = 1;
                            echo apply_filters('the_content', $post_content);
                        } else {
                            $more = null;
                            echo apply_filters('the_content', et_strip_shortcodes(get_the_content(esc_html__('read more...', 'et_builder'))));
                        }
                    } else {
                        if (has_excerpt() && 'off' !== $use_manual_excerpt) {
                            the_excerpt();
                        } else {
                            truncate_post(intval($excerpt_length), true, '', true);
                        }
                    }
                } else {
                    if (has_excerpt()) {
                        the_excerpt();
                    }
                }
                ?>
						</div>
						<?php 
                if ('off' !== $show_more_button && '' !== $more_text) {
                    printf('<a href="%1$s" class="et_pb_more_button et_pb_button%4$s%5$s"%3$s>%2$s</a>', esc_url(get_permalink()), esc_html($more_text), '' !== $custom_icon && 'on' === $button_custom ? sprintf(' data-icon="%1$s"', esc_attr(et_pb_process_font_icon($custom_icon))) : '', '' !== $custom_icon && 'on' === $button_custom ? ' et_pb_custom_button_icon' : '', 'on' === $hide_cta_on_mobile ? esc_attr(" {$hide_on_mobile_class}") : '');
                }
                ?>
					</div> <!-- .et_pb_slide_description -->
					<?php 
                if ('off' !== $show_image && has_post_thumbnail() && 'bottom' === $image_placement) {
                    ?>
						<div class="et_pb_slide_image">
							<?php 
                    the_post_thumbnail();
                    ?>
						</div>
					<?php 
                }
                ?>
				</div> <!-- .et_pb_container -->
			</div> <!-- .et_pb_slide -->
		<?php 
            }
            // end while
            wp_reset_query();
        }
        // end if
        $content = ob_get_contents();
        ob_end_clean();
        $output = sprintf('<div%3$s class="et_pb_module et_pb_slider et_pb_post_slider%1$s%4$s">
				<div class="et_pb_slides">
					%2$s
				</div> <!-- .et_pb_slides -->
			</div> <!-- .et_pb_slider -->
			', $class, $content, '' !== $module_id ? sprintf(' id="%1$s"', esc_attr($module_id)) : '', '' !== $module_class ? sprintf(' %1$s', esc_attr($module_class)) : '');
        // Restore $wp_filter
        $wp_filter = $wp_filter_cache;
        unset($wp_filter_cache);
        return $output;
    }
开发者ID:pacificano,项目名称:pacificano,代码行数:101,代码来源:main-modules.php

示例3: add_builder_content_wrapper

    function add_builder_content_wrapper($content)
    {
        if (!et_pb_is_pagebuilder_used(get_the_ID()) && !is_et_pb_preview()) {
            return $content;
        }
        // Divi builder layout should only be used in singular template
        if (!is_singular()) {
            // get_the_excerpt() for excerpt retrieval causes infinite loop; thus we're using excerpt from global $post variable
            global $post;
            $read_more = sprintf(' <a href="%1$s" title="%2$s" class="more-link">%3$s</a>', esc_url(get_permalink()), sprintf(esc_attr__('Read more on %1%s', 'et_builder'), esc_html(get_the_title())), esc_html__('read more', 'et_builder'));
            // Use post excerpt if there's any. If there is no excerpt defined,
            // Generate from post content by stripping all shortcode first
            if (!empty($post->post_excerpt)) {
                return wpautop($post->post_excerpt . $read_more);
            } else {
                $shortcodeless_content = preg_replace('/\\[[^\\]]+\\]/', '', $content);
                return wpautop(et_wp_trim_words($shortcodeless_content, 270, $read_more));
            }
        }
        $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));
        return $content;
    }
开发者ID:anthonymiyoro,项目名称:jobs-board,代码行数:31,代码来源:divi-builder.php

示例4: et_fb_app_boot

/**
 * Boots Frond End Builder App,
 *
 * @return Front End Builder wrap if main query, $content otherwise.
 */
function et_fb_app_boot($content)
{
    // Don't boot the app if the builder is not in use
    if (!et_pb_is_pagebuilder_used(get_the_ID())) {
        return $content;
    }
    $class = apply_filters('et_fb_app_preloader_class', 'et-fb-page-preloading');
    if ('' !== $class) {
        $class = sprintf(' class="%1$s"', esc_attr($class));
    }
    // Only return React app wrapper once for the main query.
    if (is_main_query()) {
        return sprintf('<div id="et-fb-app"%1$s></div>', $class);
    }
    // Stop shortcode object processor so that shortcode in the content are treated normaly.
    et_fb_reset_shortcode_object_processing();
    return $content;
}
开发者ID:pacificano,项目名称:pacificano,代码行数:23,代码来源:view.php

示例5: get_header

<?php

get_header();
$is_page_builder_used = et_pb_is_pagebuilder_used(get_the_ID());
?>

<div id="main-content">

<?php 
if (!$is_page_builder_used) {
    ?>

	<div class="container">
		<div id="content-area" class="clearfix">
			<div id="left-area">

<?php 
}
?>

			<?php 
while (have_posts()) {
    the_post();
    ?>

				<article id="post-<?php 
    the_ID();
    ?>
" <?php 
    post_class();
    ?>
开发者ID:iinspiration,项目名称:theme,代码行数:31,代码来源:single-project.php

示例6: et_divi_sidebar_class

function et_divi_sidebar_class($classes)
{
    if ((is_page() || is_singular('project')) && et_pb_is_pagebuilder_used(get_the_ID())) {
        $classes[] = 'et_pb_pagebuilder_layout';
    }
    if (is_single() || is_page() || class_exists('woocommerce') && is_product()) {
        $page_layout = '' !== ($layout = get_post_meta(get_the_ID(), '_et_pb_page_layout', true)) ? $layout : 'et_right_sidebar';
    }
    if (class_exists('woocommerce') && (is_shop() || is_product() || is_product_category() || is_product_tag())) {
        if (is_shop() || is_tax()) {
            $classes[] = et_get_option('divi_shop_page_sidebar', 'et_right_sidebar');
        }
        if (is_product()) {
            $classes[] = $page_layout;
        }
    } else {
        if (is_archive() || is_home() || is_search() || is_404()) {
            $classes[] = 'et_right_sidebar';
        } else {
            if (is_singular('project')) {
                if ('et_full_width_page' === $page_layout) {
                    $page_layout = 'et_right_sidebar et_full_width_portfolio_page';
                }
                $classes[] = $page_layout;
            } else {
                if (is_single() || is_page()) {
                    $classes[] = $page_layout;
                }
            }
        }
    }
    return $classes;
}
开发者ID:ahmedghazi,项目名称:tpls,代码行数:33,代码来源:functions.php

示例7: shortcode_callback


//.........这里部分代码省略.........
							<a href="<?php 
                        the_permalink();
                        ?>
">
								<?php 
                        print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height);
                        ?>
							</a>
					<?php 
                        if ('on' !== $fullwidth) {
                            echo '</div> <!-- .et_pb_image_container -->';
                        }
                    }
                }
                ?>

			<?php 
                if ('off' === $fullwidth || !in_array($post_format, array('link', 'audio', 'quote'))) {
                    ?>
				<?php 
                    if (!in_array($post_format, array('link', 'audio'))) {
                        ?>
					<h2><a href="<?php 
                        the_permalink();
                        ?>
"><?php 
                        the_title();
                        ?>
</a></h2>
				<?php 
                    }
                    ?>

				<?php 
                    if ('on' === $show_author || 'on' === $show_date || 'on' === $show_categories || 'on' === $show_comments) {
                        printf('<p class="post-meta">%1$s %2$s %3$s %4$s %5$s %6$s %7$s</p>', 'on' === $show_author ? sprintf(__('by %s', 'et_builder'), et_pb_get_the_author_posts_link()) : '', 'on' === $show_author && 'on' === $show_date ? ' | ' : '', 'on' === $show_date ? sprintf(__('%s', 'et_builder'), get_the_date($meta_date)) : '', ('on' === $show_author || 'on' === $show_date) && 'on' === $show_categories ? ' | ' : '', 'on' === $show_categories ? get_the_category_list(', ') : '', ('on' === $show_author || 'on' === $show_date || 'on' === $show_categories) && 'on' === $show_comments ? ' | ' : '', 'on' === $show_comments ? sprintf(_nx('1 Comment', '%s Comments', get_comments_number(), '', 'et_builder'), number_format_i18n(get_comments_number())) : '');
                    }
                    $post_content = get_the_content();
                    // do not display the content if it contains Blog or Portfolio modules to avoid infinite loops
                    if (!has_shortcode($post_content, 'et_pb_blog') && !has_shortcode($post_content, 'et_pb_portfolio')) {
                        if ('on' === $show_content) {
                            global $more;
                            // page builder doesn't support more tag, so display the_content() in case of post made with page builder
                            if (et_pb_is_pagebuilder_used(get_the_ID())) {
                                $more = 1;
                                the_content();
                            } else {
                                $more = null;
                                the_content(__('read more...', 'et_builder'));
                            }
                        } else {
                            if (has_excerpt()) {
                                the_excerpt();
                            } else {
                                truncate_post(270);
                            }
                        }
                    } else {
                        if (has_excerpt()) {
                            the_excerpt();
                        }
                    }
                    if ('on' !== $show_content) {
                        $more = 'on' == $show_more ? sprintf(' <a href="%1$s" class="more-link" >%2$s</a>', esc_url(get_permalink()), __('read more', 'et_builder')) : '';
                        echo $more;
                    }
                    ?>
			<?php 
                }
                // 'off' === $fullwidth || ! in_array( $post_format, array( 'link', 'audio', 'quote', 'gallery'
                ?>

			</article> <!-- .et_pb_post -->
	<?php 
            }
            // endwhile
            if ('on' === $show_pagination && !is_search()) {
                echo '</div> <!-- .et_pb_posts -->';
                $container_is_closed = true;
                if (function_exists('wp_pagenavi')) {
                    wp_pagenavi();
                } else {
                    get_template_part('includes/navigation', 'index');
                }
            }
            wp_reset_query();
        } else {
            get_template_part('includes/no-results', 'index');
        }
        $posts = ob_get_contents();
        ob_end_clean();
        $class = " et_pb_module et_pb_bg_layout_{$background_layout}";
        $output = sprintf('<div%5$s class="%1$s%3$s%6$s"%7$s>
				%2$s
			%4$s', 'on' === $fullwidth ? 'et_pb_posts' : 'et_pb_blog_grid clearfix', $posts, esc_attr($class), !$container_is_closed ? '</div> <!-- .et_pb_posts -->' : '', '' !== $module_id ? sprintf(' id="%1$s"', esc_attr($module_id)) : '', '' !== $module_class ? sprintf(' %1$s', esc_attr($module_class)) : '', 'on' !== $fullwidth ? ' data-columns' : '');
        if ('on' !== $fullwidth) {
            $output = sprintf('<div class="et_pb_blog_grid_wrapper">%1$s</div>', $output);
        }
        return $output;
    }
开发者ID:acchs,项目名称:test,代码行数:101,代码来源:main-modules.php

示例8: et_layout_body_class

function et_layout_body_class($classes)
{
    if ('rgba' == substr(et_get_option('primary_nav_bg', '#ffffff'), 0, 4) && false === et_get_option('vertical_nav', false)) {
        $classes[] = 'et_transparent_nav';
    }
    // home-posts class is used by customizer > blog to work. It modifies post title and meta
    // of WP default layout (home, archive, single), but should not modify post title and meta of blog module (page as home)
    if (in_array('home', $classes) && !in_array('page', $classes)) {
        $classes[] = 'home-posts';
    }
    if (true === et_get_option('nav_fullwidth', false)) {
        if (true === et_get_option('vertical_nav', false)) {
            $classes[] = 'et_fullwidth_nav_temp';
        } else {
            $classes[] = 'et_fullwidth_nav';
        }
    }
    if (true === et_get_option('secondary_nav_fullwidth', false)) {
        $classes[] = 'et_fullwidth_secondary_nav';
    }
    if (true === et_get_option('vertical_nav', false)) {
        $classes[] = 'et_vertical_nav';
        if ('right' === et_get_option('vertical_nav_orientation', 'left')) {
            $classes[] = 'et_vertical_right';
        }
    } else {
        if ('on' === et_get_option('divi_fixed_nav', 'on')) {
            $classes[] = 'et_fixed_nav';
        } else {
            if ('on' !== et_get_option('divi_fixed_nav', 'on')) {
                $classes[] = 'et_non_fixed_nav';
            }
        }
    }
    if (true === et_get_option('vertical_nav', false) && 'on' === et_get_option('divi_fixed_nav', 'on')) {
        $classes[] = 'et_vertical_fixed';
    }
    if (true === et_get_option('boxed_layout', false)) {
        $classes[] = 'et_boxed_layout';
    }
    if (true === et_get_option('hide_nav', false) && (!is_singular() || is_singular() && 'no' !== get_post_meta(get_the_ID(), '_et_pb_post_hide_nav', true))) {
        $classes[] = 'et_hide_nav';
    } else {
        $classes[] = 'et_show_nav';
    }
    if (true === et_get_option('hide_primary_logo', false)) {
        $classes[] = 'et_hide_primary_logo';
    }
    if (true === et_get_option('hide_fixed_logo', false)) {
        $classes[] = 'et_hide_fixed_logo';
    }
    if (true === et_get_option('hide_mobile_logo', false)) {
        $classes[] = 'et_hide_mobile_logo';
    }
    if (false !== et_get_option('cover_background', true)) {
        $classes[] = 'et_cover_background';
    }
    $et_secondary_nav_items = et_divi_get_top_nav_items();
    if ($et_secondary_nav_items->top_info_defined && 'slide' !== et_get_option('header_style', 'left') && 'fullscreen' !== et_get_option('header_style', 'left')) {
        $classes[] = 'et_secondary_nav_enabled';
    }
    if ($et_secondary_nav_items->two_info_panels && 'slide' !== et_get_option('header_style', 'left') && 'fullscreen' !== et_get_option('header_style', 'left')) {
        $classes[] = 'et_secondary_nav_two_panels';
    }
    if ($et_secondary_nav_items->secondary_nav && !($et_secondary_nav_items->contact_info_defined || $et_secondary_nav_items->show_header_social_icons) && 'slide' !== et_get_option('header_style', 'left') && 'fullscreen' !== et_get_option('header_style', 'left')) {
        $classes[] = 'et_secondary_nav_only_menu';
    }
    if ('on' === get_post_meta(get_the_ID(), '_et_pb_side_nav', true) && et_pb_is_pagebuilder_used(get_the_ID())) {
        $classes[] = 'et_pb_side_nav_page';
    }
    if (true === et_get_option('et_pb_sidebar-remove_border', false)) {
        $classes[] = 'et_pb_no_sidebar_vertical_divider';
    }
    if (is_singular(array('post', 'page', 'project', 'product')) && 'on' == get_post_meta(get_the_ID(), '_et_pb_post_hide_nav', true)) {
        $classes[] = 'et_hide_nav';
    }
    if (!et_get_option('use_sidebar_width', false)) {
        $classes[] = 'et_pb_gutter';
    }
    if (stristr($_SERVER['HTTP_USER_AGENT'], "mac")) {
        $classes[] = 'osx';
    } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "linux")) {
        $classes[] = 'linux';
    } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "windows")) {
        $classes[] = 'windows';
    }
    $gutter_width = '' !== ($page_custom_gutter = get_post_meta(get_the_ID(), '_et_pb_gutter_width', true)) ? $page_custom_gutter : et_get_option('gutter_width', '3');
    $classes[] = esc_attr("et_pb_gutters{$gutter_width}");
    $primary_dropdown_animation = et_get_option('primary_nav_dropdown_animation', 'fade');
    $classes[] = esc_attr("et_primary_nav_dropdown_animation_{$primary_dropdown_animation}");
    $secondary_dropdown_animation = et_get_option('secondary_nav_dropdown_animation', 'fade');
    $classes[] = esc_attr("et_secondary_nav_dropdown_animation_{$secondary_dropdown_animation}");
    $footer_columns = et_get_option('footer_columns', '4');
    $classes[] = esc_attr("et_pb_footer_columns{$footer_columns}");
    $header_style = et_get_option('header_style', 'left');
    $classes[] = esc_attr("et_header_style_{$header_style}");
    if ('slide' === $header_style || 'fullscreen' === $header_style) {
        $classes[] = esc_attr("et_header_style_left");
        if ('fullscreen' === $header_style && !et_get_option('slide_nav_show_top_bar', true)) {
            // additional class if top bar disabled in Fullscreen menu
//.........这里部分代码省略.........
开发者ID:welearncodes,项目名称:traktern,代码行数:101,代码来源:functions.php

示例9: shortcode_callback


//.........这里部分代码省略.........
                            echo '</div> <!-- .et_pb_image_container -->';
                        }
                    }
                }
                ?>

			<?php 
                if ('off' === $fullwidth || !in_array($post_format, array('link', 'audio', 'quote'))) {
                    ?>
				<?php 
                    if (!in_array($post_format, array('link', 'audio'))) {
                        ?>
					<h2 class="entry-title"><a href="<?php 
                        the_permalink();
                        ?>
"><?php 
                        the_title();
                        ?>
</a></h2>
				<?php 
                    }
                    ?>

				<?php 
                    if ('on' === $show_author || 'on' === $show_date || 'on' === $show_categories || 'on' === $show_comments) {
                        printf('<p class="post-meta"> %2$s %3$s %4$s %5$s %6$s </p>', 'on' === $show_author ? sprintf(__('by %s', 'et_builder'), '<span class="author vcard">' . et_pb_get_the_author_posts_link() . '</span>') : '', 'on' === $show_author && 'on' === $show_date ? '  ' : '  ', 'on' === $show_date ? sprintf(__('%s', 'et_builder'), '<span class="published">' . get_the_date('j F') . '</span>') : '  ', ('on' === $show_author || 'on' === $show_date) && 'on' === $show_categories ? '  ~  ' : '', 'on' === $show_categories ? get_the_category_list(' | ') : '   ', ('on' === $show_author || 'on' === $show_date || 'on' === $show_categories) && 'on' === $show_comments ? '  ' : '  ', 'on' === $show_comments ? sprintf(_nx('1 Comment', '%s Comments', get_comments_number(), 'number of comments', 'et_builder'), number_format_i18n(get_comments_number())) : '  ');
                    }
                    $post_content = get_the_content();
                    // do not display the content if it contains Blog or Portfolio modules to avoid infinite loops
                    if (!has_shortcode($post_content, 'et_pb_blog') && !has_shortcode($post_content, 'et_pb_portfolio')) {
                        if ('on' === $show_content) {
                            global $more;
                            // page builder doesn't support more tag, so display the_content() in case of post made with page builder
                            if (et_pb_is_pagebuilder_used(get_the_ID())) {
                                $more = 1;
                                the_content();
                            } else {
                                $more = null;
                                the_content(__('read more...', 'et_builder'));
                            }
                        } else {
                            if (has_excerpt()) {
                                the_excerpt();
                            } else {
                                truncate_post(70);
                            }
                        }
                    } else {
                        if (has_excerpt()) {
                            the_excerpt();
                        }
                    }
                    // if ( 'on' !== $show_content ) {
                    // 	$more = 'on' == $show_more ? sprintf( ' <a href="%1$s" class="more-link" >%2$s</a>' , esc_url( get_permalink() ), __( 'read more', 'et_builder' ) )  : '';
                    // 	echo $more;
                    // }
                    ?>
			<?php 
                }
                // 'off' === $fullwidth || ! in_array( $post_format, array( 'link', 'audio', 'quote', 'gallery'
                ?>

			</article> <!-- .et_pb_post -->
			
	<?php 
            }
开发者ID:skonina,项目名称:M20_masonry,代码行数:67,代码来源:main-modules.php

示例10: et_gallery_layout

/**
 * Generate the HTML for custom gallery layouts
 */
function et_gallery_layout($val, $attr)
{
    // check to see if the gallery output is already rewritten
    if (!empty($val)) {
        return $val;
    }
    $output = '';
    if (!is_singular() && !et_pb_is_pagebuilder_used(get_the_ID())) {
        $attachments = et_get_gallery_attachments($attr);
        $gallery_output = '';
        foreach ($attachments as $attachment) {
            $attachment_image = wp_get_attachment_url($attachment->ID, 'et-pb-post-main-image-fullwidth');
            $gallery_output .= sprintf('<div class="et_pb_slide" style="background: url(%1$s);"></div>', esc_attr($attachment_image));
        }
        $output = sprintf('<div class="et_pb_slider et_pb_slider_fullwidth_off et_pb_gallery_post_type">
				<div class="et_pb_slides">
					%1$s
				</div>
			</div>', $gallery_output);
    } else {
        if (!isset($attr['type']) || !in_array($attr['type'], array('rectangular', 'square', 'circle', 'rectangle'))) {
            $attachments = et_get_gallery_attachments($attr);
            $gallery_output = '';
            foreach ($attachments as $attachment) {
                $gallery_output .= sprintf('<li class="et_gallery_item">
						<a href="%1$s" title="%3$s">
							<span class="et_portfolio_image">
								%2$s
								<span class="et_overlay"></span>
							</span>
						</a>
						%4$s
					</li>', esc_url(wp_get_attachment_url($attachment->ID, 'full')), wp_get_attachment_image($attachment->ID, 'et-pb-portfolio-image'), esc_attr($attachment->post_title), !empty($attachment->post_excerpt) ? sprintf('<p class="et_pb_gallery_caption">%1$s</p>', esc_html($attachment->post_excerpt)) : '');
            }
            $output = sprintf('<ul class="et_post_gallery clearfix">
					%1$s
				</ul>', $gallery_output);
        }
    }
    return $output;
}
开发者ID:iinspiration,项目名称:theme,代码行数:44,代码来源:functions.php

示例11: et_pb_post_format_in_pagebuilder

/**
 * Return post format into false when using pagebuilder
 *
 * @return mixed string|bool string of post format or false for default
 */
function et_pb_post_format_in_pagebuilder($post_format, $post_id)
{
    if (et_pb_is_pagebuilder_used($post_id)) {
        return false;
    }
    return $post_format;
}
开发者ID:studiochakra,项目名称:foxfirekennel.com,代码行数:12,代码来源:functions.php

示例12: et_fb_is_enabled

 function et_fb_is_enabled($post_id = false)
 {
     if (!$post_id) {
         global $post;
         $post_id = isset($post->ID) ? $post->ID : false;
     }
     if (is_admin()) {
         return false;
     }
     if (is_customize_preview()) {
         return false;
     }
     if (!$post_id) {
         return false;
     }
     if (empty($_GET['et_fb'])) {
         return false;
     }
     if (!current_user_can('edit_posts')) {
         return false;
     }
     if (!et_pb_is_pagebuilder_used($post_id)) {
         return false;
     }
     if (!et_pb_is_allowed('use_visual_builder')) {
         return false;
     }
     return true;
 }
开发者ID:pacificano,项目名称:pacificano,代码行数:29,代码来源:core.php

示例13: generate_css

 public function generate_css()
 {
     do_action('eighteen_tags_before_generate_css');
     $css = "/*-----STOREFRONT PRO-----*/";
     $css .= $this->header_nav_styles->styles();
     $css .= $this->content_styles->styles();
     $css .= $this->footer_styles->styles();
     $css .= '@media only screen and (min-width: 763px) {';
     $css .= self::$desktop_css;
     $css .= '}';
     $css .= '@media only screen and (max-width: 763px) {';
     $css .= self::$mobile_css;
     $css .= '}';
     if (function_exists('et_pb_is_pagebuilder_used') && et_pb_is_pagebuilder_used(get_the_ID())) {
         $css .= '#content > .col-full { max-width: none; margin: 0; }';
         $css .= strip_tags($this->page_builder_styles());
     } else {
         if (function_exists('pootlepb_is_panel') && pootlepb_is_panel()) {
             $css .= strip_tags($this->page_builder_styles());
         }
     }
     return $css;
 }
开发者ID:pootlepress,项目名称:18-tags,代码行数:23,代码来源:class-public.php

示例14: et_fb_add_admin_bar_link

/**
 * Add "Use Visual Builder" link to WP-Admin bar
 *
 * @return void
 */
function et_fb_add_admin_bar_link()
{
    if (!is_singular(et_builder_get_builder_post_types()) || !et_pb_is_allowed('use_visual_builder')) {
        return;
    }
    global $wp_admin_bar, $wp_the_query;
    $page_url = get_permalink(get_the_ID());
    // Don't add the link, if Frontend Builder has been loaded already
    if (et_fb_is_enabled()) {
        $wp_admin_bar->add_menu(array('id' => 'et-disable-visual-builder', 'title' => esc_html__('Exit Visual Builder', 'et_builder'), 'href' => esc_url($page_url)));
        return;
    }
    $current_object = $wp_the_query->get_queried_object();
    if (!current_user_can('edit_post', $current_object->ID)) {
        return;
    }
    $use_visual_builder_url = et_pb_is_pagebuilder_used(get_the_ID()) ? add_query_arg('et_fb', '1', et_fb_prepare_ssl_link($page_url)) : add_query_arg(array('et_fb_activation_nonce' => wp_create_nonce('et_fb_activation_nonce_' . get_the_ID())), $page_url);
    $wp_admin_bar->add_menu(array('id' => 'et-use-visual-builder', 'title' => esc_html__('Enable Visual Builder', 'et_builder'), 'href' => esc_url($use_visual_builder_url)));
}
开发者ID:pacificano,项目名称:pacificano,代码行数:24,代码来源:functions.php

示例15: extra_body_classes

function extra_body_classes($classes)
{
    $classes[] = 'et_extra';
    if (extra_layout_used() || is_et_pb_preview() && isset($_GET['is_extra_layout'])) {
        $classes[] = 'et_extra_layout';
    }
    if (et_pb_is_pagebuilder_used(get_the_ID())) {
        $classes[] = 'et_pb_pagebuilder_layout';
    }
    if (true === et_get_option('primary_nav_fullwidth', false)) {
        $classes[] = 'et_fullwidth_nav';
    }
    if (true === et_get_option('secondary_nav_fullwidth', false)) {
        $classes[] = 'et_fullwidth_secondary_nav';
    }
    if ('on' === et_get_option('extra_fixed_nav', 'on')) {
        $classes[] = 'et_fixed_nav';
        if (et_get_option('hide_nav_until_scroll', false)) {
            $classes[] = 'et_hide_nav';
        }
        if (et_get_option('fixed_nav_hide_logo_image', false)) {
            $classes[] = 'et_fixed_nav_hide_logo_image';
        }
    } else {
        if ('on' !== et_get_option('extra_fixed_nav', 'on')) {
            $classes[] = 'et_non_fixed_nav';
        }
    }
    if (is_page_template('page-template-fullwidth.php')) {
        $classes[] = 'et_pb_pagebuilder_fullwidth';
    }
    $classes = array_merge($classes, (array) extra_customizer_selector_classes('body'));
    return $classes;
}
开发者ID:rthburke,项目名称:fltHub,代码行数:34,代码来源:core.php


注:本文中的et_pb_is_pagebuilder_used函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。