'', 'content' => trim( $content ), 'categories' => array( 'text' ), 'viewportWidth' => absint( $content_width * 1.1 ), ) ); // Why bother if we have no content or title? if ( empty( $args['content'] ) || empty( $args['title'] ) ) { continue; } $args['title'] = esc_html( $args['title'] ); register_block_pattern( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_pattern 'michelle/' . $id, $args ); } } // /register /** * Gets array of block pattern IDs/slugs to load. * * The theme will look for a `templates/parts/block/pattern-{{$id}}.php` file * based on the array values (the `$id` in the filename). * * @since 1.0.0 * @version 1.0.10 * * @return array */ public static function get_pattern_ids(): array { // Variables $pattern_ids = array( 'blog', 'cards', 'contact-bg-1', 'contact-bg-2', 'contact-description', 'contact-image-middle', 'contact-image-side', 'contact-quote', 'contact-shadow', 'contact-social', 'cta', 'cta-bg', 'cta-box', 'cta-centered', 'cta-large', 'cta-quote', 'cta-simple', 'features-bg-image', 'features-bg-shadow', 'features-center-icon-1', 'features-center-icon-2', 'features-fullwidth-bg', 'features-large-image', 'features-parallax', 'features-shadow', 'features-simple', 'features-single', 'features-single-large', 'features-steps', 'food-menu', 'footer', 'footer-form', 'gallery-captions', 'gallery-no-gap', 'gallery-variable-with-description', 'heading-hidden-accessibly', 'image-padding-left', 'image-padding-right', 'image-parallax', 'intro-2-columns-text', 'intro-2-images', 'intro-bg-image', 'intro-bg-links', 'intro-bg-text-left', 'intro-centered-background', 'intro-color-image', 'intro-color-image-large', 'intro-fullscreen-bottom-text', 'intro-images', 'intro-overflow', 'intro-overlap', 'intro-with-description', 'logos', 'portfolio-project-gallery', 'portfolio-project-image', 'question-answer', 'team', 'team-2', 'testimonials', 'testimonials-single', 'testimonials-single-bg', 'text-2-columns-wider-heading', 'text-extra-hierarchy', 'text-heading-columns', 'text-large-lead', 'text-parallax', 'text-with-image', ); // Output /** * Filters array of block pattern IDs. * * @since 1.0.0 * * @param array $pattern_ids */ return (array) apply_filters( 'michelle/content/block_patterns/get_pattern_ids', $pattern_ids ); } // /get_pattern_ids /** * Adds a block pattern setup array to list. * * @since 1.0.0 * * @param string $file Pattern setup file name/path. * @param array $args Pattern setup arguments. * * @return void */ public static function add_pattern_args( string $file, array $args ) { // Variables $id = str_replace( 'pattern-', '', basename( $file, '.php' ) ); // Processing self::$pattern_args[ $id ] = (array) $args; } // /add_pattern_args }