It seems we can’t find what you’re looking for. Perhaps searching can help.
R X v\ @P\ x\ B Z @6[ \ [ _uU V (ޅU \ H\ 8\ Y `Q O `4[ ( B X \ 8 A X \ H B X \ X `6A FS \ h B 5[ \ x oB 5[ \ B X \ HB w\ \ pB P\ \ " \ GS P 4 W \ 0\ \ {K `k `Q Z ) *\ @U \ WX \ \ {K {K `Q [ ZX @+ \ h > l ^ \ \ - {K E `Q : [ $ ^ \ GS d @_ \ x\ 6[ {K S `Q F .[ c Y_ O \ b p_ \ h\ ~Y X {K GS `Q N \ h _ P\ \ \ \ 0\ h\ \ \ \ B C p\ V _uU [ (ޅU 8\ \ \ p}U q ~Y X 0Q ( lB @X @\ 8 B 7[ @\ H oB X @\ "pl @\ @HS ` W \ \ E {K X 7 ? \ W zd @\ 0}(U | p~Y @X \ \ {K {K X M O @y[ X a @\ (U d }Y h ] \ \ R {K R X \ f [ ] l @\ (U X xY 0 \ p\ \ 0R {K X s y [ \ 5 @\ 0(U `q X}Y 8[ `\ \ {K {K not found template path. */ do_action( 'render_block_core_template_part_none', $template_part_id, $attributes, $template_part_file_path ); } } } // WP_DEBUG_DISPLAY must only be honored when WP_DEBUG. This precedent // is set in `wp_debug_mode()`. $is_debug = WP_DEBUG && WP_DEBUG_DISPLAY; if ( is_null( $content ) ) { if ( $is_debug && isset( $attributes['slug'] ) ) { return sprintf( /* translators: %s: Template part slug. */ __( 'Template part has been deleted or is unavailable: %s' ), $attributes['slug'] ); } return ''; } if ( isset( $seen_ids[ $template_part_id ] ) ) { return $is_debug ? // translators: Visible only in the front end, this warning takes the place of a faulty block. __( '[block rendering halted]' ) : ''; } // Look up area definition. $area_definition = null; $defined_areas = get_allowed_block_template_part_areas(); foreach ( $defined_areas as $defined_area ) { if ( $defined_area['area'] === $area ) { $area_definition = $defined_area; break; } } // If $area is not allowed, set it back to the uncategorized default. if ( ! $area_definition ) { $area = WP_TEMPLATE_PART_AREA_UNCATEGORIZED; } // Run through the actions that are typically taken on the_content. $content = shortcode_unautop( $content ); $content = do_shortcode( $content ); $seen_ids[ $template_part_id ] = true; $content = do_blocks( $content ); unset( $seen_ids[ $template_part_id ] ); $content = wptexturize( $content ); $content = convert_smilies( $content ); $content = wp_filter_content_tags( $content, "template_part_{$area}" ); // Handle embeds for block template parts. global $wp_embed; $content = $wp_embed->autoembed( $content ); if ( empty( $attributes['tagName'] ) || tag_escape( $attributes['tagName'] ) !== $attributes['tagName'] ) { $area_tag = 'div'; if ( $area_definition && isset( $area_definition['area_tag'] ) ) { $area_tag = $area_definition['area_tag']; } $html_tag = $area_tag; } else { $html_tag = esc_attr( $attributes['tagName'] ); } $wrapper_attributes = get_block_wrapper_attributes(); return "<$html_tag $wrapper_attributes>" . str_replace( ']]>', ']]>', $content ) . "$html_tag>"; } /** * Returns an array of area variation objects for the template part block. * * @since 6.1.0 * * @param array $instance_variations The variations for instances. * * @return array Array containing the block variation objects. */ function build_template_part_block_area_variations( $instance_variations ) { $variations = array(); $defined_areas = get_allowed_block_template_part_areas(); foreach ( $defined_areas as $area ) { if ( 'uncategorized' !== $area['area'] ) { $has_instance_for_area = false; foreach ( $instance_variations as $variation ) { if ( $variation['attributes']['area'] === $area['area'] ) { $has_instance_for_area = true; break; } } $scope = $has_instance_for_area ? array() : array( 'inserter' ); $variations[] = array( 'name' => 'area_' . $area['area'], 'title' => $area['label'], 'description' => $area['description'], 'attributes' => array( 'area' => $area['area'], ), 'scope' => $scope, 'icon' => $area['icon'], ); } } return $variations; } /** * Returns an array of instance variation objects for the template part block * * @since 6.1.0 * * @return array Array containing the block variation objects. */ function build_template_part_block_instance_variations() { // Block themes are unavailable during installation. if ( wp_installing() ) { return array(); } if ( ! current_theme_supports( 'block-templates' ) && ! current_theme_supports( 'block-template-parts' ) ) { return array(); } $variations = array(); $template_parts = get_block_templates( array( 'post_type' => 'wp_template_part', ), 'wp_template_part' ); $defined_areas = get_allowed_block_template_part_areas(); $icon_by_area = array_combine( array_column( $defined_areas, 'area' ), array_column( $defined_areas, 'icon' ) ); foreach ( $template_parts as $template_part ) { $variations[] = array( 'name' => 'instance_' . sanitize_title( $template_part->slug ), 'title' => $template_part->title, // If there's no description for the template part don't show the // block description. This is a bit hacky, but prevent the fallback // by using a non-breaking space so that the value of description // isn't falsey. 'description' => $template_part->description || ' ', 'attributes' => array( 'slug' => $template_part->slug, 'theme' => $template_part->theme, 'area' => $template_part->area, ), 'scope' => array( 'inserter' ), 'icon' => isset( $icon_by_area[ $template_part->area ] ) ? $icon_by_area[ $template_part->area ] : null, 'example' => array( 'attributes' => array( 'slug' => $template_part->slug, 'theme' => $template_part->theme, 'area' => $template_part->area, ), ), ); } return $variations; } /** * Returns an array of all template part block variations. * * @since 5.9.0 * * @return array Array containing the block variation objects. */ function build_template_part_block_variations() { $instance_variations = build_template_part_block_instance_variations(); $area_variations = build_template_part_block_area_variations( $instance_variations ); return array_merge( $area_variations, $instance_variations ); } /** * Registers the `core/template-part` block on the server. * * @since 5.9.0 */ function register_block_core_template_part() { register_block_type_from_metadata( __DIR__ . '/template-part', array( 'render_callback' => 'render_block_core_template_part', 'variation_callback' => 'build_template_part_block_variations', ) ); } add_action( 'init', 'register_block_core_template_part' );
It seems we can’t find what you’re looking for. Perhaps searching can help.