EduardET

Custom Team Member with custom social Links

Feb 16th, 2018
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 19.43 KB | None | 0 0
  1. <?php
  2.  
  3. class WPC_ET_Builder_Module_Team_Member extends ET_Builder_Module {
  4.     function init() {
  5.         $this->name       = esc_html__( 'WPC Person', 'et_builder' );
  6.         $this->slug       = 'et_pb_team_member_wpc';
  7.         $this->fb_support = false;
  8.  
  9.         $this->whitelisted_fields = array(
  10.             'name',
  11.             'position',
  12.             'image_url',
  13.             'animation',
  14.             'background_layout',
  15.             'facebook_url',
  16.             'twitter_url',
  17.             'google_url',
  18.             'linkedin_url',
  19.             'instagram_url',
  20.             'youtube_url',
  21.             'website_url',
  22.             'email_url',
  23.             'content_new',
  24.             'admin_label',
  25.             'module_id',
  26.             'module_class',
  27.             'icon_color',
  28.             'icon_hover_color',
  29.             'box_shadow_style_image',
  30.             'box_shadow_horizontal_image',
  31.             'box_shadow_vertical_image',
  32.             'box_shadow_blur_image',
  33.             'box_shadow_spread_image',
  34.             'box_shadow_color_image',
  35.             'box_shadow_position_image',
  36.         );
  37.  
  38.         $this->fields_defaults = array(
  39.             'animation'         => array( 'off' ),
  40.             'background_layout' => array( 'light' ),
  41.         );
  42.  
  43.         $this->main_css_element = '%%order_class%%.et_pb_team_member';
  44.  
  45.         $this->options_toggles = array(
  46.             'general'  => array(
  47.                 'toggles' => array(
  48.                     'main_content' => esc_html__( 'Text', 'et_builder' ),
  49.                     'image'        => esc_html__( 'Image', 'et_builder' ),
  50.                 ),
  51.             ),
  52.             'advanced' => array(
  53.                 'toggles' => array(
  54.                     'icon'  => esc_html__( 'Icon', 'et_builder' ),
  55.                     'image' => esc_html__( 'Image', 'et_builder' ),
  56.                     'text'  => array(
  57.                         'title'    => esc_html__( 'Text', 'et_builder' ),
  58.                         'priority' => 49,
  59.                     ),
  60.                 ),
  61.             ),
  62.             'custom_css' => array(
  63.                 'toggles' => array(
  64.                     'animation' => array(
  65.                         'title'    => esc_html__( 'Animation', 'et_builder' ),
  66.                         'priority' => 90,
  67.                     ),
  68.                 ),
  69.             ),
  70.         );
  71.  
  72.         $this->advanced_options = array(
  73.             'fonts' => array(
  74.                 'header' => array(
  75.                     'label'    => esc_html__( 'Title', 'et_builder' ),
  76.                     'css'      => array(
  77.                         '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",
  78.                         'important' => 'plugin_only',
  79.                     ),
  80.                     'header_level' => array(
  81.                         'default' => 'h4',
  82.                     ),
  83.                 ),
  84.                 'body'   => array(
  85.                     'label'    => esc_html__( 'Body', 'et_builder' ),
  86.                     'css'      => array(
  87.                         'main' => "{$this->main_css_element} *",
  88.                     ),
  89.                 ),
  90.             ),
  91.             'background' => array(
  92.                 'settings' => array(
  93.                     'color' => 'alpha',
  94.                 ),
  95.             ),
  96.             'custom_margin_padding' => array(
  97.                 'css' => array(
  98.                     'important' => 'all',
  99.                 ),
  100.             ),
  101.             'max_width' => array(
  102.                 'css' => array(
  103.                     'module_alignment' => '%%order_class%%.et_pb_team_member.et_pb_module',
  104.                 ),
  105.             ),
  106.             'text'      => array(),
  107.             'filters' => array(
  108.                 'css' => array(
  109.                     'main' => '%%order_class%%',
  110.                 ),
  111.                 'child_filters_target' => array(
  112.                     'tab_slug' => 'advanced',
  113.                     'toggle_slug' => 'image',
  114.                 ),
  115.             ),
  116.             'image' => array(
  117.                 'css' => array(
  118.                     'main' => '%%order_class%% .et_pb_team_member_image',
  119.                 ),
  120.             ),
  121.         );
  122.  
  123.         $this->custom_css_options = array(
  124.             'member_image' => array(
  125.                 'label'    => esc_html__( 'Member Image', 'et_builder' ),
  126.                 'selector' => '.et_pb_team_member_image',
  127.             ),
  128.             'member_description' => array(
  129.                 'label'    => esc_html__( 'Member Description', 'et_builder' ),
  130.                 'selector' => '.et_pb_team_member_description',
  131.             ),
  132.             'title' => array(
  133.                 'label'    => esc_html__( 'Title', 'et_builder' ),
  134.                 'selector' => '.et_pb_team_member_description h4',
  135.             ),
  136.             'member_position' => array(
  137.                 'label'    => esc_html__( 'Member Position', 'et_builder' ),
  138.                 'selector' => '.et_pb_member_position',
  139.             ),
  140.             'member_social_links' => array(
  141.                 'label'    => esc_html__( 'Member Social Links', 'et_builder' ),
  142.                 'selector' => '.et_pb_member_social_links',
  143.             ),
  144.         );
  145.     }
  146.  
  147.     function get_fields() {
  148.         $fields = array(
  149.             'name' => array(
  150.                 'label'           => esc_html__( 'Name', 'et_builder' ),
  151.                 'type'            => 'text',
  152.                 'option_category' => 'basic_option',
  153.                 'description'     => esc_html__( 'Input the name of the person', 'et_builder' ),
  154.                 'toggle_slug'     => 'main_content',
  155.             ),
  156.             'position' => array(
  157.                 'label'           => esc_html__( 'Position', 'et_builder' ),
  158.                 'type'            => 'text',
  159.                 'option_category' => 'basic_option',
  160.                 'description'     => esc_html__( "Input the person's position.", 'et_builder' ),
  161.                 'toggle_slug'     => 'main_content',
  162.             ),
  163.             'image_url' => array(
  164.                 'label'              => esc_html__( 'Image URL', 'et_builder' ),
  165.                 'type'               => 'upload',
  166.                 'option_category'    => 'basic_option',
  167.                 'upload_button_text' => esc_attr__( 'Upload an image', 'et_builder' ),
  168.                 'choose_text'        => esc_attr__( 'Choose an Image', 'et_builder' ),
  169.                 'update_text'        => esc_attr__( 'Set As Image', 'et_builder' ),
  170.                 'description'        => esc_html__( 'Upload your desired image, or type in the URL to the image you would like to display.', 'et_builder' ),
  171.                 'toggle_slug'        => 'image',
  172.             ),
  173.             'background_layout' => array(
  174.                 'label'           => esc_html__( 'Text Color', 'et_builder' ),
  175.                 'type'            => 'select',
  176.                 'option_category' => 'color_option',
  177.                 'options'           => array(
  178.                     'light' => esc_html__( 'Dark', 'et_builder' ),
  179.                     'dark'  => esc_html__( 'Light', 'et_builder' ),
  180.                 ),
  181.                 'tab_slug'        => 'advanced',
  182.                 'toggle_slug'     => 'text',
  183.                 'description'     => esc_html__( 'Here you can choose the value of your text. If you are working with a dark background, then your text should be set to light. If you are working with a light background, then your text should be dark.', 'et_builder' ),
  184.             ),
  185.             'facebook_url' => array(
  186.                 'label'           => esc_html__( 'Facebook Profile Url', 'et_builder' ),
  187.                 'type'            => 'text',
  188.                 'option_category' => 'basic_option',
  189.                 'description'     => esc_html__( 'Input Facebook Profile Url.', 'et_builder' ),
  190.                 'toggle_slug'     => 'main_content',
  191.             ),
  192.             'twitter_url' => array(
  193.                 'label'           => esc_html__( 'Twitter Profile Url', 'et_builder' ),
  194.                 'type'            => 'text',
  195.                 'option_category' => 'basic_option',
  196.                 'description'     => esc_html__( 'Input Twitter Profile Url', 'et_builder' ),
  197.                 'toggle_slug'     => 'main_content',
  198.             ),
  199.             'google_url' => array(
  200.                 'label'           => esc_html__( 'Google+ Profile Url', 'et_builder' ),
  201.                 'type'            => 'text',
  202.                 'option_category' => 'basic_option',
  203.                 'description'     => esc_html__( 'Input Google+ Profile Url', 'et_builder' ),
  204.                 'toggle_slug'     => 'main_content',
  205.             ),
  206.             'linkedin_url' => array(
  207.                 'label'           => esc_html__( 'LinkedIn Profile Url', 'et_builder' ),
  208.                 'type'            => 'text',
  209.                 'option_category' => 'basic_option',
  210.                 'description'     => esc_html__( 'Input LinkedIn Profile Url', 'et_builder' ),
  211.                 'toggle_slug'     => 'main_content',
  212.             ),
  213.             'instagram_url' => array(
  214.                 'label'           => esc_html__( 'Instagram Profile Url', 'et_builder' ),
  215.                 'type'            => 'text',
  216.                 'option_category' => 'basic_option',
  217.                 'description'     => esc_html__( 'Input Instagram Profile Url', 'et_builder' ),
  218.                 'toggle_slug'     => 'main_content',
  219.             ),
  220.             'youtube_url' => array(
  221.                 'label'           => esc_html__( 'YouTube Profile Url', 'et_builder' ),
  222.                 'type'            => 'text',
  223.                 'option_category' => 'basic_option',
  224.                 'description'     => esc_html__( 'Input YouTube Profile Url', 'et_builder' ),
  225.                 'toggle_slug'     => 'main_content',
  226.             ),
  227.             'website_url' => array(
  228.                 'label'           => esc_html__( 'Website Profile Url', 'et_builder' ),
  229.                 'type'            => 'text',
  230.                 'option_category' => 'basic_option',
  231.                 'description'     => esc_html__( 'Input Website Profile Url', 'et_builder' ),
  232.                 'toggle_slug'     => 'main_content',
  233.             ),
  234.             'email_url' => array(
  235.                 'label'           => esc_html__( 'Email Profile Url', 'et_builder' ),
  236.                 'type'            => 'text',
  237.                 'option_category' => 'basic_option',
  238.                 'description'     => esc_html__( 'Input Email Profile Url', 'et_builder' ),
  239.                 'toggle_slug'     => 'main_content',
  240.             ),
  241.             'content_new' => array(
  242.                 'label'           => esc_html__( 'Description', 'et_builder' ),
  243.                 'type'            => 'tiny_mce',
  244.                 'option_category' => 'basic_option',
  245.                 'description'     => esc_html__( 'Input the main text content for your module here.', 'et_builder' ),
  246.                 'toggle_slug'     => 'main_content',
  247.             ),
  248.             'icon_color' => array(
  249.                 'label'             => esc_html__( 'Icon Color', 'et_builder' ),
  250.                 'type'              => 'color-alpha',
  251.                 'custom_color'      => true,
  252.                 'tab_slug'          => 'advanced',
  253.                 'toggle_slug'       => 'icon',
  254.             ),
  255.             'icon_hover_color' => array(
  256.                 'label'             => esc_html__( 'Icon Hover Color', 'et_builder' ),
  257.                 'type'              => 'color-alpha',
  258.                 'custom_color'      => true,
  259.                 'tab_slug'          => 'advanced',
  260.                 'toggle_slug'       => 'icon',
  261.             ),
  262.             'disabled_on' => array(
  263.                 'label'           => esc_html__( 'Disable on', 'et_builder' ),
  264.                 'type'            => 'multiple_checkboxes',
  265.                 'options'         => array(
  266.                     'phone'   => esc_html__( 'Phone', 'et_builder' ),
  267.                     'tablet'  => esc_html__( 'Tablet', 'et_builder' ),
  268.                     'desktop' => esc_html__( 'Desktop', 'et_builder' ),
  269.                 ),
  270.                 'additional_att'  => 'disable_on',
  271.                 'option_category' => 'configuration',
  272.                 'description'     => esc_html__( 'This will disable the module on selected devices', 'et_builder' ),
  273.                 'tab_slug'        => 'custom_css',
  274.                 'toggle_slug'     => 'visibility',
  275.             ),
  276.             'admin_label' => array(
  277.                 'label'       => esc_html__( 'Admin Label', 'et_builder' ),
  278.                 'type'        => 'text',
  279.                 'description' => esc_html__( 'This will change the label of the module in the builder for easy identification.', 'et_builder' ),
  280.                 'toggle_slug' => 'admin_label',
  281.             ),
  282.             'module_id' => array(
  283.                 'label'           => esc_html__( 'CSS ID', 'et_builder' ),
  284.                 'type'            => 'text',
  285.                 'option_category' => 'configuration',
  286.                 'tab_slug'        => 'custom_css',
  287.                 'toggle_slug'     => 'classes',
  288.                 'option_class'    => 'et_pb_custom_css_regular',
  289.             ),
  290.             'module_class' => array(
  291.                 'label'           => esc_html__( 'CSS Class', 'et_builder' ),
  292.                 'type'            => 'text',
  293.                 'option_category' => 'configuration',
  294.                 'tab_slug'        => 'custom_css',
  295.                 'toggle_slug'     => 'classes',
  296.                 'option_class'    => 'et_pb_custom_css_regular',
  297.             ),
  298.         );
  299.  
  300.         $fields = array_merge( $fields, ET_Builder_Module_Fields_Factory::get( 'BoxShadow' )->get_fields( array(
  301.             'suffix'          => '_image',
  302.             'label'           => esc_html__( 'Image Box Shadow', 'et_builder' ),
  303.             'option_category' => 'layout',
  304.             'tab_slug'        => 'advanced',
  305.             'toggle_slug'     => 'image',
  306.         ) ) );
  307.  
  308.         return $fields;
  309.     }
  310.  
  311.     function shortcode_callback( $atts, $content = null, $function_name ) {
  312.         $module_id         = $this->shortcode_atts['module_id'];
  313.         $module_class      = $this->shortcode_atts['module_class'];
  314.         $name              = $this->shortcode_atts['name'];
  315.         $position          = $this->shortcode_atts['position'];
  316.         $image_url         = $this->shortcode_atts['image_url'];
  317.         $animation         = $this->shortcode_atts['animation'];
  318.         $facebook_url      = $this->shortcode_atts['facebook_url'];
  319.         $twitter_url       = $this->shortcode_atts['twitter_url'];
  320.         $google_url        = $this->shortcode_atts['google_url'];
  321.         $linkedin_url      = $this->shortcode_atts['linkedin_url'];
  322.         $instagram_url     = $this->shortcode_atts['instagram_url'];
  323.         $youtube_url       = $this->shortcode_atts['youtube_url'];
  324.         $website_url       = $this->shortcode_atts['website_url'];
  325.         $email_url         = $this->shortcode_atts['email_url'];
  326.         $background_layout = $this->shortcode_atts['background_layout'];
  327.         $icon_color        = $this->shortcode_atts['icon_color'];
  328.         $icon_hover_color  = $this->shortcode_atts['icon_hover_color'];
  329.         $header_level      = $this->shortcode_atts['header_level'];
  330.  
  331.         $module_class = ET_Builder_Element::add_module_order_class( $module_class, $function_name );
  332.  
  333.         $image = $social_links = '';
  334.  
  335.         if ( '' !== $icon_color ) {
  336.             ET_Builder_Element::set_style( $function_name, array(
  337.                 'selector'    => '%%order_class%% .et_pb_member_social_links a',
  338.                 'declaration' => sprintf(
  339.                     'color: %1$s !important;',
  340.                     esc_html( $icon_color )
  341.                 ),
  342.             ) );
  343.         }
  344.  
  345.         if ( '' !== $icon_hover_color ) {
  346.             ET_Builder_Element::set_style( $function_name, array(
  347.                 'selector'    => '%%order_class%% .et_pb_member_social_links a:hover',
  348.                 'declaration' => sprintf(
  349.                     'color: %1$s !important;',
  350.                     esc_html( $icon_hover_color )
  351.                 ),
  352.             ) );
  353.         }
  354.  
  355.         if ( '' !== $facebook_url ) {
  356.             $social_links .= sprintf(
  357.                 '<li><a href="%1$s" class="et_pb_font_icon et_pb_facebook_icon"><span>%2$s</span></a></li>',
  358.                 esc_url( $facebook_url ),
  359.                 esc_html__( 'Facebook', 'et_builder' )
  360.             );
  361.         }
  362.  
  363.         if ( '' !== $twitter_url ) {
  364.             $social_links .= sprintf(
  365.                 '<li><a href="%1$s" class="et_pb_font_icon et_pb_twitter_icon"><span>%2$s</span></a></li>',
  366.                 esc_url( $twitter_url ),
  367.                 esc_html__( 'Twitter', 'et_builder' )
  368.             );
  369.         }
  370.  
  371.         if ( '' !== $google_url ) {
  372.             $social_links .= sprintf(
  373.                 '<li><a href="%1$s" class="et_pb_font_icon et_pb_google_icon"><span>%2$s</span></a></li>',
  374.                 esc_url( $google_url ),
  375.                 esc_html__( 'Google+', 'et_builder' )
  376.             );
  377.         }
  378.  
  379.         if ( '' !== $linkedin_url ) {
  380.             $social_links .= sprintf(
  381.                 '<li><a href="%1$s" class="et_pb_font_icon et_pb_linkedin_icon"><span>%2$s</span></a></li>',
  382.                 esc_url( $linkedin_url ),
  383.                 esc_html__( 'LinkedIn', 'et_builder' )
  384.             );
  385.         }
  386.        
  387.         if ( '' !== $instagram_url ) {
  388.             $social_links .= sprintf(
  389.                 '<li><a href="%1$s" class="et_pb_font_icon et_pb_instagram_icon"><span>%2$s</span></a></li>',
  390.                 esc_url( $instagram_url ),
  391.                 esc_html__( 'instagram', 'et_builder' )
  392.             );
  393.         }
  394.        
  395.         if ( '' !== $youtube_url ) {
  396.             $social_links .= sprintf(
  397.                 '<li><a href="%1$s" class="et_pb_font_icon et_pb_youtube_icon"><span>%2$s</span></a></li>',
  398.                 esc_url( $youtube_url ),
  399.                 esc_html__( 'youtube', 'et_builder' )
  400.             );
  401.         }
  402.        
  403.         if ( '' !== $website_url ) {
  404.             $social_links .= sprintf(
  405.                 '<li><a href="%1$s" class="et_pb_font_icon et_pb_website_icon"><span>%2$s</span></a></li>',
  406.                 esc_url( $website_url ),
  407.                 esc_html__( 'website', 'et_builder' )
  408.             );
  409.         }
  410.        
  411.         if ( '' !== $email_url ) {
  412.             $social_links .= sprintf(
  413.                 '<li><a href="%1$s" class="et_pb_font_icon et_pb_email_icon"><span>%2$s</span></a></li>',
  414.                 esc_url( $email_url ),
  415.                 esc_html__( 'email', 'et_builder' )
  416.             );
  417.         }
  418.  
  419.         if ( '' !== $social_links ) {
  420.             $social_links = sprintf( '<ul class="et_pb_member_social_links">%1$s</ul>', $social_links );
  421.         }
  422.  
  423.         // Added for backward compatibility
  424.         if ( empty( $animation ) ) {
  425.             $animation = 'top';
  426.         }
  427.  
  428.         if ( '' !== $image_url ) {
  429.             // Images: Add CSS Filters and Mix Blend Mode rules (if set)
  430.             if ( array_key_exists( 'image', $this->advanced_options ) && array_key_exists( 'css', $this->advanced_options['image'] ) ) {
  431.                 $generate_css_filters_image = $this->generate_css_filters(
  432.                     $function_name,
  433.                     'child_',
  434.                     self::$data_utils->array_get( $this->advanced_options['image']['css'], 'main', '%%order_class%%' )
  435.                 );
  436.             }
  437.  
  438.             $image_pathinfo = pathinfo( $image_url );
  439.             $is_image_svg   = isset( $image_pathinfo['extension'] ) ? 'svg' === $image_pathinfo['extension'] : false;
  440.  
  441.             $image = sprintf(
  442.                 '<div class="et_pb_team_member_image et-waypoint%3$s%4$s%5$s">
  443.                     <img src="%1$s" alt="%2$s" />
  444.                 </div>',
  445.                 esc_url( $image_url ),
  446.                 esc_attr( $name ),
  447.                 esc_attr( " et_pb_animation_{$animation}" ),
  448.                 $generate_css_filters_image,
  449.                 $is_image_svg ? esc_attr( " et-svg" ) : ''
  450.             );
  451.         }
  452.  
  453.         $video_background = $this->video_background();
  454.         $parallax_image_background = $this->get_parallax_image_background();
  455.  
  456.         $output = sprintf(
  457.             '<div%3$s class="et_pb_module et_pb_team_member%4$s%9$s%10$s%12$s et_pb_bg_layout_%8$s clearfix%14$s">
  458.                 %13$s
  459.                 %11$s
  460.                 %2$s
  461.                 <div class="et_pb_team_member_description">
  462.                     %5$s
  463.                     %6$s
  464.                     %1$s
  465.                     %7$s
  466.                 </div> <!-- .et_pb_team_member_description -->
  467.             </div> <!-- .et_pb_team_member -->',
  468.             $this->shortcode_content,
  469.             ( '' !== $image ? $image : '' ),
  470.             ( '' !== $module_id ? sprintf( ' id="%1$s"', esc_attr( $module_id ) ) : '' ),
  471.             ( '' !== $module_class ? sprintf( ' %1$s', esc_attr( $module_class ) ) : '' ),
  472.             ( '' !== $name ? sprintf( '<%1$s class="et_pb_module_header">%2$s</%1$s>', et_pb_process_header_level( $header_level, 'h4' ), esc_html( $name ) ) : '' ),
  473.             ( '' !== $position ? sprintf( '<p class="et_pb_member_position">%1$s</p>', esc_html( $position ) ) : '' ),
  474.             $social_links,
  475.             $background_layout,
  476.             ( '' === $image ? ' et_pb_team_member_no_image' : '' ),
  477.             '' !== $video_background ? ' et_pb_section_video et_pb_preload' : '',
  478.             $video_background,
  479.             '' !== $parallax_image_background ? ' et_pb_section_parallax' : '',
  480.             $parallax_image_background,
  481.             $this->get_text_orientation_classname()
  482.         );
  483.  
  484.         return $output;
  485.     }
  486.  
  487.     public function process_box_shadow( $function_name ) {
  488.         $boxShadow = ET_Builder_Module_Fields_Factory::get( 'BoxShadow' );
  489.         $selector = sprintf( '.%1$s .et_pb_team_member_image', self::get_module_order_class( $function_name ) );
  490.  
  491.         self::set_style( $function_name, $boxShadow->get_style(
  492.             $selector,
  493.             $this->shortcode_atts,
  494.             array( 'suffix' => '_image' )
  495.         ) );
  496.  
  497.         parent::process_box_shadow( $function_name );
  498.     }
  499.  
  500.     protected function _add_additional_border_fields() {
  501.         parent::_add_additional_border_fields();
  502.  
  503.         $suffix      = 'image';
  504.         $tab_slug    = 'advanced';
  505.         $toggle_slug = 'image';
  506.  
  507.         $this->_additional_fields_options = array_merge(
  508.             $this->_additional_fields_options,
  509.             ET_Builder_Module_Fields_Factory::get( 'Border' )->get_fields( array(
  510.                 'suffix'       => "_{$suffix}",
  511.                 'label_prefix' => esc_html__( 'Image', 'et_builder' ),
  512.                 'tab_slug'     => $tab_slug,
  513.                 'toggle_slug'  => $toggle_slug,
  514.             ) )
  515.         );
  516.  
  517.         $this->advanced_options["border_{$suffix}"]["border_radii_{$suffix}"]  = $this->_additional_fields_options["border_radii_{$suffix}"];
  518.         $this->advanced_options["border_{$suffix}"]["border_styles_{$suffix}"] = $this->_additional_fields_options["border_styles_{$suffix}"];
  519.  
  520.         $this->advanced_options["border_{$suffix}"]['css'] = array(
  521.             'main' => array(
  522.                 'border_radii'  => "{$this->main_css_element} .et_pb_team_member_image",
  523.                 'border_styles' => "{$this->main_css_element} .et_pb_team_member_image",
  524.             )
  525.         );
  526.     }
  527.  
  528.     function process_advanced_border_options( $function_name ) {
  529.         parent::process_advanced_border_options( $function_name );
  530.  
  531.         $suffix = 'image';
  532.         /**
  533.          * @var ET_Builder_Module_Field_Border $border_field
  534.          */
  535.         $border_field = ET_Builder_Module_Fields_Factory::get( 'Border' );
  536.  
  537.         $css_selector = ! empty( $this->advanced_options["border_{$suffix}"]['css']['main']['border_radii'] ) ? $this->advanced_options["border_{$suffix}"]['css']['main']['border_radii'] : $this->main_css_element;
  538.         self::set_style( $function_name, array(
  539.             'selector'    => $css_selector,
  540.             'declaration' => $border_field->get_radii_style( $this->shortcode_atts, $this->advanced_options, "_{$suffix}" ),
  541.             'priority'    => $this->_style_priority,
  542.         ) );
  543.  
  544.         $css_selector = ! empty( $this->advanced_options["border_{$suffix}"]['css']['main']['border_styles'] ) ? $this->advanced_options["border_{$suffix}"]['css']['main']['border_styles'] : $this->main_css_element;
  545.         self::set_style( $function_name, array(
  546.             'selector'    => $css_selector,
  547.             'declaration' => $border_field->get_borders_style( $this->shortcode_atts, $this->advanced_options, "_{$suffix}" ),
  548.             'priority'    => $this->_style_priority,
  549.         ) );
  550.     }
  551.  
  552. }
  553.  
  554. new WPC_ET_Builder_Module_Team_Member;
Advertisement
Add Comment
Please, Sign In to add comment