PATH:
home
/
lab2454c
/
invest.westernclear.com
/
wp-includes
/
blocks
<?php /** * Server-side rendering of the `core/accordion-item` block. * * @package WordPress * @since 6.9.0 * * @param array $attributes The block attributes. * @param string $content The block content. * * @return string Returns the updated markup. */ function block_core_accordion_item_render( $attributes, $content ) { if ( ! $content ) { return $content; } $p = new WP_HTML_Tag_Processor( $content ); $unique_id = wp_unique_id( 'accordion-item-' ); // Initialize the state of the item on the server using a closure, // since we need to get derived state based on the current context. wp_interactivity_state( 'core/accordion', array( 'isOpen' => function () { $context = wp_interactivity_get_context(); return $context['openByDefault']; }, ) ); if ( $p->next_tag( array( 'class_name' => 'wp-block-accordion-item' ) ) ) { $open_by_default = $attributes['openByDefault'] ? 'true' : 'false'; $p->set_attribute( 'data-wp-context', '{ "id": "' . $unique_id . '", "openByDefault": ' . $open_by_default . ' }' ); $p->set_attribute( 'data-wp-class--is-open', 'state.isOpen' ); $p->set_attribute( 'data-wp-init', 'callbacks.initAccordionItems' ); $p->set_attribute( 'data-wp-on-window--hashchange', 'callbacks.hashChange' ); if ( $p->next_tag( array( 'class_name' => 'wp-block-accordion-heading__toggle' ) ) ) { $p->set_attribute( 'data-wp-on--click', 'actions.toggle' ); $p->set_attribute( 'data-wp-on--keydown', 'actions.handleKeyDown' ); $p->set_attribute( 'id', $unique_id ); $p->set_attribute( 'aria-controls', $unique_id . '-panel' ); $p->set_attribute( 'data-wp-bind--aria-expanded', 'state.isOpen' ); if ( $p->next_tag( array( 'class_name' => 'wp-block-accordion-panel' ) ) ) { $p->set_attribute( 'id', $unique_id . '-panel' ); $p->set_attribute( 'aria-labelledby', $unique_id ); $p->set_attribute( 'data-wp-bind--inert', '!state.isOpen' ); // Only modify content if all directives have been set. $content = $p->get_updated_html(); } } } return $content; } /** * Registers the `core/accordion-item` block on server. * * @since 6.9.0 */ function register_block_core_accordion_item() { register_block_type_from_metadata( __DIR__ . '/accordion-item', array( 'render_callback' => 'block_core_accordion_item_render', ) ); } add_action( 'init', 'register_block_core_accordion_item' );
[+]
..
[-] avatar.php
[edit]
[+]
post-content
[+]
term-name
[+]
search
[+]
image
[+]
column
[-] comment-date.php
[edit]
[-] query-total.php
[edit]
[+]
latest-comments
[-] post-navigation-link.php
[edit]
[+]
term-description
[+]
quote
[+]
audio
[+]
comment-template
[+]
social-links
[-] site-title.php
[edit]
[-] search.php
[edit]
[+]
terms-query
[+]
comment-edit-link
[+]
comment-date
[+]
shortcode
[-] block.php
[edit]
[-] term-description.php
[edit]
[-] index.php
[edit]
[+]
navigation-submenu
[-] blocks-json.php
[edit]
[+]
accordion-panel
[+]
widget-group
[+]
post-comments-link
[+]
comments-pagination-next
[-] pattern.php
[edit]
[+]
query-total
[-] post-title.php
[edit]
[-] term-count.php
[edit]
[+]
heading
[-] post-excerpt.php
[edit]
[+]
term-count
[-] widget-group.php
[edit]
[+]
query-title
[-] video.php
[edit]
[+]
button
[+]
separator
[+]
spacer
[-] query-pagination-next.php
[edit]
[-] post-featured-image.php
[edit]
[-] post-comments-link.php
[edit]
[-] button.php
[edit]
[+]
embed
[+]
query-pagination-next
[+]
text-columns
[+]
tag-cloud
[+]
more
[+]
comment-reply-link
[+]
post-time-to-read
[+]
site-title
[+]
site-tagline
[-] query-pagination-previous.php
[edit]
[-] media-text.php
[edit]
[-] tag-cloud.php
[edit]
[-] social-link.php
[edit]
[+]
cover
[-] rss.php
[edit]
[-] template-part.php
[edit]
[-] categories.php
[edit]
[+]
nextpage
[-] comment-template.php
[edit]
[-] post-date.php
[edit]
[-] cover.php
[edit]
[+]
comment-author-name
[+]
accordion-heading
[+]
code
[+]
post-comments-count
[+]
columns
[-] accordion-item.php
[edit]
[-] comments-pagination-next.php
[edit]
[+]
footnotes
[+]
categories
[-] comment-content.php
[edit]
[+]
loginout
[-] calendar.php
[edit]
[-] post-time-to-read.php
[edit]
[+]
media-text
[+]
preformatted
[-] post-comments-form.php
[edit]
[+]
term-template
[+]
legacy-widget
[-] latest-comments.php
[edit]
[-] accordion.php
[edit]
[-] navigation.php
[edit]
[+]
rss
[+]
archives
[+]
group
[+]
accordion
[-] navigation-link.php
[edit]
[+]
navigation-link
[+]
template-part
[+]
post-navigation-link
[-] site-logo.php
[edit]
[-] post-author-name.php
[edit]
[-] shortcode.php
[edit]
[-] comments-pagination-numbers.php
[edit]
[+]
post-title
[-] file.php
[edit]
[-] query.php
[edit]
[+]
post-excerpt
[-] term-name.php
[edit]
[+]
post-comments-form
[+]
block
[+]
post-template
[+]
comment-content
[+]
query
[+]
pattern
[+]
avatar
[+]
post-author-name
[+]
latest-posts
[+]
query-no-results
[+]
comments-pagination-numbers
[-] query-pagination-numbers.php
[edit]
[-] page-list-item.php
[edit]
[-] read-more.php
[edit]
[-] post-terms.php
[edit]
[+]
table
[-] footnotes.php
[edit]
[-] page-list.php
[edit]
[+]
comments-pagination-previous
[-] site-tagline.php
[edit]
[-] query-no-results.php
[edit]
[+]
details
[-] comments-pagination-previous.php
[edit]
[+]
read-more
[+]
video
[+]
paragraph
[-] latest-posts.php
[edit]
[+]
page-list-item
[-] comments-title.php
[edit]
[-] require-static-blocks.php
[edit]
[-] post-author-biography.php
[edit]
[-] require-dynamic-blocks.php
[edit]
[+]
query-pagination-previous
[+]
post-date
[+]
verse
[+]
accordion-item
[+]
file
[+]
post-author-biography
[+]
social-link
[+]
query-pagination
[-] post-content.php
[edit]
[-] term-template.php
[edit]
[+]
home-link
[+]
buttons
[-] post-template.php
[edit]
[-] archives.php
[edit]
[+]
calendar
[-] list.php
[edit]
[-] post-author.php
[edit]
[+]
list
[+]
page-list
[+]
missing
[-] comments-pagination.php
[edit]
[+]
pullquote
[+]
post-featured-image
[+]
comments-title
[-] query-title.php
[edit]
[+]
post-author
[+]
list-item
[+]
math
[+]
comments-pagination
[-] query-pagination.php
[edit]
[+]
site-logo
[+]
navigation
[-] loginout.php
[edit]
[-] navigation-submenu.php
[edit]
[-] legacy-widget.php
[edit]
[-] comment-edit-link.php
[edit]
[+]
comments
[-] comments.php
[edit]
[-] comment-author-name.php
[edit]
[-] home-link.php
[edit]
[+]
post-terms
[+]
query-pagination-numbers
[-] comment-reply-link.php
[edit]
[-] post-comments-count.php
[edit]
[+]
freeform
[-] heading.php
[edit]
[+]
gallery
[-] image.php
[edit]
[-] gallery.php
[edit]
[+]
html