get_theme_mod('c9_twitter', ''), 'c9_facebook' => get_theme_mod('c9_facebook', ''), 'c9_instagram' => get_theme_mod('c9_instagram', ''), 'c9_pinterest' => get_theme_mod('c9_pinterest', ''), 'c9_spotify' => get_theme_mod('c9_spotify', ''), 'c9_youtube' => get_theme_mod('c9_youtube', ''), 'c9_yelp' => get_theme_mod('c9_yelp', ''), 'c9_subreddit' => get_theme_mod('c9_subreddit', ''), 'c9_linkedin' => get_theme_mod('c9_linkedin', ''), 'c9_github' => get_theme_mod('c9_github', ''), 'c9_soundcloud' => get_theme_mod('c9_soundcloud', ''), ); foreach ($social_options_selected as $opt_key => $opt_value) { $link_builder = 'build_' . $opt_key . '_link'; if ('' !== $opt_key && '' !== $opt_value) { if (filter_var($opt_value, FILTER_VALIDATE_URL)) { $social_links[$opt_key] = self::$link_builder(sanitize_text_field(esc_url($opt_value)), 'url'); } else { $social_links[$opt_key] = self::$link_builder(sanitize_text_field(esc_attr($opt_value)), 'username'); } } } return $social_links; } else { return false; } } public static function build_c9_twitter_link($input, $type) { if ('url' === $type) { $link = '' . __('Twitter', 'c9-togo') . ''; } else { $link = '' . __('Twitter', 'c9-togo') . ''; } return $link; } public static function build_c9_facebook_link($input, $type) { if ('url' === $type) { $link = '' . __('Facebook', 'c9-togo') . ''; } else { $link = '' . __('Facebook', 'c9-togo') . ''; } return $link; } public static function build_c9_instagram_link($input, $type) { if ('url' === $type) { $link = '' . __('Instagram', 'c9-togo') . ''; } else { $link = '' . __('Instagram', 'c9-togo') . ''; } return $link; } public static function build_c9_pinterest_link($input, $type) { if ('url' === $type) { $link = '' . __('Pinterest', 'c9-togo') . ''; } else { $link = '' . __('Pinterest', 'c9-togo') . ''; } return $link; } public static function build_c9_spotify_link($input, $type) { if ('url' === $type) { $link = '' . __('Spotify', 'c9-togo') . ''; } else { $link = '' . __('Spotify', 'c9-togo') . ''; } return $link; } public static function build_c9_youtube_link($input, $type) { if ('url' === $type) { $link = '' . __('YouTube', 'c9-togo') . ''; } else { $link = '' . __('YouTube', 'c9-togo') . ''; } return $link; } public static function build_c9_flickr_link($input, $type) { if ('url' === $type) { $link = '' . __('Flickr', 'c9-togo') . '' . __('Flickr', 'c9-togo') . ''; } return $link; } public static function build_c9_tumblr_link($input, $type) { if ('url' === $type) { $link = '' . __('Tumblr', 'c9-togo') . ''; } else { $link = '' . __('Tumblr', 'c9-togo') . ''; } return $link; } public static function build_c9_yelp_link($input, $type) { if ('url' === $type) { $link = '' . __('Yelp', 'c9-togo') . ''; } else { $link = '' . __('Yelp', 'c9-togo') . ''; } return $link; } public static function build_c9_subreddit_link($input, $type) { if ('url' === $type) { $link = '' . __('Reddit', 'c9-togo') . ''; } else { $link = '' . __('Reddit', 'c9-togo') . ''; } return $link; } public static function build_c9_linkedin_link($input, $type) { if ('url' === $type) { $link = '' . __('LinkedIn', 'c9-togo') . ''; } else { $link = '' . __('LinkedIn', 'c9-togo') . ''; } return $link; } public static function build_c9_github_link($input, $type) { if ('url' === $type) { $link = '' . __('GitHub', 'c9-togo') . ''; } else { $link = '' . __('GitHub', 'c9-togo') . ''; } return $link; } public static function build_c9_soundcloud_link($input, $type) { if ('url' === $type) { $link = '' . __('SoundCloud', 'c9-togo') . ''; } else { $link = '' . __('SoundCloud', 'c9-togo') . ''; } return $link; } } }