Advertisement
SRD75

AgriminStaff.php

Nov 23rd, 2020 (edited)
1,363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 19.51 KB | None | 0 0
  1. <?php
  2.  
  3. class ET_Builder_Module_Agrimin_Staff extends ET_Builder_Module {
  4.     function init() {
  5.         $this->name       = esc_html__( 'Agrimin Staff', 'et_builder' );
  6.         $this->plural     = esc_html__( 'Agrimin Staff Members', 'et_builder' );
  7.         $this->slug       = 'et_pb_agrimin_staff';
  8.         $this->vb_support = 'on';
  9.  
  10.         $this->main_css_element = '%%order_class%%.et_pb_team_member';
  11.  
  12.         $this->settings_modal_toggles = array(
  13.             'general'    => array(
  14.                 'toggles' => array(
  15.                     'main_content' => et_builder_i18n( 'Text' ),
  16.                     'image'        => et_builder_i18n( 'Image' ),
  17.                 ),
  18.             ),
  19.             'advanced'   => array(
  20.                 'toggles' => array(
  21.                     'icon'  => esc_html__( 'Icon', 'et_builder' ),
  22.                     'image' => et_builder_i18n( 'Image' ),
  23.                     'text'  => array(
  24.                         'title'    => et_builder_i18n( 'Text' ),
  25.                         'priority' => 49,
  26.                     ),
  27.                 ),
  28.             ),
  29.             'custom_css' => array(
  30.                 'toggles' => array(
  31.                     'animation' => array(
  32.                         'title'    => esc_html__( 'Image Animation', 'et_builder' ),
  33.                         'priority' => 90,
  34.                     ),
  35.                 ),
  36.             ),
  37.         );
  38.  
  39.         $this->advanced_fields = array(
  40.             'fonts'          => array(
  41.                 'header'   => array(
  42.                     'label'        => et_builder_i18n( 'Title' ),
  43.                     'css'          => array(
  44.                         'main'      => "{$this->main_css_element} h4, {$this->main_css_element} h1.et_pb_module_header, {$this->main_css_element} h2.et_pb_module_header, {$this->main_css_element} h3.et_pb_module_header, {$this->main_css_element} h5.et_pb_module_header, {$this->main_css_element} h6.et_pb_module_header",
  45.                         'important' => 'plugin_only',
  46.                     ),
  47.                     'header_level' => array(
  48.                         'default' => 'h4',
  49.                     ),
  50.                 ),
  51.                 'body'     => array(
  52.                     'label'          => et_builder_i18n( 'Body' ),
  53.                     'css'            => array(
  54.                         'main' => "{$this->main_css_element}",
  55.                     ),
  56.                     'block_elements' => array(
  57.                         'tabbed_subtoggles' => true,
  58.                         'bb_icons_support'  => true,
  59.                     ),
  60.                 ),
  61.                 'position' => array(
  62.                     'label'          => et_builder_i18n( 'Position' ),
  63.                     'css'            => array(
  64.                         'main' => "{$this->main_css_element} .et_pb_member_position",
  65.                     ),
  66.                     'line_height'    => array(
  67.                         'default' => '1.7em',
  68.                     ),
  69.                     'font_size'      => array(
  70.                         'default' => absint( et_get_option( 'body_font_size', '14' ) ) . 'px',
  71.                     ),
  72.                     'letter_spacing' => array(
  73.                         'default' => '0px',
  74.                     ),
  75.                 ),
  76.             ),
  77.             'background'     => array(
  78.                 'settings' => array(
  79.                     'color' => 'alpha',
  80.                 ),
  81.             ),
  82.             'borders'        => array(
  83.                 'default' => array(),
  84.                 'image'   => array(
  85.                     'css'          => array(
  86.                         'main' => array(
  87.                             'border_radii'  => "{$this->main_css_element} .et_pb_team_member_image",
  88.                             'border_styles' => "{$this->main_css_element} .et_pb_team_member_image",
  89.                         ),
  90.                     ),
  91.                     'label_prefix' => et_builder_i18n( 'Image' ),
  92.                     'tab_slug'     => 'advanced',
  93.                     'toggle_slug'  => 'image',
  94.                 ),
  95.             ),
  96.             'box_shadow'     => array(
  97.                 'default' => array(),
  98.                 'image'   => array(
  99.                     'label'             => esc_html__( 'Image Box Shadow', 'et_builder' ),
  100.                     'option_category'   => 'layout',
  101.                     'tab_slug'          => 'advanced',
  102.                     'toggle_slug'       => 'image',
  103.                     'css'               => array(
  104.                         'main'         => '%%order_class%% .et_pb_team_member_image',
  105.                         'custom_style' => true,
  106.                     ),
  107.                     'default_on_fronts' => array(
  108.                         'color'    => '',
  109.                         'position' => '',
  110.                     ),
  111.                 ),
  112.             ),
  113.             'margin_padding' => array(
  114.                 'css' => array(
  115.                     'important' => 'all',
  116.                 ),
  117.             ),
  118.             'max_width'      => array(
  119.                 'css' => array(
  120.                     'module_alignment' => '%%order_class%%.et_pb_team_member.et_pb_module',
  121.                 ),
  122.             ),
  123.             'text'           => array(
  124.                 'use_background_layout' => true,
  125.                 'options'               => array(
  126.                     'background_layout' => array(
  127.                         'default' => 'light',
  128.                         'hover'   => 'tabs',
  129.                     ),
  130.                 ),
  131.                 'css'                   => array(
  132.                     'main' => implode(
  133.                         ', ',
  134.                         array(
  135.                             '%%order_class%% .et_pb_module_header',
  136.                             '%%order_class%% .et_pb_member_position',
  137.                             '%%order_class%% .et_pb_team_member_description p',
  138.                         )
  139.                     ),
  140.                 ),
  141.             ),
  142.             'filters'        => array(
  143.                 'css'                  => array(
  144.                     'main' => '%%order_class%%',
  145.                 ),
  146.                 'child_filters_target' => array(
  147.                     'tab_slug'    => 'advanced',
  148.                     'toggle_slug' => 'image',
  149.                 ),
  150.             ),
  151.             'image'          => array(
  152.                 'css' => array(
  153.                     'main' => '%%order_class%% .et_pb_team_member_image',
  154.                 ),
  155.             ),
  156.             'button'         => false,
  157.         );
  158.  
  159.         $this->custom_css_fields = array(
  160.             'member_image'        => array(
  161.                 'label'    => esc_html__( 'Member Image', 'et_builder' ),
  162.                 'selector' => '.et_pb_team_member_image',
  163.             ),
  164.             'member_description'  => array(
  165.                 'label'    => esc_html__( 'Member Description', 'et_builder' ),
  166.                 'selector' => '.et_pb_team_member_description',
  167.             ),
  168.             'title'               => array(
  169.                 'label'    => et_builder_i18n( 'Title' ),
  170.                 'selector' => '.et_pb_team_member_description h4',
  171.             ),
  172.             'member_position'     => array(
  173.                 'label'    => esc_html__( 'Member Position', 'et_builder' ),
  174.                 'selector' => '.et_pb_member_position',
  175.             ),
  176.             'member_social_links' => array(
  177.                 'label'    => esc_html__( 'Member Social Links', 'et_builder' ),
  178.                 'selector' => '.et_pb_member_social_links',
  179.             ),
  180.         );
  181.  
  182.         $this->help_videos = array(
  183.             array(
  184.                 'id'   => 'rrKmaQ0n7Hw',
  185.                 'name' => esc_html__( 'An introduction to the Person module', 'et_builder' ),
  186.             ),
  187.         );
  188.     }
  189.  
  190.     function get_fields() {
  191.         $fields = array(
  192.             'name'               => array(
  193.                 'label'           => esc_html__( 'Name', 'et_builder' ),
  194.                 'type'            => 'text',
  195.                 'option_category' => 'basic_option',
  196.                 'description'     => esc_html__( 'Input the name of the person', 'et_builder' ),
  197.                 'toggle_slug'     => 'main_content',
  198.                 'dynamic_content' => 'text',
  199.                 'mobile_options'  => true,
  200.                 'hover'           => 'tabs',
  201.             ),
  202.             'position'           => array(
  203.                 'label'           => et_builder_i18n( 'Position' ),
  204.                 'type'            => 'text',
  205.                 'option_category' => 'basic_option',
  206.                 'description'     => esc_html__( "Input the person's position.", 'et_builder' ),
  207.                 'toggle_slug'     => 'main_content',
  208.                 'dynamic_content' => 'text',
  209.                 'mobile_options'  => true,
  210.                 'hover'           => 'tabs',
  211.             ),
  212.             'image_url'          => array(
  213.                 'label'              => et_builder_i18n( 'Image' ),
  214.                 'type'               => 'upload',
  215.                 'option_category'    => 'basic_option',
  216.                 'upload_button_text' => et_builder_i18n( 'Upload an image' ),
  217.                 'choose_text'        => esc_attr__( 'Choose an Image', 'et_builder' ),
  218.                 'update_text'        => esc_attr__( 'Set As Image', 'et_builder' ),
  219.                 'description'        => esc_html__( 'Upload your desired image, or type in the URL to the image you would like to display.', 'et_builder' ),
  220.                 'toggle_slug'        => 'image',
  221.                 'dynamic_content'    => 'image',
  222.                 'mobile_options'     => true,
  223.                 'hover'              => 'tabs',
  224.             ),
  225.             'facebook_url'       => array(
  226.                 'label'           => esc_html__( 'Facebook Profile Url', 'et_builder' ),
  227.                 'type'            => 'text',
  228.                 'option_category' => 'basic_option',
  229.                 'description'     => esc_html__( 'Input Facebook Profile Url.', 'et_builder' ),
  230.                 'toggle_slug'     => 'main_content',
  231.                 'dynamic_content' => 'url',
  232.             ),
  233.             'twitter_url'        => array(
  234.                 'label'           => esc_html__( 'Twitter Profile Url', 'et_builder' ),
  235.                 'type'            => 'text',
  236.                 'option_category' => 'basic_option',
  237.                 'description'     => esc_html__( 'Input Twitter Profile Url', 'et_builder' ),
  238.                 'toggle_slug'     => 'main_content',
  239.                 'dynamic_content' => 'url',
  240.             ),
  241.             'google_url'         => array(
  242.                 'label'           => esc_html__( 'Google+ Profile Url', 'et_builder' ),
  243.                 'type'            => 'text',
  244.                 'option_category' => 'basic_option',
  245.                 'description'     => esc_html__( 'Input Google+ Profile Url', 'et_builder' ),
  246.                 'toggle_slug'     => 'main_content',
  247.                 'dynamic_content' => 'url',
  248.             ),
  249.             'linkedin_url'       => array(
  250.                 'label'           => esc_html__( 'LinkedIn Profile Url', 'et_builder' ),
  251.                 'type'            => 'text',
  252.                 'option_category' => 'basic_option',
  253.                 'description'     => esc_html__( 'Input LinkedIn Profile Url', 'et_builder' ),
  254.                 'toggle_slug'     => 'main_content',
  255.                 'dynamic_content' => 'url',
  256.             ),
  257.             'content'            => array(
  258.                 'label'           => et_builder_i18n( 'Body' ),
  259.                 'type'            => 'tiny_mce',
  260.                 'option_category' => 'basic_option',
  261.                 'description'     => esc_html__( 'Input the main text content for your module here.', 'et_builder' ),
  262.                 'toggle_slug'     => 'main_content',
  263.                 'dynamic_content' => 'text',
  264.                 'mobile_options'  => true,
  265.                 'hover'           => 'tabs',
  266.             ),
  267.             'icon_color'         => array(
  268.                 'label'          => esc_html__( 'Icon Color', 'et_builder' ),
  269.                 'description'    => esc_html__( 'Here you can define a custom color for the icon.', 'et_builder' ),
  270.                 'type'           => 'color-alpha',
  271.                 'custom_color'   => true,
  272.                 'tab_slug'       => 'advanced',
  273.                 'toggle_slug'    => 'icon',
  274.                 'hover'          => 'tabs',
  275.                 'mobile_options' => true,
  276.                 'sticky'         => true,
  277.             ),
  278.             'use_icon_font_size' => array(
  279.                 'label'            => esc_html__( 'Use Icon Font Size', 'et_builder' ),
  280.                 'description'      => esc_html__( 'If you would like to control the size of the icon, you must first enable this option.', 'et_builder' ),
  281.                 'type'             => 'yes_no_button',
  282.                 'options'          => array(
  283.                     'off' => et_builder_i18n( 'No' ),
  284.                     'on'  => et_builder_i18n( 'Yes' ),
  285.                 ),
  286.                 'default_on_front' => 'off',
  287.                 'affects'          => array(
  288.                     'icon_font_size',
  289.                 ),
  290.                 'depends_show_if'  => 'on',
  291.                 'tab_slug'         => 'advanced',
  292.                 'toggle_slug'      => 'icon',
  293.                 'option_category'  => 'font_option',
  294.             ),
  295.             'icon_font_size'     => array(
  296.                 'label'            => esc_html__( 'Icon Font Size', 'et_builder' ),
  297.                 'description'      => esc_html__( 'Control the size of the icon by increasing or decreasing the font size.', 'et_builder' ),
  298.                 'type'             => 'range',
  299.                 'option_category'  => 'font_option',
  300.                 'tab_slug'         => 'advanced',
  301.                 'toggle_slug'      => 'icon',
  302.                 'allowed_units'    => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
  303.                 'default'          => '16px',
  304.                 'default_unit'     => 'px',
  305.                 'default_on_front' => '',
  306.                 'range_settings'   => array(
  307.                     'min'  => '1',
  308.                     'max'  => '120',
  309.                     'step' => '1',
  310.                 ),
  311.                 'mobile_options'   => true,
  312.                 'depends_show_if'  => 'on',
  313.                 'responsive'       => true,
  314.                 'sticky'           => true,
  315.                 'hover'            => 'tabs',
  316.             ),
  317.         );
  318.  
  319.         return $fields;
  320.     }
  321.  
  322.     public function get_transition_fields_css_props() {
  323.         $fields = parent::get_transition_fields_css_props();
  324.  
  325.         $fields['icon_color']     = array( 'color' => '%%order_class%% .et_pb_member_social_links a' );
  326.         $fields['icon_font_size'] = array( 'font-size' => '%%order_class%% .et_pb_member_social_links a' );
  327.  
  328.         return $fields;
  329.     }
  330.  
  331.     function render( $attrs, $content = null, $render_slug ) {
  332.         $multi_view         = et_pb_multi_view_options( $this );
  333.         $name               = $multi_view->render_element(
  334.             array(
  335.                 'tag'     => et_pb_process_header_level( $this->props['header_level'], 'h3' ),
  336.                 'content' => '{{name}}',
  337.                 'attrs'   => array(
  338.                     'class' => 'et_pb_module_header',
  339.                 ),
  340.             )
  341.         );
  342.         $position           = $multi_view->render_element(
  343.             array(
  344.                 'tag'     => 'h4',
  345.                 'content' => '{{position}}',
  346.                 'attrs'   => array(
  347.                     'class' => 'et_pb_member_position',
  348.                 ),
  349.             )
  350.         );
  351.         $image_url          = $this->props['image_url'];
  352.         $animation          = $this->props['animation'];
  353.         $facebook_url       = $this->props['facebook_url'];
  354.         $twitter_url        = $this->props['twitter_url'];
  355.         $google_url         = $this->props['google_url'];
  356.         $linkedin_url       = $this->props['linkedin_url'];
  357.         $use_icon_font_size = $this->props['use_icon_font_size'];
  358.  
  359.         $image = $social_links = '';
  360.  
  361.         // Icon Color.
  362.         $this->generate_styles(
  363.             array(
  364.                 'base_attr_name'                  => 'icon_color',
  365.                 'selector'                        => '%%order_class%% .et_pb_member_social_links a',
  366.                 'hover_pseudo_selector_location'  => 'suffix',
  367.                 'sticky_pseudo_selector_location' => 'prefix',
  368.                 'css_property'                    => 'color',
  369.                 'important'                       => true,
  370.                 'render_slug'                     => $render_slug,
  371.                 'type'                            => 'color',
  372.             )
  373.         );
  374.  
  375.         if ( '' !== $facebook_url ) {
  376.             $social_links .= sprintf(
  377.                 '<li><a href="%1$s" class="et_pb_font_icon et_pb_facebook_icon"><span>%2$s</span></a></li>',
  378.                 esc_url( $facebook_url ),
  379.                 esc_html__( 'Facebook', 'et_builder' )
  380.             );
  381.         }
  382.  
  383.         if ( '' !== $twitter_url ) {
  384.             $social_links .= sprintf(
  385.                 '<li><a href="%1$s" class="et_pb_font_icon et_pb_twitter_icon"><span>%2$s</span></a></li>',
  386.                 esc_url( $twitter_url ),
  387.                 esc_html__( 'Twitter', 'et_builder' )
  388.             );
  389.         }
  390.  
  391.         if ( '' !== $google_url ) {
  392.             $social_links .= sprintf(
  393.                 '<li><a href="%1$s" class="et_pb_font_icon et_pb_google_icon"><span>%2$s</span></a></li>',
  394.                 esc_url( $google_url ),
  395.                 esc_html__( 'Google+', 'et_builder' )
  396.             );
  397.         }
  398.  
  399.         if ( '' !== $linkedin_url ) {
  400.             $social_links .= sprintf(
  401.                 '<li><a href="%1$s" class="et_pb_font_icon et_pb_linkedin_icon"><span>%2$s</span></a></li>',
  402.                 esc_url( $linkedin_url ),
  403.                 esc_html__( 'LinkedIn', 'et_builder' )
  404.             );
  405.         }
  406.  
  407.         if ( '' !== $social_links ) {
  408.             $social_links = sprintf( '<ul class="et_pb_member_social_links">%1$s</ul>', $social_links );
  409.         }
  410.  
  411.         // Icon Size.
  412.         if ( 'off' !== $use_icon_font_size ) {
  413.             $this->generate_styles(
  414.                 array(
  415.                     'base_attr_name'                  => 'icon_font_size',
  416.                     'selector'                        => '%%order_class%% .et_pb_member_social_links .et_pb_font_icon',
  417.                     'hover_pseudo_selector_location'  => 'suffix',
  418.                     'sticky_pseudo_selector_location' => 'prefix',
  419.                     'css_property'                    => 'font-size',
  420.                     'render_slug'                     => $render_slug,
  421.                     'type'                            => 'range',
  422.                 )
  423.             );
  424.         }
  425.  
  426.         // Added for backward compatibility
  427.         if ( empty( $animation ) ) {
  428.             $animation = 'top';
  429.         }
  430.  
  431.         if ( $multi_view->has_value( 'image_url' ) ) {
  432.             $team_member_image_classes = array(
  433.                 'et_pb_team_member_image',
  434.                 'et-waypoint',
  435.                 'et_pb_animation_' . $animation,
  436.             );
  437.  
  438.             // Images: Add CSS Filters and Mix Blend Mode rules (if set)
  439.             if ( array_key_exists( 'image', $this->advanced_fields ) && array_key_exists( 'css', $this->advanced_fields['image'] ) ) {
  440.                 $generate_css_filters = $this->generate_css_filters(
  441.                     $render_slug,
  442.                     'child_',
  443.                     self::$data_utils->array_get( $this->advanced_fields['image']['css'], 'main', '%%order_class%%' )
  444.                 );
  445.  
  446.                 if ( $generate_css_filters ) {
  447.                     $team_member_image_classes[] = $generate_css_filters;
  448.                 }
  449.             }
  450.  
  451.             $image_attrs = array(
  452.                 'src' => '{{image_url}}',
  453.                 'alt' => '{{name}}',
  454.             );
  455.  
  456.             $image_attachment_class = et_pb_media_options()->get_image_attachment_class( $this->props, 'image_url' );
  457.  
  458.             if ( ! empty( $image_attachment_class ) ) {
  459.                 $image_attrs['class'] = esc_attr( $image_attachment_class );
  460.             }
  461.  
  462.             $image = $multi_view->render_element(
  463.                 array(
  464.                     'tag'     => 'div',
  465.                     'content' => $multi_view->render_element(
  466.                         array(
  467.                             'tag'   => 'img',
  468.                             'attrs' => $image_attrs,
  469.                         )
  470.                     ),
  471.                     'attrs'   => array(
  472.                         'class' => implode( ' ', $team_member_image_classes ),
  473.                     ),
  474.                     'classes' => array(
  475.                         'et-svg' => array(
  476.                             'image_url' => true,
  477.                         ),
  478.                     ),
  479.                 )
  480.             );
  481.         }
  482.  
  483.         $video_background          = $this->video_background();
  484.         $parallax_image_background = $this->get_parallax_image_background();
  485.  
  486.         // Module classnames
  487.         $this->add_classname(
  488.             array(
  489.                 'clearfix',
  490.                 $this->get_text_orientation_classname(),
  491.             )
  492.         );
  493.  
  494.         // Background layout class names.
  495.         $background_layout_class_names = et_pb_background_layout_options()->get_background_layout_class( $this->props );
  496.         $this->add_classname( $background_layout_class_names );
  497.  
  498.         if ( '' === $image ) {
  499.             $this->add_classname( 'et_pb_team_member_no_image' );
  500.         }
  501.  
  502.         // Background layout data attributes.
  503.         $data_background_layout = et_pb_background_layout_options()->get_background_layout_attrs( $this->props );
  504.  
  505.         $content = $multi_view->render_element(
  506.             array(
  507.                 'tag'     => 'div',
  508.                 'content' => '{{content}}',
  509.             )
  510.         );
  511.  
  512.         $muti_view_data_attr = $multi_view->render_attrs(
  513.             array(
  514.                 'classes' => array(
  515.                     'et_pb_team_member_no_image' => array(
  516.                         'image' => '__empty',
  517.                     ),
  518.                 ),
  519.             )
  520.         );
  521.  
  522.         $output = sprintf(
  523.             '<div%3$s class="%4$s"%10$s%11$s>
  524.                 %9$s
  525.                 %8$s
  526.                 %2$s
  527.                 <div class="et_pb_team_member_description">
  528.                     %5$s
  529.                     %6$s
  530.                     %1$s
  531.                     %7$s
  532.                 </div> <!-- .et_pb_team_member_description -->
  533.             </div> <!-- .et_pb_team_member -->',
  534.             $content,
  535.             et_core_esc_previously( $image ),
  536.             $this->module_id(),
  537.             $this->module_classname( $render_slug ),
  538.             et_core_esc_previously( $position ),
  539.             et_core_esc_previously( $name ), // #5
  540.             $social_links,
  541.             $video_background,
  542.             $parallax_image_background,
  543.             et_core_esc_previously( $data_background_layout ), // #10
  544.             et_core_esc_previously( $muti_view_data_attr )
  545.         );
  546.  
  547.         return $output;
  548.     }
  549.  
  550.     /**
  551.      * Check if image has svg extension
  552.      *
  553.      * @param string $image_url Image URL.
  554.      *
  555.      * @return bool
  556.      */
  557.     public function is_svg( $image_url ) {
  558.         if ( ! $image_url ) {
  559.             return false;
  560.         }
  561.  
  562.         $image_pathinfo = pathinfo( $image_url );
  563.  
  564.         return isset( $image_pathinfo['extension'] ) ? 'svg' === $image_pathinfo['extension'] : false;
  565.     }
  566.  
  567.     /**
  568.      * Filter multi view value.
  569.      *
  570.      * @since 3.27.1
  571.      *
  572.      * @see ET_Builder_Module_Helper_MultiViewOptions::filter_value
  573.      *
  574.      * @param mixed                                     $raw_value Props raw value.
  575.      * @param array                                     $args {
  576.      *                                         Context data.
  577.      *
  578.      *     @type string $context      Context param: content, attrs, visibility, classes.
  579.      *     @type string $name         Module options props name.
  580.      *     @type string $mode         Current data mode: desktop, hover, tablet, phone.
  581.      *     @type string $attr_key     Attribute key for attrs context data. Example: src, class, etc.
  582.      *     @type string $attr_sub_key Attribute sub key that availabe when passing attrs value as array such as styes. Example: padding-top, margin-botton, etc.
  583.      * }
  584.      * @param ET_Builder_Module_Helper_MultiViewOptions $multi_view Multiview object instance.
  585.      *
  586.      * @return mixed
  587.      */
  588.     public function multi_view_filter_value( $raw_value, $args, $multi_view ) {
  589.         $name    = et_()->array_get( $args, 'name', '' );
  590.         $mode    = et_()->array_get( $args, 'mode', '' );
  591.         $context = et_()->array_get( $args, 'context', '' );
  592.  
  593.         $fields_need_escape = array(
  594.             'name',
  595.             'position',
  596.         );
  597.  
  598.         if ( $raw_value && in_array( $name, $fields_need_escape, true ) ) {
  599.             return $this->_esc_attr( $multi_view->get_name_by_mode( $name, $mode ), 'none', $raw_value );
  600.         }
  601.  
  602.         if ( 'image_url' === $name && 'classes' === $context ) {
  603.             $raw_value = $raw_value ? $this->is_svg( $raw_value ) : false;
  604.         }
  605.  
  606.         return $raw_value;
  607.     }
  608. }
  609.  
  610. new ET_Builder_Module_Team_Member();
  611.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement