', $block_content)[0];
if (
strpos($first_div, 'alignleft') !== false
||
strpos($first_div, 'alignright') !== false
) {
$class = 'align-wrap-' . esc_attr($block['attrs']['align']) . ' alignwide';
return sprintf(
'
%2$s
',
$class,
$block_content
);
}
}
return $block_content;
}, 10, 2);
add_filter( 'body_class', function ( $classes ) {
if (get_theme_mod('has_passepartout', 'no') === 'yes') {
$classes[] = 'ct-passepartout';
}
$classes[] = 'ct-loading';
if (is_single() || is_page()) {
if (
blocksy_default_akg(
'page_enable_vertical_spacing',
blocksy_get_post_options(),
'yes'
) === 'no'
) {
$classes[] = 'main-content-area-boundless';
}
}
if (function_exists('is_product_category')) {
if (is_product_category() || is_product_tag()) {
$classes[] = 'woocommerce-archive';
}
if (is_product() || is_woocommerce()) {
if (get_theme_mod('has_ajax_add_to_cart', 'yes') === 'yes') {
$classes[] = 'ct-ajax-add-to-cart';
}
}
}
return $classes;
});
/**
* User social channels
*
* @param string $tooltip Should output tooltips.
*/
function blocksy_author_social_channels($tooltip = 'yes') {
$facebook = get_the_author_meta('facebook');
$linkedin = get_the_author_meta('linkedin');
$dribbble = get_the_author_meta('dribbble');
$website = get_the_author_meta('user_url');
$twitter = get_the_author_meta( 'twitter' );
$instagram = get_the_author_meta( 'instagram' );
if (
! (
$website
||
$facebook
||
$twitter
||
$linkedin
||
$dribbble
||
$instagram
)
) {
return;
}
$class = 'author-box-social';
?>
true,
'tablet' => true,
'mobile' => false,
]));
?>
120]),
[
'tag_name' => 'a',
'inner_content' => '
',
'html_atts' => [
'href' => get_author_posts_url(
get_the_author_meta('ID'),
get_the_author_meta('user_nicename')
)
],
'img_atts' => ['width' => 60, 'height' => 60],
]
);
?>
true,
'tablet' => true,
'mobile' => false,
])
);
if (
blocksy_sidebar_position() === 'none'
&&
get_theme_mod('single_content_style', 'wide') === 'wide'
) {
$image_width = get_theme_mod('single_featured_image_width', 'default');
if ($image_width === 'wide') {
$class .= ' alignwide';
}
}
if (get_theme_mod('single_content_style', 'wide') === 'boxed') {
if (get_theme_mod('single_featured_image_boundless', 'no') === 'yes') {
$class .= ' ct-boundless';
}
}
return blocksy_html_tag('figure', ['class' => $class], blocksy_image([
'attachment_id' => get_post_thumbnail_id(),
'ratio' => get_theme_mod('single_featured_image_ratio', '4/3'),
'size' => 'full'
]));
}
function blocksy_get_entry_content_editor() {
$content_style = get_theme_mod('single_content_style', 'wide');
if (blocksy_is_page()) {
$content_style = get_theme_mod('page_content_style', 'wide');
}
if (blocksy_get_page_structure() === 'none') {
return 'data-structure="' . $content_style . '"';
}
$editor = 'default';
global $post;
if (class_exists('\Elementor\Plugin')) {
if (\Elementor\Plugin::$instance->db->is_built_with_elementor(
$post->ID
)) {
$editor = 'elementor';
}
}
if (class_exists('Brizy_Editor')) {
$pid = Brizy_Editor::get()->currentPostId();
$is_using_brizy = false;
try {
if (in_array(get_post_type($pid), Brizy_Editor::get()->supported_post_types())) {
$is_using_brizy = Brizy_Editor_Post::get($pid)->uses_editor();
}
} catch (Exception $e) {
}
if ($is_using_brizy) {
$editor = 'brizy';
}
}
if (class_exists('FLBuilderModel')) {
if (FLBuilderModel::is_builder_enabled()) {
if (
intval(blocksy_akg(
'row_width',
FLBuilderModel::get_global_settings(),
'1290'
)) === 1290
) {
$editor = 'beaver';
}
}
}
$editor .= ':' . $content_style . ':' . blocksy_get_page_structure();
return 'data-structure="' . $editor . '"';
}