: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$additional_options['animation_speed_curve'] = array(
'label' => $i18n['animation']['speed']['label'],
'description' => $i18n['animation']['speed']['description'],
'option_category' => 'configuration',
'default' => 'ease-in-out',
'ease-in-out' => et_builder_i18n( 'Ease-In-Out' ),
'ease' => et_builder_i18n( 'Ease' ),
'ease-in' => et_builder_i18n( 'Ease-In' ),
'ease-out' => et_builder_i18n( 'Ease-Out' ),
'linear' => et_builder_i18n( 'Linear' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'depends_show_if_not' => 'none',
'mobile_options' => true,
$additional_options['animation_repeat'] = array(
'label' => $i18n['animation']['repeat']['label'],
'description' => $i18n['animation']['repeat']['description'],
'option_category' => 'configuration',
'once' => $i18n['animation']['repeat']['options']['once'],
'loop' => $i18n['animation']['repeat']['options']['loop'],
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'depends_show_if_not' => 'none',
'mobile_options' => true,
if ( isset( $this->slug ) && in_array( $this->slug, array( 'et_pb_menu', 'et_pb_fullwidth_menu' ), true ) ) {
$additional_options['dropdown_menu_animation'] = array(
'label' => $i18n['animation']['menu']['label'],
'description' => $i18n['animation']['menu']['description'],
'option_category' => 'configuration',
'fade' => et_builder_i18n( 'Fade' ),
'expand' => et_builder_i18n( 'Expand' ),
'slide' => et_builder_i18n( 'Slide' ),
'flip' => et_builder_i18n( 'Flip' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
// Move existing "Animation" section fields under the new animations UI
if ( isset( $this->slug ) && 'et_pb_fullwidth_portfolio' === $this->slug ) {
$additional_options['auto'] = array(
'label' => esc_html__( 'Automatic Carousel Rotation', 'et_builder' ),
'description' => esc_html__( 'If you the carousel layout option is chosen and you would like the carousel to slide automatically, without the visitor having to click the next button, enable this option and then adjust the rotation speed below if desired.', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'off' => et_builder_i18n( 'Off' ),
'on' => et_builder_i18n( 'On' ),
'depends_show_if' => 'on',
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
$additional_options['auto_speed'] = array(
'label' => esc_html__( 'Automatic Carousel Rotation Speed (in ms)', 'et_builder' ),
'option_category' => 'configuration',
'depends_show_if' => 'on',
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( "Here you can designate how fast the carousel rotates, if 'Automatic Carousel Rotation' option is enabled above. The higher the number the longer the pause between each rotation. (Ex. 1000 = 1 sec)", 'et_builder' ),
if ( isset( $this->slug ) && 'et_pb_fullwidth_slider' === $this->slug ) {
$additional_options['auto'] = array(
'label' => esc_html__( 'Automatic Animation', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'off' => et_builder_i18n( 'Off' ),
'on' => et_builder_i18n( 'On' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( 'If you would like the slider to slide automatically, without the visitor having to click the next button, enable this option and then adjust the rotation speed below if desired.', 'et_builder' ),
$additional_options['auto_speed'] = array(
'label' => esc_html__( 'Automatic Animation Speed (in ms)', 'et_builder' ),
'option_category' => 'configuration',
'depends_show_if' => 'on',
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( "Here you can designate how fast the slider fades between each slide, if 'Automatic Animation' option is enabled above. The higher the number the longer the pause between each rotation.", 'et_builder' ),
$additional_options['auto_ignore_hover'] = array(
'label' => esc_html__( 'Continue Automatic Slide on Hover', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'depends_show_if' => 'on',
'off' => et_builder_i18n( 'Off' ),
'on' => et_builder_i18n( 'On' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( 'Turning this on will allow automatic sliding to continue on mouse hover.', 'et_builder' ),
if ( isset( $this->slug ) && 'et_pb_fullwidth_post_slider' === $this->slug ) {
$additional_options['auto'] = array(
'label' => esc_html__( 'Automatic Animation', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'off' => et_builder_i18n( 'Off' ),
'on' => et_builder_i18n( 'On' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( 'If you would like the slider to slide automatically, without the visitor having to click the next button, enable this option and then adjust the rotation speed below if desired.', 'et_builder' ),
$additional_options['auto_speed'] = array(
'label' => esc_html__( 'Automatic Animation Speed (in ms)', 'et_builder' ),
'option_category' => 'configuration',
'depends_show_if' => 'on',
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( "Here you can designate how fast the slider fades between each slide, if 'Automatic Animation' option is enabled above. The higher the number the longer the pause between each rotation.", 'et_builder' ),
$additional_options['auto_ignore_hover'] = array(
'label' => esc_html__( 'Continue Automatic Slide on Hover', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'depends_show_if' => 'on',
'off' => et_builder_i18n( 'Off' ),
'on' => et_builder_i18n( 'On' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( 'Turning this on will allow automatic sliding to continue on mouse hover.', 'et_builder' ),
if ( isset( $this->slug ) && in_array( $this->slug, array( 'et_pb_gallery', 'et_pb_wc_images', 'et_pb_wc_gallery' ), true ) ) {
$additional_options['auto'] = array(
'label' => esc_html__( 'Automatic Animation', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'off' => et_builder_i18n( 'Off' ),
'on' => et_builder_i18n( 'On' ),
'depends_show_if' => 'on',
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( 'If you would like the slider to slide automatically, without the visitor having to click the next button, enable this option and then adjust the rotation speed below if desired.', 'et_builder' ),
$additional_options['auto_speed'] = array(
'label' => esc_html__( 'Automatic Animation Speed (in ms)', 'et_builder' ),
'option_category' => 'configuration',
'depends_show_if' => 'on',
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( "Here you can designate how fast the slider fades between each slide, if 'Automatic Animation' option is enabled above. The higher the number the longer the pause between each rotation.", 'et_builder' ),
if ( isset( $this->slug ) && 'et_pb_blurb' === $this->slug ) {
$additional_options['animation'] = array(
'label' => esc_html__( 'Image/Icon Animation', 'et_builder' ),
'option_category' => 'configuration',
'top' => esc_html__( 'Top To Bottom', 'et_builder' ),
'left' => esc_html__( 'Left To Right', 'et_builder' ),
'right' => esc_html__( 'Right To Left', 'et_builder' ),
'bottom' => esc_html__( 'Bottom To Top', 'et_builder' ),
'off' => esc_html__( 'No Animation', 'et_builder' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( 'This controls the direction of the lazy-loading animation.', 'et_builder' ),
'mobile_options' => true,
if ( isset( $this->slug ) && 'et_pb_slider' === $this->slug ) {
$additional_options['auto'] = array(
'label' => esc_html__( 'Automatic Animation', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'off' => et_builder_i18n( 'Off' ),
'on' => et_builder_i18n( 'On' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( 'If you would like the slider to slide automatically, without the visitor having to click the next button, enable this option and then adjust the rotation speed below if desired.', 'et_builder' ),
$additional_options['auto_speed'] = array(
'label' => esc_html__( 'Automatic Animation Speed (in ms)', 'et_builder' ),
'option_category' => 'configuration',
'depends_show_if' => 'on',
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( "Here you can designate how fast the slider fades between each slide, if 'Automatic Animation' option is enabled above. The higher the number the longer the pause between each rotation.", 'et_builder' ),
$additional_options['auto_ignore_hover'] = array(
'label' => esc_html__( 'Continue Automatic Slide on Hover', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'depends_show_if' => 'on',
'off' => et_builder_i18n( 'Off' ),
'on' => et_builder_i18n( 'On' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( 'Turning this on will allow automatic sliding to continue on mouse hover.', 'et_builder' ),
if ( isset( $this->slug ) && 'et_pb_post_slider' === $this->slug ) {
$additional_options['auto'] = array(
'label' => esc_html__( 'Automatic Animation', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'off' => et_builder_i18n( 'Off' ),
'on' => et_builder_i18n( 'On' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( 'If you would like the slider to slide automatically, without the visitor having to click the next button, enable this option and then adjust the rotation speed below if desired.', 'et_builder' ),
$additional_options['auto_speed'] = array(
'label' => esc_html__( 'Automatic Animation Speed (in ms)', 'et_builder' ),
'option_category' => 'configuration',
'depends_show_if' => 'on',
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( "Here you can designate how fast the slider fades between each slide, if 'Automatic Animation' option is enabled above. The higher the number the longer the pause between each rotation.", 'et_builder' ),
$additional_options['auto_ignore_hover'] = array(
'label' => esc_html__( 'Continue Automatic Slide on Hover', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'depends_show_if' => 'on',
'off' => et_builder_i18n( 'Off' ),
'on' => et_builder_i18n( 'On' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( 'Turning this on will allow automatic sliding to continue on mouse hover.', 'et_builder' ),
if ( isset( $this->slug ) && 'et_pb_team_member' === $this->slug ) {
$additional_options['animation'] = array(
'label' => esc_html__( 'Image Animation', 'et_builder' ),
'option_category' => 'configuration',
'off' => esc_html__( 'No Animation', 'et_builder' ),
'fade_in' => esc_html__( 'Fade In', 'et_builder' ),
'left' => esc_html__( 'Left To Right', 'et_builder' ),
'right' => esc_html__( 'Right To Left', 'et_builder' ),
'top' => esc_html__( 'Top To Bottom', 'et_builder' ),
'bottom' => esc_html__( 'Bottom To Top', 'et_builder' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'animation',
'description' => esc_html__( 'This controls the direction of the lazy-loading animation.', 'et_builder' ),
$this->_additional_fields_options = array_merge( $this->_additional_fields_options, $additional_options );
private function _add_additional_transition_fields() {
if ( ! isset( $i18n['transition'] ) ) {
// phpcs:disable WordPress.WP.I18n.MissingTranslatorsComment
$i18n['transition'] = array(
'title' => esc_html__( 'Transitions', 'et_builder' ),
'label' => esc_html__( 'Transition Duration', 'et_builder' ),
'description' => esc_html__( 'This controls the transition duration of the hover animation.', 'et_builder' ),
'label' => esc_html__( 'Transition Delay', 'et_builder' ),
'description' => esc_html__( 'This controls the transition delay of the hover animation.', 'et_builder' ),
'label' => esc_html__( 'Transition Speed Curve', 'et_builder' ),
'description' => esc_html__( 'This controls the transition speed curve of the hover animation.', 'et_builder' ),
$this->settings_modal_toggles['custom_css']['toggles']['hover_transitions'] = array(
'title' => $i18n['transition']['toggle']['title'],
$additional_options = array();
$additional_options['hover_transition_duration'] = array(
'label' => $i18n['transition']['duration']['label'],
'description' => $i18n['transition']['duration']['description'],
'option_category' => 'layout',
'range_settings' => array(
'default_on_child' => true,
'tab_slug' => 'custom_css',
'toggle_slug' => 'hover_transitions',
'depends_default' => null,
'mobile_options' => true,
$additional_options['hover_transition_delay'] = array(
'label' => $i18n['transition']['delay']['label'],
'description' => $i18n['transition']['delay']['description'],
'option_category' => 'layout',
'range_settings' => array(
'default_on_child' => true,
'tab_slug' => 'custom_css',
'toggle_slug' => 'hover_transitions',
'depends_default' => null,
'mobile_options' => true,
$additional_options['hover_transition_speed_curve'] = array(
'label' => $i18n['transition']['curve']['label'],
'description' => $i18n['transition']['curve']['description'],
'option_category' => 'layout',
'default_on_child' => true,
'ease-in-out' => et_builder_i18n( 'Ease-In-Out' ),
'ease' => et_builder_i18n( 'Ease' ),
'ease-in' => et_builder_i18n( 'Ease-In' ),
'ease-out' => et_builder_i18n( 'Ease-Out' ),
'linear' => et_builder_i18n( 'Linear' ),
'tab_slug' => 'custom_css',
'toggle_slug' => 'hover_transitions',
'depends_default' => null,
'mobile_options' => true,
$this->_additional_fields_options = array_merge( $this->_additional_fields_options, $additional_options );
* Add CSS position controls affects top,right,bottom,left,position and transform translate CSS properties.
private function _add_position_fields() {
/** @var $class ET_Builder_Module_Field_Position */
$class = ET_Builder_Module_Fields_Factory::get( 'Position' );
$this->advanced_fields[ $class::TOGGLE_SLUG ] = self::$_->array_get( $this->advanced_fields, $class::TOGGLE_SLUG, array() );
$this->advanced_fields['z_index'] = self::$_->array_get( $this->advanced_fields, 'z_index', array() );
// Position and Z Index Disabled
if ( ! is_array( $this->advanced_fields[ $class::TOGGLE_SLUG ] ) && ! is_array( $this->advanced_fields['z_index'] ) ) {
$this->settings_modal_toggles[ $class::TAB_SLUG ]['toggles'][ $class::TOGGLE_SLUG ] = array(
'title' => et_builder_i18n( 'Position' ),
$default_position = self::$_->array_get( $this->advanced_fields[ $class::TOGGLE_SLUG ], 'default', 'none' );
$default_z_index = self::$_->array_get( $this->advanced_fields['z_index'], 'default', '' );
'positioning' => $default_position, // none | relative | absolute | fixed
'position_origin' => 'top_left',
'horizontal_offset' => '',
'z_index' => $default_z_index,
'hide_position_fields' => false === $this->advanced_fields[ $class::TOGGLE_SLUG ],
'hide_z_index_fields' => false === $this->advanced_fields['z_index'],
$this->_additional_fields_options = array_merge( $this->_additional_fields_options, $class->get_fields( $args ) );
* Add CSS filter controls (i.e. saturation, brightness, opacity) to the `_additional_fields_options` array.
* @since 3.23 Introduce responsive settings on all animation options. Add allowed CSS unit for
protected function _add_filter_fields() {
// Filter fields are added by default if module has partial or full VB support
if ( $this->has_vb_support() ) {
$this->advanced_fields['filters'] = self::$_->array_get( $this->advanced_fields, 'filters', array() );