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.../EmbedPre.../Includes/Traits
File: Branding.php
<?php
[0] Fix | Delete
namespace EmbedPress\Includes\Traits;
[1] Fix | Delete
if ( !defined( 'ABSPATH' ) ) {
[2] Fix | Delete
exit;
[3] Fix | Delete
} // Exit if accessed directly
[4] Fix | Delete
use Elementor\Controls_Manager as Controls_Manager;
[5] Fix | Delete
use Elementor\Group_Control_Image_Size;
[6] Fix | Delete
[7] Fix | Delete
Trait Branding {
[8] Fix | Delete
/**
[9] Fix | Delete
* @param string $provider_name
[10] Fix | Delete
*/
[11] Fix | Delete
public function init_branding_controls( $provider_name='' ) {
[12] Fix | Delete
if ( !isset( $this->pro_class) ) {
[13] Fix | Delete
$this->pro_class = '';
[14] Fix | Delete
}
[15] Fix | Delete
if ( !isset( $this->pro_text) ) {
[16] Fix | Delete
$this->pro_text = '';
[17] Fix | Delete
}
[18] Fix | Delete
$logo_condition = [
[19] Fix | Delete
"embedpress_pro_{$provider_name}_logo[url]!" =>''
[20] Fix | Delete
];
[21] Fix | Delete
$condition = [];
[22] Fix | Delete
if ( $provider_name !== 'document' ) {
[23] Fix | Delete
$logo_condition["embedpress_pro_embeded_source"] = $provider_name;
[24] Fix | Delete
$condition["embedpress_pro_embeded_source"] = $provider_name;
[25] Fix | Delete
}
[26] Fix | Delete
$this->add_control(
[27] Fix | Delete
"{$provider_name}_custom_logo_cta_heading",
[28] Fix | Delete
[
[29] Fix | Delete
'label' => __( 'Custom Branding', 'embedpress' ),
[30] Fix | Delete
'type' => Controls_Manager::HEADING,
[31] Fix | Delete
'separator' => 'before',
[32] Fix | Delete
'condition' => $condition,
[33] Fix | Delete
]
[34] Fix | Delete
);
[35] Fix | Delete
$this->add_control(
[36] Fix | Delete
"embedpress_pro_{$provider_name}_logo",
[37] Fix | Delete
[
[38] Fix | Delete
'label' => sprintf(__( 'Custom Logo %s', 'embedpress' ), $this->pro_text ),
[39] Fix | Delete
'description' => __( 'Leave it empty to hide it', 'embedpress' ),
[40] Fix | Delete
'type' => Controls_Manager::MEDIA,
[41] Fix | Delete
'dynamic' => [
[42] Fix | Delete
'active' => true,
[43] Fix | Delete
],
[44] Fix | Delete
'classes' => $this->pro_class,
[45] Fix | Delete
'condition' => $condition,
[46] Fix | Delete
]
[47] Fix | Delete
);
[48] Fix | Delete
$this->add_group_control(
[49] Fix | Delete
Group_Control_Image_Size::get_type(),
[50] Fix | Delete
[
[51] Fix | Delete
'name' => "embedpress_pro_{$provider_name}_logo",
[52] Fix | Delete
'default' => 'full',
[53] Fix | Delete
'condition' => $logo_condition,
[54] Fix | Delete
'classes' => $this->pro_class,
[55] Fix | Delete
]
[56] Fix | Delete
);
[57] Fix | Delete
$this->add_responsive_control(
[58] Fix | Delete
"embedpress_pro_{$provider_name}_logo_xpos",
[59] Fix | Delete
[
[60] Fix | Delete
'label' => sprintf( __( 'Logo X Position %s', 'embedpress' ), $this->pro_text),
[61] Fix | Delete
'description' => __( 'Change this number to move your logo in horizontal direction.', 'embedpress' ),
[62] Fix | Delete
'type' => Controls_Manager::SLIDER,
[63] Fix | Delete
'size_units' => [ 'px', '%' ],
[64] Fix | Delete
'range' => [
[65] Fix | Delete
'px' => [
[66] Fix | Delete
'min' => 0,
[67] Fix | Delete
'max' => 1000,
[68] Fix | Delete
'step' => 5,
[69] Fix | Delete
],
[70] Fix | Delete
'%' => [
[71] Fix | Delete
'min' => 0,
[72] Fix | Delete
'max' => 100,
[73] Fix | Delete
],
[74] Fix | Delete
],
[75] Fix | Delete
'default' => [
[76] Fix | Delete
'unit' => '%',
[77] Fix | Delete
'size' => 10,
[78] Fix | Delete
],
[79] Fix | Delete
'selectors' => [
[80] Fix | Delete
"{{WRAPPER}} .ose-{$provider_name} .watermark, {{WRAPPER}} .ep-embed-content-wraper .watermark" => 'right: {{SIZE}}{{UNIT}};',
[81] Fix | Delete
],
[82] Fix | Delete
'condition' => $logo_condition,
[83] Fix | Delete
'classes' => $this->pro_class,
[84] Fix | Delete
]
[85] Fix | Delete
);
[86] Fix | Delete
$this->add_responsive_control(
[87] Fix | Delete
"embedpress_pro_{$provider_name}_logo_ypos",
[88] Fix | Delete
[
[89] Fix | Delete
'label' => sprintf( __( 'Logo Y Position %s', 'embedpress' ), $this->pro_text),
[90] Fix | Delete
'description' => __( 'Change this number to move your logo in vertical direction.', 'embedpress' ),
[91] Fix | Delete
'type' => Controls_Manager::SLIDER,
[92] Fix | Delete
'size_units' => [ 'px', '%' ],
[93] Fix | Delete
'range' => [
[94] Fix | Delete
'px' => [
[95] Fix | Delete
'min' => 0,
[96] Fix | Delete
'max' => 1000,
[97] Fix | Delete
'step' => 5,
[98] Fix | Delete
],
[99] Fix | Delete
'%' => [
[100] Fix | Delete
'min' => 0,
[101] Fix | Delete
'max' => 100,
[102] Fix | Delete
],
[103] Fix | Delete
],
[104] Fix | Delete
'default' => [
[105] Fix | Delete
'unit' => '%',
[106] Fix | Delete
'size' => 10,
[107] Fix | Delete
],
[108] Fix | Delete
'selectors' => [
[109] Fix | Delete
"{{WRAPPER}} .ose-{$provider_name} .watermark, {{WRAPPER}} .ep-embed-content-wraper .watermark" => 'bottom: {{SIZE}}{{UNIT}};',
[110] Fix | Delete
],
[111] Fix | Delete
'condition' => $logo_condition,
[112] Fix | Delete
'classes' => $this->pro_class,
[113] Fix | Delete
[114] Fix | Delete
]
[115] Fix | Delete
);
[116] Fix | Delete
$this->start_controls_tabs(
[117] Fix | Delete
"ep_{$provider_name}_cta_style_tabs",
[118] Fix | Delete
[
[119] Fix | Delete
'condition' => $logo_condition,
[120] Fix | Delete
]
[121] Fix | Delete
);
[122] Fix | Delete
$this->start_controls_tab( "ep_{$provider_name}_cta_normal_tab",
[123] Fix | Delete
[
[124] Fix | Delete
'label' => __( 'Normal', 'embedpress' ),
[125] Fix | Delete
]
[126] Fix | Delete
);
[127] Fix | Delete
$this->add_control(
[128] Fix | Delete
"embedpress_pro_{$provider_name}_logo_opacity",
[129] Fix | Delete
[
[130] Fix | Delete
'label' => sprintf( __( 'Logo Opacity %s', 'embedpress' ), $this->pro_text),
[131] Fix | Delete
'type' => Controls_Manager::SLIDER,
[132] Fix | Delete
'default' => [
[133] Fix | Delete
'size' => .5,
[134] Fix | Delete
],
[135] Fix | Delete
'range' => [
[136] Fix | Delete
'px' => [
[137] Fix | Delete
'max' => 1,
[138] Fix | Delete
'step' => 0.01,
[139] Fix | Delete
],
[140] Fix | Delete
],
[141] Fix | Delete
'selectors' => [
[142] Fix | Delete
"{{WRAPPER}} .ose-{$provider_name} .watermark, {{WRAPPER}} .ep-embed-content-wraper .watermark" => 'opacity: {{SIZE}}!important;',
[143] Fix | Delete
],
[144] Fix | Delete
'condition' => $logo_condition,
[145] Fix | Delete
'classes' => $this->pro_class,
[146] Fix | Delete
[147] Fix | Delete
]
[148] Fix | Delete
);
[149] Fix | Delete
$this->end_controls_tab();
[150] Fix | Delete
$this->start_controls_tab( "ep_{$provider_name}_cta_hover__tab",
[151] Fix | Delete
[
[152] Fix | Delete
'label' => __( 'Hover', 'embedpress' ),
[153] Fix | Delete
]
[154] Fix | Delete
);
[155] Fix | Delete
$this->add_control(
[156] Fix | Delete
"embedpress_pro_{$provider_name}_logo_opacity_hover",
[157] Fix | Delete
[
[158] Fix | Delete
'label' => sprintf( __( 'Logo Opacity %s', 'embedpress' ), $this->pro_text),
[159] Fix | Delete
'type' => Controls_Manager::SLIDER,
[160] Fix | Delete
'size_units' => [ '%'],
[161] Fix | Delete
'default' => [
[162] Fix | Delete
'size' => 1,
[163] Fix | Delete
],
[164] Fix | Delete
'range' => [
[165] Fix | Delete
'px' => [
[166] Fix | Delete
'max' => 1,
[167] Fix | Delete
'step' => 0.01,
[168] Fix | Delete
],
[169] Fix | Delete
],
[170] Fix | Delete
'selectors' => [
[171] Fix | Delete
"{{WRAPPER}} .ose-{$provider_name} .watermark:hover, {{WRAPPER}} .ep-embed-content-wraper .watermark:hover" => 'opacity: {{SIZE}};',
[172] Fix | Delete
],
[173] Fix | Delete
'condition' => $logo_condition,
[174] Fix | Delete
'classes' => $this->pro_class,
[175] Fix | Delete
[176] Fix | Delete
]
[177] Fix | Delete
);
[178] Fix | Delete
$this->end_controls_tab();
[179] Fix | Delete
$this->end_controls_tabs();
[180] Fix | Delete
$this->add_control(
[181] Fix | Delete
"embedpress_pro_{$provider_name}_cta",
[182] Fix | Delete
[
[183] Fix | Delete
'label' => sprintf( __( 'CTA link for Logo %s', 'embedpress' ), $this->pro_text),
[184] Fix | Delete
'description' => __( 'You can show the logo inside a link. Leave it empty to hide it', 'embedpress' ),
[185] Fix | Delete
'type' => Controls_Manager::URL,
[186] Fix | Delete
'dynamic' => [
[187] Fix | Delete
'active' => true,
[188] Fix | Delete
],
[189] Fix | Delete
'placeholder' => __( 'https://your-link.com', 'embedpress' ),
[190] Fix | Delete
'condition' => $logo_condition,
[191] Fix | Delete
'classes' => $this->pro_class,
[192] Fix | Delete
'separator' => 'before',
[193] Fix | Delete
]
[194] Fix | Delete
);
[195] Fix | Delete
}
[196] Fix | Delete
}
[197] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function