ngAddress', 'OrderConfirmation\BillingWrapper', 'OrderConfirmation\ShippingWrapper', 'OrderConfirmation\AdditionalInformation', ); $block_types = array_merge( $block_types, Cart::get_cart_block_types(), Checkout::get_checkout_block_types(), MiniCartContents::get_mini_cart_block_types() ); if ( Package::feature()->is_experimental_build() ) { $block_types[] = 'ProductGallery'; $block_types[] = 'ProductGalleryLargeImage'; $block_types[] = 'ProductGalleryLargeImageNextPrevious'; $block_types[] = 'ProductGalleryPager'; $block_types[] = 'ProductGalleryThumbnails'; $block_types[] = 'CollectionFilters'; $block_types[] = 'CollectionStockFilter'; $block_types[] = 'CollectionPriceFilter'; $block_types[] = 'CollectionAttributeFilter'; $block_types[] = 'CollectionRatingFilter'; $block_types[] = 'CollectionActiveFilters'; } /** * This disables specific blocks in Widget Areas by not registering them. */ if ( in_array( $pagenow, array( 'widgets.php', 'themes.php', 'customize.php' ), true ) && ( empty( $_GET['page'] ) || 'gutenberg-edit-site' !== $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification $block_types = array_diff( $block_types, array( 'AllProducts', 'Cart', 'Checkout', ) ); } /** * This disables specific blocks in Post and Page editor by not registering them. */ if ( in_array( $pagenow, array( 'post.php', 'post-new.php' ), true ) ) { $block_types = array_diff( $block_types, array( 'AddToCartForm', 'Breadcrumbs', 'CatalogSorting', 'ClassicTemplate', 'ProductResultsCount', 'ProductDetails', 'OrderConfirmation\Status', 'OrderConfirmation\Summary', 'OrderConfirmation\Totals', 'OrderConfirmation\TotalsWrapper', 'OrderConfirmation\Downloads', 'OrderConfirmation\DownloadsWrapper', 'OrderConfirmation\BillingAddress', 'OrderConfirmation\ShippingAddress', 'OrderConfirmation\BillingWrapper', 'OrderConfirmation\ShippingWrapper', 'OrderConfirmation\AdditionalInformation', ) ); } return $block_types; } }