PATH:
home
/
letacommog
/
lesfinessaveurs
/
wp-content
/
themes
/
Avada
/
includes
<?php /** * Social Icons Class * * @author ThemeFusion * @copyright (c) Copyright by ThemeFusion * @link http://theme-fusion.com * @package Avada * @subpackage Core * @since 4.0.0 */ // Exit if accessed directly. if ( ! defined( 'ABSPATH' ) ) { die; } /** * Social Icons Class * * @since 4.0.0 */ class Avada_Social_Icons extends Avada_Social_Icon { /** * Renders all social icons not belonging to shortcodes. * * @since 3.5.0 * @param array $args Holding all necessarry data for social icons. * @return string The HTML mark up for social icons, incl. wrapping container. */ public function render_social_icons( $args ) { parent::$args = $args; $html = ''; $icons = ''; // Get the social networks setting. $social_networks = Avada()->settings->get( 'social_media_icons' ); // Get a list of all the available social networks. $social_networks_full_array = Fusion_Data::fusion_social_icons( true, true ); // Count how many social icons we have. $count = count( $social_networks ); // Get the default color values for social media depending on their location. $footer_social_links_icon_color = Avada()->settings->get( 'footer_social_links_icon_color' ); $footer_social_links_box_color = Avada()->settings->get( 'footer_social_links_box_color' ); $header_social_links_icon_color = Avada()->settings->get( 'header_social_links_icon_color' ); $header_social_links_box_color = Avada()->settings->get( 'header_social_links_box_color' ); $use_brand_colors = false; if ( isset( parent::$args['position'] ) ) { if ( 'footer' === parent::$args['position'] ) { if ( 'brand' === Avada()->settings->get( 'footer_social_links_color_type' ) ) { $use_brand_colors = true; } } else { if ( 'brand' === Avada()->settings->get( 'header_social_links_color_type' ) ) { $use_brand_colors = true; } } } // Check that we have social networks defined before proceeding. if ( ! empty( $social_networks ) && isset( $social_networks['url'] ) && ! empty( $social_networks['url'] ) ) { $social_networks_count = count( $social_networks['url'] ); for ( $i = 0; $i <= $social_networks_count - 1; $i++ ) { // Get the icon's arguments. $icon = ( isset( $social_networks['icon'][ $i ] ) ) ? str_replace( '_link', '', $social_networks['icon'][ $i ] ) : false; $url = ( isset( $social_networks['url'][ $i ] ) && ! empty( $social_networks['url'][ $i ] ) ) ? $social_networks['url'][ $i ] : false; $header_box_color = ( isset( $social_networks['header_box_color'][ $i ] ) && ! empty( $social_networks['header_box_color'][ $i ] ) ) ? $social_networks['header_box_color'][ $i ] : false; $footer_box_color = ( isset( $social_networks['footer_box_color'][ $i ] ) && ! empty( $social_networks['footer_box_color'][ $i ] ) ) ? $social_networks['footer_box_color'][ $i ] : false; $custom_title = ( isset( $social_networks['custom_title'][ $i ] ) && ! empty( $social_networks['custom_title'][ $i ] ) ) ? $social_networks['custom_title'][ $i ] : ''; $custom_source = ( isset( $social_networks['custom_source'][ $i ] ) && isset( $social_networks['custom_source'][ $i ]['url'] ) && ! empty( $social_networks['custom_source'][ $i ]['url'] ) ) ? $social_networks['custom_source'][ $i ]['url'] : ''; $custom_source_height = ( isset( $social_networks['custom_source'][ $i ] ) && isset( $social_networks['custom_source'][ $i ]['height'] ) && ! empty( $social_networks['custom_source'][ $i ]['height'] ) ) ? $social_networks['custom_source'][ $i ]['height'] : ''; $custom_source_width = ( isset( $social_networks['custom_source'][ $i ] ) && isset( $social_networks['custom_source'][ $i ]['width'] ) && ! empty( $social_networks['custom_source'][ $i ]['width'] ) ) ? $social_networks['custom_source'][ $i ]['width'] : ''; // Hack for Google+. if ( in_array( $icon, array( 'google', 'gplus' ) ) ) { $icon = 'googleplus'; } // Make sure we have a URL & an icon defined. if ( $icon && $url ) { $icon_args = array( 'icon' => $icon, 'url' => $url, ); $icon_args['icon_color'] = Avada()->settings->get( 'header_social_links_icon_color' ); $icon_args['box_color'] = Avada()->settings->get( 'header_social_links_box_color' ); // Use footer args when appropriate. if ( isset( parent::$args['position'] ) && 'footer' == parent::$args['position'] ) { $icon_args['icon_color'] = Avada()->settings->get( 'footer_social_links_icon_color' ); $icon_args['box_color'] = Avada()->settings->get( 'footer_social_links_box_color' ); } if ( $use_brand_colors ) { $brand_icon = ( 'googleplus' == $icon ) ? 'gplus' : $icon; $brand_color = $social_networks_full_array[ $brand_icon ]['color']; $icon_args['icon_color'] = ( parent::$args['icon_boxed'] ) ? '#ffffff' : $social_networks_full_array[ $brand_icon ]['color']; $icon_args['box_color'] = ( parent::$args['icon_boxed'] ) ? $social_networks_full_array[ $brand_icon ]['color'] : 'transparent'; } // Check if are on the last social icon. $icon_args['last'] = ( $count == $i ) ? true : false; // Custom icons. if ( 'custom' == $icon && ! empty( $custom_source ) ) { $icon_args['custom_source'] = $custom_source; $icon_args['custom_source_height'] = $custom_source_height; $icon_args['custom_source_width'] = $custom_source_width; $icon_args['custom_title'] = $custom_title; } $icons .= parent::get_markup( $icon_args ); } } // End for(). } // End if(). if ( ! empty( $icons ) ) { $attr = array( 'class' => 'fusion-social-networks', ); if ( parent::$args['icon_boxed'] ) { $attr['class'] .= ' boxed-icons'; } $html = '<div ' . fusion_attr( 'social-icons-class-social-networks', $attr ) . '><div ' . fusion_attr( 'fusion-social-networks-wrapper' ) . '>' . $icons; if ( isset( parent::$args['position'] ) && ( 'header' == parent::$args['position'] || 'footer' == parent::$args['position'] ) ) { $html .= '</div></div>'; } else { $html .= '<div class="fusion-clearfix"></div></div></div>'; } } return apply_filters( 'avada_social_icons_html', $html, $args ); } } /* Omit closing PHP tag to avoid "Headers already sent" issues. */
[+]
..
[-] class-avada-scripts.php
[edit]
[-] class-avada-layout-bbpress.php
[edit]
[-] class-avada-social-icon.php
[edit]
[-] class-avada-multiple-featured-images.php
[edit]
[-] class-fusion-builder-filters.php
[edit]
[-] class-avada-woocommerce.php
[edit]
[-] custom_functions.php
[edit]
[-] class-avada-gravity-forms-tags-merger.php
[edit]
[-] class-avada-avadaredux-migration.php
[edit]
[-] class-avada-portfolio.php
[edit]
[-] class-avada-images.php
[edit]
[-] class-fusion-builder-migrate.php
[edit]
[-] class-avada-upgrade.php
[edit]
[-] dynamic_css_helpers.php
[edit]
[-] class-avada-head.php
[edit]
[-] class-fusion-image-resizer.php
[edit]
[-] class-avada-blog.php
[edit]
[+]
widget
[-] class-avada-megamenu-framework.php
[edit]
[+]
recaptcha
[-] fusion-functions.php
[edit]
[-] class-avada-fonts.php
[edit]
[-] class-avada-remote-installer.php
[edit]
[-] class-avada-layout.php
[edit]
[-] avada-tgm.php
[edit]
[-] class-avada-page-options.php
[edit]
[+]
plugins
[-] wc-functions.php
[edit]
[-] class-fusion-builder-redux-options.php
[edit]
[-] class-avada-helper.php
[edit]
[-] class-avada-eventscalendar.php
[edit]
[-] class-fusion-builder-demos-importer.php
[edit]
[-] class-avada-template.php
[edit]
[-] deprecated.php
[edit]
[-] class-fusion-gfonts-downloader.php
[edit]
[-] class-avada-megamenu.php
[edit]
[-] dynamic_css.php
[edit]
[-] avada-functions.php
[edit]
[-] class-avada-googlemap.php
[edit]
[+]
upgrade
[-] class-avada-migrate.php
[edit]
[+]
importer
[-] fusion-shared-options.php
[edit]
[-] class-avada-social-sharing.php
[edit]
[-] class-avada-settings.php
[edit]
[-] class-avada-init.php
[edit]
[+]
lib
[-] class-avada-social-icons.php
[edit]
[+]
ls-skins
[+]
typography
[-] class-avada-contact.php
[edit]
[-] class-avada-breadcrumbs.php
[edit]
[-] class-avada-tgm-plugin-activation.php
[edit]
[-] class-avada-system-status.php
[edit]
[-] class-avada-options-conditionals.php
[edit]
[-] class-avada-nav-walker-megamenu.php
[edit]
[-] class-avada-admin.php
[edit]
[-] class-avada-widget-style.php
[edit]
[-] class-avada.php
[edit]
[+]
options
[-] class-avada-nav-walker.php
[edit]
[-] class-avada-dynamic-css.php
[edit]
[+]
admin-screens
[-] class-avada-avadaredux.php
[edit]
[-] class-avada-autoload.php
[edit]
[-] class-avada-sermon-manager.php
[edit]
[-] class-avada-options.php
[edit]
[-] class-avada-maintenance.php
[edit]
[-] class-avada-taxonomy-meta.php
[edit]
[-] class-avada-sidebars.php
[edit]
[+]
metaboxes
[-] class-avada-google-fonts.php
[edit]
[-] class-avada-admin-notices.php
[edit]
[-] class-avada-privacy-embeds.php
[edit]