$cd_default_thumb, 'id' => 0 ]; // Blocks hidden from this screen on all sites: // deprecated blocks plus inner/child blocks that aren't configured directly. $hidden_blocks = array_merge( AdvancedGutenbergMain::hiddenDeprecatedBlocks(), AdvancedGutenbergMain::disabledLegacyBlocks(), [ 'advgb/accordion-item', // Accordion Item 'advgb/list-item', // List Item 'advgb/tab', // Tab Item 'advgb/feature-list', // Feature List ] ); if (gettype($blocks_list_saved) === 'array') { foreach ($blocks_list_saved as $block) { if (strpos($block['name'], 'advgb/') === false) { continue; } elseif (in_array($block['name'], $hidden_blocks, true)) { continue; } else { $block['icon'] = htmlentities($block['icon']); array_push($advgb_blocks, $block); } } } if (!defined('ADVANCED_GUTENBERG_PRO_LOADED')) { $advgb_blocks = array_merge($advgb_blocks, PublishPress\Blocks\Utilities::getProBlocks()); $free_version = true; } // Remove hidden blocks (includes Pro promo blocks merged in above, e.g. Feature List) $advgb_blocks = array_values(array_filter($advgb_blocks, function ($block) use ($hidden_blocks) { return ! in_array($block['name'], $hidden_blocks, true); })); /** * Sort array * * @param string $key Array key to sort * * @return Closure */ function sortBy($key) { return function ($a, $b) use ($key) { return strnatcmp($a[$key], $b[$key]); }; } usort($advgb_blocks, sortBy('title')); $excluded_blocks_config = [ 'advgb/container', 'advgb/accordion-item', 'advgb/accordion', 'advgb/tabs', 'advgb/tab', 'advgb/recent-posts', 'advgb/login-form', 'advgb/search-bar', 'advgb/countdown', 'advgb/feature-list', 'advgb/feature', 'advgb/pricing-table' ]; $new_titles = [ 'advgb/accordions' => __('Accordion - PublishPress', 'advanced-gutenberg'), 'advgb/button' => __('Button - PublishPress', 'advanced-gutenberg'), 'advgb/icon' => __('Icon - PublishPress', 'advanced-gutenberg'), 'advgb/image' => __('Image - PublishPress', 'advanced-gutenberg'), 'advgb/list' => __('List - PublishPress', 'advanced-gutenberg'), 'advgb/table' => __('Table - PublishPress', 'advanced-gutenberg'), 'advgb/adv-tabs' => __('Tabs - PublishPress', 'advanced-gutenberg'), 'advgb/video' => __('Video - PublishPress', 'advanced-gutenberg'), 'advgb/columns' => __('Columns - PublishPress', 'advanced-gutenberg'), 'advgb/column' => __('Column - PublishPress', 'advanced-gutenberg'), 'advgb/contact-form' => __('Contact Form - PublishPress', 'advanced-gutenberg'), 'advgb/count-up' => __('Count Up - PublishPress', 'advanced-gutenberg'), 'advgb/images-slider' => __('Images Slider - PublishPress', 'advanced-gutenberg'), 'advgb/infobox' => __('Info Box - PublishPress', 'advanced-gutenberg'), 'advgb/map' => __('Map - PublishPress', 'advanced-gutenberg'), 'advgb/newsletter' => __('Newsletter - PublishPress', 'advanced-gutenberg'), 'advgb/social-links' => __('Social Links - PublishPress', 'advanced-gutenberg'), 'advgb/summary' => __('Table of Contents - PublishPress', 'advanced-gutenberg'), 'advgb/testimonial' => __('Testimonial - PublishPress', 'advanced-gutenberg'), 'advgb/woo-products' => __('Woo Products - PublishPress', 'advanced-gutenberg') ]; // Short description of what each block does, shown as a hover tooltip $block_descriptions = [ 'advgb/accordions' => __('Show content in collapsible panels that expand when clicked.', 'advanced-gutenberg'), 'advgb/button' => __('Add a customizable call-to-action button with colors, sizes and icons.', 'advanced-gutenberg'), 'advgb/icon' => __('Insert a vector icon from a large library, with size and color controls.', 'advanced-gutenberg'), 'advgb/image' => __('Display an image with extra styling, captions and link options.', 'advanced-gutenberg'), 'advgb/list' => __('Build styled ordered or unordered lists with custom icons.', 'advanced-gutenberg'), 'advgb/table' => __('Create responsive tables with styling and per-cell formatting.', 'advanced-gutenberg'), 'advgb/adv-tabs' => __('Organize content into horizontal or vertical tabbed sections.', 'advanced-gutenberg'), 'advgb/video' => __('Embed a self-hosted or external video with a custom poster image.', 'advanced-gutenberg'), 'advgb/columns' => __('Lay out content in flexible, responsive multi-column rows.', 'advanced-gutenberg'), 'advgb/column' => __('A single column used inside the Columns block.', 'advanced-gutenberg'), 'advgb/container' => __('Wrap blocks in a styled container with background, padding and borders.', 'advanced-gutenberg'), 'advgb/contact-form' => __('Add a customizable contact form that emails submissions to you.', 'advanced-gutenberg'), 'advgb/count-up' => __('Animate numbers counting up to highlight stats and milestones.', 'advanced-gutenberg'), 'advgb/images-slider' => __('Show multiple images in a responsive carousel slider.', 'advanced-gutenberg'), 'advgb/infobox' => __('Present an icon or image with a heading and text in a styled box.', 'advanced-gutenberg'), 'advgb/map' => __('Embed an interactive Google Map with custom markers.', 'advanced-gutenberg'), 'advgb/newsletter' => __('Collect email subscribers with a customizable signup form.', 'advanced-gutenberg'), 'advgb/login-form' => __('Display a front-end login and registration form.', 'advanced-gutenberg'), 'advgb/search-bar' => __('Add a styled site search bar anywhere on your pages.', 'advanced-gutenberg'), 'advgb/social-links' => __('Link to your social profiles with a row of social icons.', 'advanced-gutenberg'), 'advgb/summary' => __('Generate an automatic table of contents from your headings.', 'advanced-gutenberg'), 'advgb/testimonial' => __('Showcase customer testimonials with photo, name and role.', 'advanced-gutenberg'), 'advgb/woo-products' => __('Display WooCommerce products in a customizable grid.', 'advanced-gutenberg'), 'advgb/countdown' => __('Display a countdown timer to a specific date or event.', 'advanced-gutenberg'), 'advgb/feature' => __('Highlight a single feature with an icon, title and description.', 'advanced-gutenberg'), 'advgb/pricing-table' => __('Compare pricing plans side by side with features and buttons.', 'advanced-gutenberg'), ]; // Pro if (defined('ADVANCED_GUTENBERG_PRO_LOADED')) { if (method_exists('PPB_AdvancedGutenbergPro\Utils\Definitions', 'advgb_pro_default_block_settings')) { $excludedProBlocks = PPB_AdvancedGutenbergPro\Utils\Definitions::advgb_pro_default_block_settings('excluded_blocks'); foreach ($excludedProBlocks as $excludedProBlock) { array_push( $excluded_blocks_config, $excludedProBlock ); } } } ?>