Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
0 && $metadata['height'] > 0 )
) {
return $content;
}
// Locate the VIDEO tag to add the dimensions.
$p = new WP_HTML_Tag_Processor( $content );
if ( ! $p->next_tag( array( 'tag_name' => 'VIDEO' ) ) ) {
return $content;
}
$p->set_attribute( 'width', (string) $metadata['width'] );
$p->set_attribute( 'height', (string) $metadata['height'] );
/*
* The aspect-ratio style is needed due to an issue with the CSS spec: .
* Note that a style rule using attr() like the following cannot currently be used:
*
* .wp-block-video video[width][height] {
* aspect-ratio: attr(width type()) / attr(height type());
* }
*
* This is because this attr() is yet only implemented in Chromium: .
*/
$style = $p->get_attribute( 'style' );
if ( ! is_string( $style ) ) {
$style = '';
}
$aspect_ratio_style = sprintf( 'aspect-ratio: %d / %d;', $metadata['width'], $metadata['height'] );
$p->set_attribute( 'style', $aspect_ratio_style . $style );
return $p->get_updated_html();
}
/**
* Registers the `core/video` block on server.
*
* @since 6.9.0
*/
function register_block_core_video(): void {
register_block_type_from_metadata(
__DIR__ . '/video',
array(
'render_callback' => 'render_block_core_video',
)
);
}
add_action( 'init', 'register_block_core_video' );