Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/embedpre.../Gutenber.../block-ba...
File: block-wistia.php
<?php
[0] Fix | Delete
[1] Fix | Delete
/**
[2] Fix | Delete
* Renders the `unity-gutenberg/post-slider` block on server.
[3] Fix | Delete
*
[4] Fix | Delete
* @param array $attributes The block attributes.
[5] Fix | Delete
*
[6] Fix | Delete
* @return string Returns the post slider.
[7] Fix | Delete
*/
[8] Fix | Delete
function embedpress_gutenberg_render_block_wistia( $attributes )
[9] Fix | Delete
{
[10] Fix | Delete
[11] Fix | Delete
ob_start();
[12] Fix | Delete
if ( !empty( $attributes ) && !empty( $attributes[ 'url' ] ) ) :
[13] Fix | Delete
preg_match( '~medias/(.*)~i', esc_url($attributes[ 'url' ]), $matches );
[14] Fix | Delete
$id = false;
[15] Fix | Delete
if ( isset( $matches[ 1 ] ) ) {
[16] Fix | Delete
$id = $matches[ 1 ];
[17] Fix | Delete
}
[18] Fix | Delete
$align = 'align' . ( isset( $attributes[ 'align' ] ) ? $attributes[ 'align' ] : 'center' );
[19] Fix | Delete
if ( !empty( $id ) ) :
[20] Fix | Delete
?>
[21] Fix | Delete
<div class="ose-wistia wp-block-embed-youtube <?php echo esc_attr($align); ?>" id="wistia_<?php echo esc_attr($id); ?>">
[22] Fix | Delete
<iframe src="<?php echo esc_url($attributes[ 'iframeSrc' ]); ?>" allowtransparency="true" frameborder="0"
[23] Fix | Delete
class="wistia_embed" name="wistia_embed" width="600" height="330"></iframe>
[24] Fix | Delete
<?php
[25] Fix | Delete
do_action( 'embedpress_gutenberg_wistia_block_after_embed', $attributes ); ?>
[26] Fix | Delete
</div>
[27] Fix | Delete
<?php
[28] Fix | Delete
endif;
[29] Fix | Delete
endif;
[30] Fix | Delete
return ob_get_clean();
[31] Fix | Delete
}
[32] Fix | Delete
[33] Fix | Delete
/**
[34] Fix | Delete
* Registers the `embedpress/wistia-block` block on server.
[35] Fix | Delete
*/
[36] Fix | Delete
function embedpress_gutenberg_register_block_wistia()
[37] Fix | Delete
{
[38] Fix | Delete
if ( function_exists( 'register_block_type' ) ) :
[39] Fix | Delete
register_block_type( 'embedpress/wistia-block', [
[40] Fix | Delete
'attributes' => [
[41] Fix | Delete
'url' => [
[42] Fix | Delete
'type' => 'string',
[43] Fix | Delete
],
[44] Fix | Delete
'iframeSrc' => [
[45] Fix | Delete
'type' => 'string',
[46] Fix | Delete
],
[47] Fix | Delete
],
[48] Fix | Delete
'render_callback' => 'embedpress_gutenberg_render_block_wistia',
[49] Fix | Delete
] );
[50] Fix | Delete
endif;
[51] Fix | Delete
}
[52] Fix | Delete
[53] Fix | Delete
add_action( 'init', 'embedpress_gutenberg_register_block_wistia' );
[54] Fix | Delete
[55] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function