: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$muted = ( 'yes' === $settings['embedpress_pro_twitch_mute'] ) ? 'true' : 'false';
$theme = !empty($settings['embedpress_pro_twitch_theme']) ? esc_attr($settings['embedpress_pro_twitch_theme']) : 'dark';
if ( is_embedpress_pro_active() ) {
$layout = ( 'yes' === $settings['embedpress_pro_twitch_chat'] ) ? 'video-with-chat' : 'video';
$url = "https://embed.twitch.tv?autoplay={$autoplay}&channel={$channel}&height={$height}&layout={$layout}&migration=true&muted={$muted}&theme={$theme}&time={$time}&video={$video}&width={$width}&allowfullscreen={$full_screen}";
$pars_url = wp_parse_url( get_site_url() );
$url = ! empty( $pars_url['host'] ) ? $url . '&parent=' . $pars_url['host'] : $url;
preg_match( '/src=\"(.+?)\"/', $embed_content->embed, $match );
$embed_content->embed = str_replace( $url_full, $url, $embed_content->embed );
if ( is_embedpress_pro_active() ) {
return self::apply_cta_markup( $embed_content, $settings, 'twitch' );
public static function spotify( $embed, $setting ) {
if ( ! isset( $embed->provider_name ) || strtolower( $embed->provider_name ) !== 'spotify' || ! isset( $embed->embed ) ) {
preg_match( '/src=\"(.+?)\"/', $embed->embed, $match );
$modified_url = str_replace( 'playlist-v2', 'playlist', $url_full );
if ( $setting['embedpress_pro_embeded_source'] == 'spotify' ) {
// apply elementor related mod
if ( isset( $setting['spotify_theme'] ) ) {
if ( strpos( $modified_url, '?' ) !== false ) {
$modified_url .= '&theme=' . sanitize_text_field( $setting['spotify_theme'] );
$modified_url .= '?theme=' . sanitize_text_field( $setting['spotify_theme'] );
$embed->embed = str_replace( $url_full, $modified_url, $embed->embed );