'', 'instagram' => '', 'twitter' => '', 'youtube' => '', 'linkedin' => '', 'pinterest' => '', 'dribbble' => '', 'behance' => '', 'reddit' => '', 'github' => '', 'telegram' => '', ); $social_links = array(); for ( $i = 1; $i <= 5; $i++ ) { $social_links[ $i ] = array( 'type' => get_theme_mod( "misc_social_{$i}", 'none' ), 'network' => get_theme_mod( "misc_social_{$i}_network", 'instagram' ), 'label' => get_theme_mod( "misc_social_{$i}_label" ), 'image' => get_theme_mod( "misc_social_{$i}_icon" ), 'url' => get_theme_mod( "misc_social_{$i}_url" ), 'target' => get_theme_mod( "misc_social_{$i}_target", '_blank' ), ); if ( $social_links[ $i ]['image'] ) { $social_links[ $i ]['image_id'] = attachment_url_to_postid( $social_links[ $i ]['image'] ); if ( 0 === $social_links[ $i ]['image_id'] ) { $social_links[ $i ]['image_id'] = null; } } $social_links[ $i ]['alt'] = $social_links[ $i ]['label'] ? $social_links[ $i ]['label'] : ''; } $social_links = array_filter( $social_links, function ( $social ) { return 'none' !== $social['type'] && ! empty( $social['url'] ); } ); ?>
">