', $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[] = 'ct-primary-spacing'; } } 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') { if (! is_author()) { return; } $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'; ?> [ 'joined' => false, 'articles_count' => false, 'comments' => false ] ] ); if ( ! $args['value']['joined'] && ! $args['value']['articles_count'] && ! $args['value']['comments'] ) { return; } $joined_date = date("F j, Y", strtotime(get_userdata( get_the_author_meta('ID') )->user_registered)); $comments_count = get_comments([ 'type' => '', 'user_id' => get_the_author_meta('ID'), 'count' => true, ]); $posts_count = count_user_posts(get_the_author_meta('ID')); ?> 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'); $editor = 'classic'; global $post; if (blocksy_is_blocks_editor_active()) { $editor = 'default'; } 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 (class_exists('Brizy_Admin_Templates')) { if (is_null($pid) || !$is_using_brizy) { $templateManager = Brizy_Admin_Templates::_init(); if ($templateManager->getTemplateForCurrentPage()) { $editor = 'brizy'; } } } 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'; } } } if (blocksy_is_page()) { $content_style = get_theme_mod('page_content_style', 'wide'); } if (blocksy_get_page_structure() === 'none') { return 'data-structure="' . $editor . ':' . $content_style . '"'; } $editor .= ':' . $content_style . ':' . blocksy_get_page_structure(); return 'data-structure="' . $editor . '"'; } function blocksy_is_blocks_editor_active() { $gutenberg = ! (false === has_filter('replace_editor', 'gutenberg_init')); $block_editor = version_compare($GLOBALS['wp_version'], '5.0-beta', '>'); if (! $gutenberg && ! $block_editor) { return false; } if (blocksy_is_classic_editor_plugin_active()) { $editor_option = get_option('classic-editor-replace'); $block_editor_active = array('no-replace', 'block'); $editor = get_post_meta(get_the_ID(), 'classic-editor-remember', true); $all = get_option('classic-editor-allow-users', 'disallow'); if ($all === 'disallow') { return false; } if ($editor === 'classic-editor') { return false; } if ($editor === 'block-editor') { return true; } return in_array($editor_option, $block_editor_active, true); } return true; } function blocksy_is_classic_editor_plugin_active() { if (! function_exists('is_plugin_active')) { include_once ABSPATH . 'wp-admin/includes/plugin.php'; } if (is_plugin_active('classic-editor/classic-editor.php')) { return true; } return false; }