', '', get_search_form(), ''; } } /* ---------------------------------------------------------------------------------- SOCIAL MEDIA - DISPLAY MESSAGE ---------------------------------------------------------------------------------- */ /* Message Settings */ function astronomy_input_socialmessage(){ // Get theme options values. $astronomy_header_socialmessage = astronomy_var ( 'astronomy_header_socialmessage' ); $astronomy_header_facebookswitch = astronomy_var ( 'astronomy_header_facebookswitch' ); $astronomy_header_twitterswitch = astronomy_var ( 'astronomy_header_twitterswitch' ); $astronomy_header_googleswitch = astronomy_var ( 'astronomy_header_googleswitch' ); $astronomy_header_linkedinswitch = astronomy_var ( 'astronomy_header_linkedinswitch' ); $astronomy_header_flickrswitch = astronomy_var ( 'astronomy_header_flickrswitch' ); $astronomy_header_lastfmswitch = astronomy_var ( 'astronomy_header_lastfmswitch' ); $astronomy_header_rssswitch = astronomy_var ( 'astronomy_header_rssswitch' ); $astronomy_header_diggswitch = astronomy_var ( 'astronomy_header_diggswitch' ); if ( empty( $astronomy_header_facebookswitch ) and empty( $astronomy_header_twitterswitch ) and empty( $astronomy_header_googleswitch ) and empty( $astronomy_header_linkedinswitch ) and empty( $astronomy_header_flickrswitch ) and empty( $astronomy_header_lastfmswitch ) and empty( $astronomy_header_rssswitch ) and empty( $astronomy_header_diggswitch ) ) { return ''; } else if ( ! empty( $astronomy_header_socialmessage ) ) { return esc_html( $astronomy_header_socialmessage ); } else if ( empty( $astronomy_header_socialmessage ) ) { return ''; } } /* ---------------------------------------------------------------------------------- SOCIAL MEDIA - CUSTOM ICONS ---------------------------------------------------------------------------------- */ /* Facebook - Custom Icon */ function astronomy_input_facebookicon(){ // Get theme options values. $astronomy_header_facebookiconswitch = astronomy_var ( 'astronomy_header_facebookiconswitch' ); $astronomy_header_facebookcustomicon = astronomy_var ( 'astronomy_header_facebookcustomicon', 'url' ); $output = NULL; if ( $astronomy_header_facebookiconswitch == '1' and ! empty( $astronomy_header_facebookcustomicon ) ) { // Output for header social media $output .= '#pre-header-social li.facebook a,'; $output .= '#pre-header-social li.facebook a:hover {'; $output .= 'background: url("' . esc_url( $astronomy_header_facebookcustomicon ) . '") no-repeat center;'; $output .= 'background-size: 25px;'; $output .= '-webkit-border-radius: 0;'; $output .= '-moz-border-radius: 0;'; $output .= '-o-border-radius: 0;'; $output .= 'border-radius: 0;'; $output .= '}' . "\n"; $output .= '#pre-header-social li.facebook i {'; $output .= 'display: none;'; $output .= '}' . "\n"; // Output for footer social media $output .= '#post-footer-social li.facebook a,'; $output .= '#post-footer-social li.facebook a:hover {'; $output .= 'background: url("' . esc_url( $astronomy_header_facebookcustomicon ) . '") no-repeat center;'; $output .= 'background-size: 25px;'; $output .= '-webkit-border-radius: 0;'; $output .= '-moz-border-radius: 0;'; $output .= '-o-border-radius: 0;'; $output .= 'border-radius: 0;'; $output .= '}' . "\n"; $output .= '#post-footer-social li.facebook i {'; $output .= 'display: none;'; $output .= '}' . "\n"; } return $output; } /* Twitter - Custom Icon */ function astronomy_input_twittericon(){ // Get theme options values. $astronomy_header_twittericonswitch = astronomy_var ( 'astronomy_header_twittericonswitch' ); $astronomy_header_twittercustomicon = astronomy_var ( 'astronomy_header_twittercustomicon', 'url' ); $output = NULL; if ( $astronomy_header_twittericonswitch == '1' and ! empty( $astronomy_header_twittercustomicon ) ) { // Output for header social media $output .= '#pre-header-social li.twitter a,'; $output .= '#pre-header-social li.twitter a:hover {'; $output .= 'background: url("' . esc_url( $astronomy_header_twittercustomicon ) . '") no-repeat center;'; $output .= 'background-size: 25px;'; $output .= '-webkit-border-radius: 0;'; $output .= '-moz-border-radius: 0;'; $output .= '-o-border-radius: 0;'; $output .= 'border-radius: 0;'; $output .= '}' . "\n"; $output .= '#pre-header-social li.twitter i {'; $output .= 'display: none;'; $output .= '}' . "\n"; // Output for footer social media $output .= '#post-footer-social li.twitter a,'; $output .= '#post-footer-social li.twitter a:hover {'; $output .= 'background: url("' . esc_url( $astronomy_header_twittercustomicon ) . '") no-repeat center;'; $output .= 'background-size: 25px;'; $output .= '-webkit-border-radius: 0;'; $output .= '-moz-border-radius: 0;'; $output .= '-o-border-radius: 0;'; $output .= 'border-radius: 0;'; $output .= '}' . "\n"; $output .= '#post-footer-social li.twitter i {'; $output .= 'display: none;'; $output .= '}' . "\n"; } return $output; } /* Google+ - Custom Icon */ function astronomy_input_googleicon(){ // Get theme options values. $astronomy_header_googleiconswitch = astronomy_var ( 'astronomy_header_googleiconswitch' ); $astronomy_header_googlecustomicon = astronomy_var ( 'astronomy_header_googlecustomicon', 'url' ); $output = NULL; if ( $astronomy_header_googleiconswitch == '1' and ! empty( $astronomy_header_googlecustomicon ) ) { // Output for header social media $output .= '#pre-header-social li.google-plus a,'; $output .= '#pre-header-social li.google-plus a:hover {'; $output .= 'background: url("' . esc_url( $astronomy_header_googlecustomicon ) . '") no-repeat center;'; $output .= 'background-size: 25px;'; $output .= '-webkit-border-radius: 0;'; $output .= '-moz-border-radius: 0;'; $output .= '-o-border-radius: 0;'; $output .= 'border-radius: 0;'; $output .= '}' . "\n"; $output .= '#pre-header-social li.google-plus i {'; $output .= 'display: none;'; $output .= '}' . "\n"; // Output for footer social media $output .= '#post-footer-social li.google-plus a,'; $output .= '#post-footer-social li.google-plus a:hover {'; $output .= 'background: url("' . esc_url( $astronomy_header_googlecustomicon ) . '") no-repeat center;'; $output .= 'background-size: 25px;'; $output .= '-webkit-border-radius: 0;'; $output .= '-moz-border-radius: 0;'; $output .= '-o-border-radius: 0;'; $output .= 'border-radius: 0;'; $output .= '}' . "\n"; $output .= '#post-footer-social li.google-plus i {'; $output .= 'display: none;'; $output .= '}' . "\n"; } return $output; } /* LinkedIn - Custom Icon */ function astronomy_input_linkedinicon(){ // Get theme options values. $astronomy_header_linkediniconswitch = astronomy_var ( 'astronomy_header_linkediniconswitch' ); $astronomy_header_linkedincustomicon = astronomy_var ( 'astronomy_header_linkedincustomicon', 'url' ); $output = NULL; if ( $astronomy_header_linkediniconswitch == '1' and ! empty( $astronomy_header_linkedincustomicon ) ) { // Output for header social media $output .= '#pre-header-social li.linkedin a,'; $output .= '#pre-header-social li.linkedin a:hover {'; $output .= 'background: url("' . esc_url( $astronomy_header_linkedincustomicon ) . '") no-repeat center;'; $output .= 'background-size: 25px;'; $output .= '-webkit-border-radius: 0;'; $output .= '-moz-border-radius: 0;'; $output .= '-o-border-radius: 0;'; $output .= 'border-radius: 0;'; $output .= '}' . "\n"; $output .= '#pre-header-social li.linkedin i {'; $output .= 'display: none;'; $output .= '}' . "\n"; // Output for footer social media $output .= '#post-footer-social li.linkedin a,'; $output .= '#post-footer-social li.linkedin a:hover {'; $output .= 'background: url("' . esc_url( $astronomy_header_linkedincustomicon ) . '") no-repeat center;'; $output .= 'background-size: 25px;'; $output .= '-webkit-border-radius: 0;'; $output .= '-moz-border-radius: 0;'; $output .= '-o-border-radius: 0;'; $output .= 'border-radius: 0;'; $output .= '}' . "\n"; $output .= '#post-footer-social li.linkedin i {'; $output .= 'display: none;'; $output .= '}' . "\n"; } return $output; } /* Flickr - Custom Icon */ function astronomy_input_flickricon(){ // Get theme options values. $astronomy_header_flickriconswitch = astronomy_var ( 'astronomy_header_flickriconswitch' ); $astronomy_header_flickrcustomicon = astronomy_var ( 'astronomy_header_flickrcustomicon', 'url' ); $output = NULL; if ( $astronomy_header_flickriconswitch == '1' and ! empty( $astronomy_header_flickrcustomicon ) ) { // Output for header social media $output .= '#pre-header-social li.flickr a,'; $output .= '#pre-header-social li.flickr a:hover {'; $output .= 'background: url("' . esc_url( $astronomy_header_flickrcustomicon ) . '") no-repeat center;'; $output .= 'background-size: 25px;'; $output .= '-webkit-border-radius: 0;'; $output .= '-moz-border-radius: 0;'; $output .= '-o-border-radius: 0;'; $output .= 'border-radius: 0;'; $output .= '}' . "\n"; $output .= '#pre-header-social li.flickr i {'; $output .= 'display: none;'; $output .= '}' . "\n"; // Output for footer social media $output .= '#post-footer-social li.flickr a,'; $output .= '#post-footer-social li.flickr a:hover {'; $output .= 'background: url("' . esc_url( $astronomy_header_flickrcustomicon ) . '") no-repeat center;'; $output .= 'background-size: 25px;'; $output .= '-webkit-border-radius: 0;'; $output .= '-moz-border-radius: 0;'; $output .= '-o-border-radius: 0;'; $output .= 'border-radius: 0;'; $output .= '}' . "\n"; $output .= '#post-footer-social li.flickr i {'; $output .= 'display: none;'; $output .= '}' . "\n"; } return $output; } /* YouTube - Custom Icon */ function astronomy_input_youtubeicon(){ // Get theme options values. $astronomy_header_youtubeiconswitch = astronomy_var ( 'astronomy_header_youtubeiconswitch' ); $astronomy_header_youtubecustomicon = astronomy_var ( 'astronomy_header_youtubecustomicon', 'url' ); $output = NULL; if ( $astronomy_header_youtubeiconswitch == '1' and ! empty( $astronomy_header_youtubecustomicon ) ) { // Output for header social media $output .= '#pre-header-social li.youtube a,'; $output .= '#pre-header-social li.youtube a:hover {'; $output .= 'background: url("' . esc_url( $astronomy_header_youtubecustomicon ) . '") no-repeat center;'; $output .= 'background-size: 25px;'; $output .= '-webkit-border-radius: 0;'; $output .= '-moz-border-radius: 0;'; $output .= '-o-border-radius: 0;'; $output .= 'border-radius: 0;'; $output .= '}' . "\n"; $output .= '#pre-header-social li.youtube i {'; $output .= 'display: none;'; $output .= '}' . "\n"; // Output for footer social media $output .= '#post-footer-social li.youtube a,'; $output .= '#post-footer-social li.youtube a:hover {'; $output .= 'background: url("' . esc_url( $astronomy_header_youtubecustomicon ) . '") no-repeat center;'; $output .= 'background-size: 25px;'; $output .= '-webkit-border-radius: 0;'; $output .= '-moz-border-radius: 0;'; $output .= '-o-border-radius: 0;'; $output .= 'border-radius: 0;'; $output .= '}' . "\n"; $output .= '#post-footer-social li.youtube i {'; $output .= 'display: none;'; $output .= '}' . "\n"; } return $output; } /* RSS - Custom Icon */ function astronomy_input_rssicon(){ // Get theme options values. $astronomy_header_rssiconswitch = astronomy_var ( 'astronomy_header_rssiconswitch' ); $astronomy_header_rsscustomicon = astronomy_var ( 'astronomy_header_rsscustomicon', 'url' ); $output = NULL; if ( $astronomy_header_rssiconswitch == '1' and ! empty( $astronomy_header_rsscustomicon ) ) { // Output for header social media $output .= '#pre-header-social li.rss a,'; $output .= '#pre-header-social li.rss a:hover {'; $output .= 'background: url("' . esc_url( $astronomy_header_rsscustomicon ) . '") no-repeat center;'; $output .= 'background-size: 25px;'; $output .= '-webkit-border-radius: 0;'; $output .= '-moz-border-radius: 0;'; $output .= '-o-border-radius: 0;'; $output .= 'border-radius: 0;'; $output .= '}' . "\n"; $output .= '#pre-header-social li.rss i {'; $output .= 'display: none;'; $output .= '}' . "\n"; // Output for footer social media $output .= '#post-footer-social li.rss a,'; $output .= '#post-footer-social li.rss a:hover {'; $output .= 'background: url("' . esc_url( $astronomy_header_rsscustomicon ) . '") no-repeat center;'; $output .= 'background-size: 25px;'; $output .= '-webkit-border-radius: 0;'; $output .= '-moz-border-radius: 0;'; $output .= '-o-border-radius: 0;'; $output .= 'border-radius: 0;'; $output .= '}' . "\n"; $output .= '#post-footer-social li.rss i {'; $output .= 'display: none;'; $output .= '}' . "\n"; } return $output; } /* Input Custom Social Media Icons */ function astronomy_input_socialicon(){ $output = NULL; $output .= astronomy_input_facebookicon(); $output .= astronomy_input_twittericon(); $output .= astronomy_input_googleicon(); $output .= astronomy_input_linkedinicon(); $output .= astronomy_input_flickricon(); $output .= astronomy_input_youtubeicon(); $output .= astronomy_input_rssicon(); if ( ! empty( $output ) ) { echo ''; } } add_action( 'wp_head', 'astronomy_input_socialicon', 13 ); /* ---------------------------------------------------------------------------------- SOCIAL MEDIA - OUTPUT SOCIAL MEDIA SELECTIONS (HEADER) (ADD IN LATER) ---------------------------------------------------------------------------------- */ function astronomy_input_socialmediaheader() { // Get theme options values. $astronomy_header_socialswitch = astronomy_var ( 'astronomy_header_socialswitch' ); $astronomy_header_socialmessage = astronomy_var ( 'astronomy_header_socialmessage' ); $astronomy_header_facebookswitch = astronomy_var ( 'astronomy_header_facebookswitch' ); $astronomy_header_facebooklink = astronomy_var ( 'astronomy_header_facebooklink' ); $astronomy_header_twitterswitch = astronomy_var ( 'astronomy_header_twitterswitch' ); $astronomy_header_twitterlink = astronomy_var ( 'astronomy_header_twitterlink' ); $astronomy_header_googleswitch = astronomy_var ( 'astronomy_header_googleswitch' ); $astronomy_header_googlelink = astronomy_var ( 'astronomy_header_googlelink' ); $astronomy_header_linkedinswitch = astronomy_var ( 'astronomy_header_linkedinswitch' ); $astronomy_header_linkedinlink = astronomy_var ( 'astronomy_header_linkedinlink' ); $astronomy_header_flickrswitch = astronomy_var ( 'astronomy_header_flickrswitch' ); $astronomy_header_flickrlink = astronomy_var ( 'astronomy_header_flickrlink' ); $astronomy_header_youtubeswitch = astronomy_var ( 'astronomy_header_youtubeswitch' ); $astronomy_header_youtubelink = astronomy_var ( 'astronomy_header_youtubelink' ); $astronomy_header_rssswitch = astronomy_var ( 'astronomy_header_rssswitch' ); $astronomy_header_rsslink = astronomy_var ( 'astronomy_header_rsslink' ); // Reset count values used in foreach loop $i = 0; $j = 0; if ( $astronomy_header_socialswitch == '1' ) { // Assign social media link to an array $social_links = array( array( 'social' => __( 'Facebook', 'astronomy'), 'icon' => 'facebook', 'toggle' => $astronomy_header_facebookswitch, 'link' => $astronomy_header_facebooklink ), array( 'social' => __( 'Twitter', 'astronomy'), 'icon' => 'twitter', 'toggle' => $astronomy_header_twitterswitch, 'link' => $astronomy_header_twitterlink ), array( 'social' => __( 'Google+', 'astronomy'), 'icon' => 'google-plus', 'toggle' => $astronomy_header_googleswitch, 'link' => $astronomy_header_googlelink ), array( 'social' => __( 'LinkedIn', 'astronomy'), 'icon' => 'linkedin', 'toggle' => $astronomy_header_linkedinswitch, 'link' => $astronomy_header_linkedinlink ), array( 'social' => __( 'Flickr', 'astronomy'), 'icon' => 'flickr', 'toggle' => $astronomy_header_flickrswitch, 'link' => $astronomy_header_flickrlink ), array( 'social' => __( 'YouTube', 'astronomy'), 'icon' => 'youtube', 'toggle' => $astronomy_header_youtubeswitch, 'link' => $astronomy_header_youtubelink ), array( 'social' => __( 'RSS', 'astronomy'), 'icon' => 'rss', 'toggle' => $astronomy_header_rssswitch, 'link' => $astronomy_header_rsslink ), ); // Output social media links if any link is set foreach( $social_links as $social ) { if ( ! empty( $social['link'] ) and $j == 0 ) { echo '
'; } } /* ---------------------------------------------------------------------------------- SOCIAL MEDIA - OUTPUT SOCIAL MEDIA SELECTIONS (FOOTER) ---------------------------------------------------------------------------------- */ function astronomy_input_socialmediafooter() { // Get theme options values. $astronomy_header_socialswitchfooter = astronomy_var ( 'astronomy_header_socialswitchfooter' ); $astronomy_header_socialmessage = astronomy_var ( 'astronomy_header_socialmessage' ); $astronomy_header_facebookswitch = astronomy_var ( 'astronomy_header_facebookswitch' ); $astronomy_header_facebooklink = astronomy_var ( 'astronomy_header_facebooklink' ); $astronomy_header_twitterswitch = astronomy_var ( 'astronomy_header_twitterswitch' ); $astronomy_header_twitterlink = astronomy_var ( 'astronomy_header_twitterlink' ); $astronomy_header_googleswitch = astronomy_var ( 'astronomy_header_googleswitch' ); $astronomy_header_googlelink = astronomy_var ( 'astronomy_header_googlelink' ); $astronomy_header_linkedinswitch = astronomy_var ( 'astronomy_header_linkedinswitch' ); $astronomy_header_linkedinlink = astronomy_var ( 'astronomy_header_linkedinlink' ); $astronomy_header_flickrswitch = astronomy_var ( 'astronomy_header_flickrswitch' ); $astronomy_header_flickrlink = astronomy_var ( 'astronomy_header_flickrlink' ); $astronomy_header_youtubeswitch = astronomy_var ( 'astronomy_header_youtubeswitch' ); $astronomy_header_youtubelink = astronomy_var ( 'astronomy_header_youtubelink' ); $astronomy_header_rssswitch = astronomy_var ( 'astronomy_header_rssswitch' ); $astronomy_header_rsslink = astronomy_var ( 'astronomy_header_rsslink' ); // Reset count values used in foreach loop $i = 0; $j = 0; if ( $astronomy_header_socialswitchfooter == '1' ) { // Assign social media link to an array $social_links = array( array( 'social' => __( 'Facebook', 'astronomy'), 'icon' => 'facebook', 'toggle' => $astronomy_header_facebookswitch, 'link' => $astronomy_header_facebooklink ), array( 'social' => __( 'Twitter', 'astronomy'), 'icon' => 'twitter', 'toggle' => $astronomy_header_twitterswitch, 'link' => $astronomy_header_twitterlink ), array( 'social' => __( 'Google+', 'astronomy'), 'icon' => 'google-plus', 'toggle' => $astronomy_header_googleswitch, 'link' => $astronomy_header_googlelink ), array( 'social' => __( 'LinkedIn', 'astronomy'), 'icon' => 'linkedin', 'toggle' => $astronomy_header_linkedinswitch, 'link' => $astronomy_header_linkedinlink ), array( 'social' => __( 'Flickr', 'astronomy'), 'icon' => 'flickr', 'toggle' => $astronomy_header_flickrswitch, 'link' => $astronomy_header_flickrlink ), array( 'social' => __( 'YouTube', 'astronomy'), 'icon' => 'youtube', 'toggle' => $astronomy_header_youtubeswitch, 'link' => $astronomy_header_youtubelink ), array( 'social' => __( 'RSS', 'astronomy'), 'icon' => 'rss', 'toggle' => $astronomy_header_rssswitch, 'link' => $astronomy_header_rsslink ), ); // Output social media links if any link is set foreach( $social_links as $social ) { if ( ! empty( $social['link'] ) and $j == 0 ) { echo '
'; } } ?>