'behance.net', 'icon' => 'fab fa-behance', 'title' => esc_html__( 'Follow me on Behance', 'avantex' ), 'class' => 'behance' ), array( 'url' => 'bitbucket.org', 'icon' => 'fab fa-bitbucket', 'title' => esc_html__( 'Fork me on Bitbucket', 'avantex' ), 'class' => 'bitbucket' ), array( 'url' => 'codepen.io', 'icon' => 'fab fa-codepen', 'title' => esc_html__( 'Follow me on CodePen', 'avantex' ), 'class' => 'codepen' ), array( 'url' => 'deviantart.com', 'icon' => 'fab fa-deviantart', 'title' => esc_html__( 'Watch me on DeviantArt', 'avantex' ), 'class' => 'deviantart' ), array( 'url' => 'discord.gg', 'icon' => 'fab fa-discord', 'title' => esc_html__( 'Join me on Discord', 'avantex' ), 'class' => 'discord' ), array( 'url' => 'dribbble.com', 'icon' => 'fab fa-dribbble', 'title' => esc_html__( 'Follow me on Dribbble', 'avantex' ), 'class' => 'dribbble' ), array( 'url' => 'etsy.com', 'icon' => 'fab fa-etsy', 'title' => esc_html__( 'favorite me on Etsy', 'avantex' ), 'class' => 'etsy' ), array( 'url' => 'facebook.com', 'icon' => 'fab fa-facebook-f', 'title' => esc_html__( 'Like me on Facebook', 'avantex' ), 'class' => 'facebook' ), array( 'url' => 'flickr.com', 'icon' => 'fab fa-flickr', 'title' => esc_html__( 'Connect with me on Flickr', 'avantex' ), 'class' => 'flickr' ), array( 'url' => 'foursquare.com', 'icon' => 'fab fa-foursquare', 'title' => esc_html__( 'Follow me on Foursquare', 'avantex' ), 'class' => 'foursquare' ), array( 'url' => 'github.com', 'icon' => 'fab fa-github', 'title' => esc_html__( 'Fork me on GitHub', 'avantex' ), 'class' => 'github' ), array( 'url' => 'instagram.com', 'icon' => 'fab fa-instagram', 'title' => esc_html__( 'Follow me on Instagram', 'avantex' ), 'class' => 'instagram' ), array( 'url' => 'kickstarter.com', 'icon' => 'fab fa-kickstarter-k', 'title' => esc_html__( 'Back me on Kickstarter', 'avantex' ), 'class' => 'kickstarter' ), array( 'url' => 'last.fm', 'icon' => 'fab fa-lastfm', 'title' => esc_html__( 'Follow me on Last.fm', 'avantex' ), 'class' => 'lastfm' ), array( 'url' => 'linkedin.com', 'icon' => 'fab fa-linkedin-in', 'title' => esc_html__( 'Connect with me on LinkedIn', 'avantex' ), 'class' => 'linkedin' ), array( 'url' => 'medium.com', 'icon' => 'fab fa-medium-m', 'title' => esc_html__( 'Follow me on Medium', 'avantex' ), 'class' => 'medium' ), array( 'url' => 'patreon.com', 'icon' => 'fab fa-patreon', 'title' => esc_html__( 'Support me on Patreon', 'avantex' ), 'class' => 'patreon' ), array( 'url' => 'pinterest.com', 'icon' => 'fab fa-pinterest-p', 'title' => esc_html__( 'Follow me on Pinterest', 'avantex' ), 'class' => 'pinterest' ), array( 'url' => 'plus.google.com', 'icon' => 'fab fa-google-plus-g', 'title' => esc_html__( 'Connect with me on Google+', 'avantex' ), 'class' => 'googleplus' ), array( 'url' => 'reddit.com', 'icon' => 'fab fa-reddit-alien', 'title' => esc_html__( 'Join me on Reddit', 'avantex' ), 'class' => 'reddit' ), array( 'url' => 'slack.com', 'icon' => 'fab fa-slack-hash', 'title' => esc_html__( 'Join me on Slack', 'avantex' ), 'class' => 'slack.' ), array( 'url' => 'slideshare.net', 'icon' => 'fab fa-slideshare', 'title' => esc_html__( 'Follow me on SlideShare', 'avantex' ), 'class' => 'slideshare' ), array( 'url' => 'snapchat.com', 'icon' => 'fab fa-snapchat-ghost', 'title' => esc_html__( 'Add me on Snapchat', 'avantex' ), 'class' => 'snapchat' ), array( 'url' => 'soundcloud.com', 'icon' => 'fab fa-soundcloud', 'title' => esc_html__( 'Follow me on SoundCloud', 'avantex' ), 'class' => 'soundcloud' ), array( 'url' => 'spotify.com', 'icon' => 'fab fa-spotify', 'title' => esc_html__( 'Follow me on Spotify', 'avantex' ), 'class' => 'spotify' ), array( 'url' => 'stackoverflow.com', 'icon' => 'fab fa-stack-overflow', 'title' => esc_html__( 'Join me on Stack Overflow', 'avantex' ), 'class' => 'stackoverflow' ), array( 'url' => 'tumblr.com', 'icon' => 'fab fa-tumblr', 'title' => esc_html__( 'Follow me on Tumblr', 'avantex' ), 'class' => 'tumblr' ), array( 'url' => 'twitch.tv', 'icon' => 'fab fa-twitch', 'title' => esc_html__( 'Follow me on Twitch', 'avantex' ), 'class' => 'twitch' ), array( 'url' => 'twitter.com', 'icon' => 'fab fa-twitter', 'title' => esc_html__( 'Follow me on Twitter', 'avantex' ), 'class' => 'twitter' ), array( 'url' => 'vimeo.com', 'icon' => 'fab fa-vimeo-v', 'title' => esc_html__( 'Follow me on Vimeo', 'avantex' ), 'class' => 'vimeo' ), array( 'url' => 'weibo.com', 'icon' => 'fab fa-weibo', 'title' => esc_html__( 'Follow me on weibo', 'avantex' ), 'class' => 'weibo' ), array( 'url' => 'youtube.com', 'icon' => 'fab fa-youtube', 'title' => esc_html__( 'Subscribe to me on YouTube', 'avantex' ), 'class' => 'youtube' ), ); return apply_filters( 'skyrocket_social_icons', $social_icons ); } } /** * Return an unordered list of linked social media icons, based on the urls provided in the Customizer Sortable Repeater * This is a sample function to display some social icons on your site. * This sample function is also used to show how you can call a PHP function to refresh the customizer preview. * Add the following code to header.php if you want to see the sample social icons displayed in the customizer preview and your theme. * Before any social icons display, you'll also need to add the relevent URL's to the Header Navigation > Social Icons section in the Customizer. *
* *
* * @return string Unordered list of linked social media icons */ if ( ! function_exists( 'skyrocket_get_social_media' ) ) { function skyrocket_get_social_media() { $defaults = skyrocket_generate_defaults(); $output = array(); $social_icons = skyrocket_generate_social_urls(); $social_urls = explode( ',', get_theme_mod( 'social_urls', $defaults['social_urls'] ) ); $social_newtab = get_theme_mod( 'social_newtab', $defaults['social_newtab'] ); $social_alignment = get_theme_mod( 'social_alignment', $defaults['social_alignment'] ); $contact_phone = get_theme_mod( 'contact_phone', $defaults['contact_phone'] ); if( !empty( $contact_phone ) ) { $output[] = sprintf( '
  • %3$s
  • ', 'phone', 'fas fa-phone fa-flip-horizontal', $contact_phone ); } foreach( $social_urls as $key => $value ) { if ( !empty( $value ) ) { $domain = str_ireplace( 'www.', '', parse_url( $value, PHP_URL_HOST ) ); $index = array_search( strtolower( $domain ), array_column( $social_icons, 'url' ) ); if( false !== $index ) { $output[] = sprintf( '
  • ', $social_icons[$index]['class'], esc_url( $value ), $social_icons[$index]['title'], ( !$social_newtab ? '' : ' target="_blank"' ), $social_icons[$index]['icon'] ); } else { $output[] = sprintf( '
  • ', $social_icons[$index]['class'], esc_url( $value ), ( !$social_newtab ? '' : ' target="_blank"' ), 'fas fa-globe' ); } } } if( get_theme_mod( 'social_rss', $defaults['social_rss'] ) ) { $output[] = sprintf( '
  • ', 'rss', home_url( '/feed' ), 'Subscribe to my RSS feed', ( !$social_newtab ? '' : ' target="_blank"' ), 'fas fa-rss' ); } if ( !empty( $output ) ) { $output = apply_filters( 'skyrocket_social_icons_list', $output ); array_unshift( $output, ''; } return implode( '', $output ); } } /** * Append a search icon to the primary menu * This is a sample function to show how to append an icon to the menu based on the customizer search option * The search icon wont actually do anything */ if ( ! function_exists( 'skyrocket_add_search_menu_item' ) ) { function skyrocket_add_search_menu_item( $items, $args ) { $defaults = skyrocket_generate_defaults(); if( get_theme_mod( 'search_menu_icon', $defaults['search_menu_icon'] ) ) { if( $args->theme_location == 'primary' ) { $items .= ''; } } return $items; } } add_filter( 'wp_nav_menu_items', 'skyrocket_add_search_menu_item', 10, 2 ); /** * Return a string containing the sample TinyMCE Control * This is a sample function to show how you can use the TinyMCE Control for footer credits in your Theme * Add the following three lines of code to your footer.php file to display the content of your sample TinyMCE Control * */ if ( ! function_exists( 'skyrocket_get_credits' ) ) { function skyrocket_get_credits() { $defaults = skyrocket_generate_defaults(); // wpautop this so that it acts like the new visual text widget, since we're using the same TinyMCE control return wpautop( get_theme_mod( 'sample_tinymce_editor', $defaults['sample_tinymce_editor'] ) ); } } /** * Set our Customizer default options */ if ( ! function_exists( 'skyrocket_generate_defaults' ) ) { function skyrocket_generate_defaults() { $customizer_defaults = array( 'social_newtab' => 0, 'social_urls' => '', 'social_alignment' => 'alignright', 'social_rss' => 0, 'social_url_icons' => '', 'contact_phone' => '', 'search_menu_icon' => 0, 'woocommerce_shop_sidebar' => 1, 'woocommerce_product_sidebar' => 0, 'sample_toggle_switch' => 0, 'sample_slider_control' => 48, 'sample_slider_control_small_step' => 2, 'sample_sortable_repeater_control' => '', 'sample_image_radio_button' => 'sidebarright', 'sample_text_radio_button' => 'right', 'sample_image_checkbox' => 'stylebold,styleallcaps', 'sample_single_accordion' => '', 'sample_alpha_color' => 'rgba(209,0,55,0.7)', 'sample_wpcolorpicker_alpha_color' => 'rgba(55,55,55,0.5)', 'sample_wpcolorpicker_alpha_color2' => 'rgba(33,33,33,0.8)', 'sample_pill_checkbox' => 'tiger,elephant,hippo', 'sample_pill_checkbox2' => 'captainmarvel,msmarvel,squirrelgirl', 'sample_pill_checkbox3' => 'author,categories,comments', 'sample_simple_notice' => '', 'sample_dropdown_select2_control_single' => 'vic', 'sample_dropdown_select2_control_multi' => 'Antarctica/McMurdo,Australia/Melbourne,Australia/Broken_Hill', 'sample_dropdown_select2_control_multi2' => 'Atlantic/Stanley,Australia/Darwin', 'sample_dropdown_posts_control' => '', 'sample_tinymce_editor' => '', 'sample_google_font_select' => json_encode( array( 'font' => 'Open Sans', 'regularweight' => 'regular', 'italicweight' => 'italic', 'boldweight' => '700', 'category' => 'sans-serif' ) ), 'sample_default_text' => '', 'sample_email_text' => '', 'sample_url_text' => '', 'sample_number_text' => '', 'sample_hidden_text' => '', 'sample_date_text' => '', 'sample_default_checkbox' => 0, 'sample_default_select' => 'jet-fuel', 'sample_default_radio' => 'spider-man', 'sample_default_dropdownpages' => '1548', 'sample_default_textarea' => '', 'sample_default_color' => '#333', 'sample_default_media' => '', 'sample_default_image' => '', 'sample_default_cropped_image' => '', 'sample_date_only' => '2017-08-28', 'sample_date_time' => '2017-08-28 16:30:00', 'sample_date_time_no_past_date' => date( 'Y-m-d' ), ); return apply_filters( 'skyrocket_customizer_defaults', $customizer_defaults ); } } /** * Load all our Customizer options */ //include_once trailingslashit( dirname(__FILE__) ) . 'inc/customizer.php'; /** * Load all our Customizer Custom Controls */ require_once trailingslashit( dirname(__FILE__) ) . 'inc/custom-controls.php';