Server : nginx/1.20.1 System : Linux ccpf-production-2021 5.4.0-148-generic #165-Ubuntu SMP Tue Apr 18 08:53:12 UTC 2023 x86_64 User : forge ( 1000) PHP Version : 7.4.21 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /home/forge/gcc-ccpf.com/wp-content/themes/labora/labora-niche/ |
<?php
// Sociables
if ( ! function_exists( 'labora_social_icon' ) ) {
function labora_social_icon( $sociables ) {
$labora_sociable_icon = array(
'facebook' => esc_html__( 'facebook', 'labora' ),
'vimeo' => esc_html__( 'vimeo', 'labora' ),
'delicious' => esc_html__( 'delicious', 'labora' ),
'digg' => esc_html__( 'digg', 'labora' ),
'instagram' => esc_html__( 'instagram', 'labora' ),
'foursquare' => esc_html__( 'foursquare', 'labora' ),
'flickr' => esc_html__( 'flickr', 'labora' ),
'google-plus' => esc_html__( 'plus.google', 'labora' ),
'google-plus' => esc_html__( 'plus', 'labora' ),
'google' => esc_html__( 'google', 'labora' ),
'linkedin' => esc_html__( 'linkedin', 'labora' ),
'pinterest' => esc_html__( 'pinterest', 'labora' ),
'skype' => esc_html__( 'skype', 'labora' ),
'stumbleupon' => esc_html__( 'stumbleupon', 'labora' ),
'dribbble' => esc_html__( 'dribbble', 'labora' ),
'yahoo' => esc_html__( 'yahoo', 'labora' ),
'youtube' => esc_html__( 'youtube', 'labora' ),
);
$output = '';
$sociable_path = explode( "\n", $sociables );
$output .= '<ul class="iva_socials">';
foreach ( $sociable_path as $sociable_url ) {
$sociableurl = preg_replace( '/http:\/\/www.||https:\/\/www.||https:\/\/||http:\/\/||www./', '', $sociable_url );
$sociable_host = preg_split( '/[\s.]+/', $sociableurl );
$sociable_host_names = $sociable_host[0];
foreach ( $labora_sociable_icon as $key => $sociableicon ) {
if ( trim( $sociableicon ) === trim( strtolower( $sociable_host_names ) ) ) {
$sociable_url = trim( $sociableurl );
$output .= '<li class="' . $key . '"><a class="labora_tip" href="' . esc_url( $sociable_url ) . '" target="_blank"><i class="fa fa-fw fa-' . $key . '"></i><span class="ttip">' . ucfirst( $sociableicon ) . '</span></a></li>';
}
}
}
$output .= '</ul>';
return $output;
}
}