: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
namespace EmbedPress\Includes\Traits;
if ( !defined( 'ABSPATH' ) ) {
} // Exit if accessed directly
use Elementor\Controls_Manager as Controls_Manager;
use Elementor\Group_Control_Image_Size;
* @param string $provider_name
public function init_branding_controls( $provider_name='' ) {
if ( !isset( $this->pro_class) ) {
if ( !isset( $this->pro_text) ) {
"embedpress_pro_{$provider_name}_logo[url]!" =>''
if ( $provider_name !== 'document' ) {
$logo_condition["embedpress_pro_embeded_source"] = $provider_name;
$condition["embedpress_pro_embeded_source"] = $provider_name;
"{$provider_name}_custom_logo_cta_heading",
'label' => __( 'Custom Branding', 'embedpress' ),
'type' => Controls_Manager::HEADING,
'condition' => $condition,
"embedpress_pro_{$provider_name}_logo",
'label' => sprintf(__( 'Custom Logo %s', 'embedpress' ), $this->pro_text ),
'description' => __( 'Leave it empty to hide it', 'embedpress' ),
'type' => Controls_Manager::MEDIA,
'classes' => $this->pro_class,
'condition' => $condition,
$this->add_group_control(
Group_Control_Image_Size::get_type(),
'name' => "embedpress_pro_{$provider_name}_logo",
'condition' => $logo_condition,
'classes' => $this->pro_class,
$this->add_responsive_control(
"embedpress_pro_{$provider_name}_logo_xpos",
'label' => sprintf( __( 'Logo X Position %s', 'embedpress' ), $this->pro_text),
'description' => __( 'Change this number to move your logo in horizontal direction.', 'embedpress' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px', '%' ],
"{{WRAPPER}} .ose-{$provider_name} .watermark, {{WRAPPER}} .ep-embed-content-wraper .watermark" => 'right: {{SIZE}}{{UNIT}};',
'condition' => $logo_condition,
'classes' => $this->pro_class,
$this->add_responsive_control(
"embedpress_pro_{$provider_name}_logo_ypos",
'label' => sprintf( __( 'Logo Y Position %s', 'embedpress' ), $this->pro_text),
'description' => __( 'Change this number to move your logo in vertical direction.', 'embedpress' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px', '%' ],
"{{WRAPPER}} .ose-{$provider_name} .watermark, {{WRAPPER}} .ep-embed-content-wraper .watermark" => 'bottom: {{SIZE}}{{UNIT}};',
'condition' => $logo_condition,
'classes' => $this->pro_class,
$this->start_controls_tabs(
"ep_{$provider_name}_cta_style_tabs",
'condition' => $logo_condition,
$this->start_controls_tab( "ep_{$provider_name}_cta_normal_tab",
'label' => __( 'Normal', 'embedpress' ),
"embedpress_pro_{$provider_name}_logo_opacity",
'label' => sprintf( __( 'Logo Opacity %s', 'embedpress' ), $this->pro_text),
'type' => Controls_Manager::SLIDER,
"{{WRAPPER}} .ose-{$provider_name} .watermark, {{WRAPPER}} .ep-embed-content-wraper .watermark" => 'opacity: {{SIZE}}!important;',
'condition' => $logo_condition,
'classes' => $this->pro_class,
$this->end_controls_tab();
$this->start_controls_tab( "ep_{$provider_name}_cta_hover__tab",
'label' => __( 'Hover', 'embedpress' ),
"embedpress_pro_{$provider_name}_logo_opacity_hover",
'label' => sprintf( __( 'Logo Opacity %s', 'embedpress' ), $this->pro_text),
'type' => Controls_Manager::SLIDER,
"{{WRAPPER}} .ose-{$provider_name} .watermark:hover, {{WRAPPER}} .ep-embed-content-wraper .watermark:hover" => 'opacity: {{SIZE}};',
'condition' => $logo_condition,
'classes' => $this->pro_class,
$this->end_controls_tab();
$this->end_controls_tabs();
"embedpress_pro_{$provider_name}_cta",
'label' => sprintf( __( 'CTA link for Logo %s', 'embedpress' ), $this->pro_text),
'description' => __( 'You can show the logo inside a link. Leave it empty to hide it', 'embedpress' ),
'type' => Controls_Manager::URL,
'placeholder' => __( 'https://your-link.com', 'embedpress' ),
'condition' => $logo_condition,
'classes' => $this->pro_class,