Tagged: catch base
- This topic has 4 replies, 2 voices, and was last updated 9 years, 7 months ago by Sakin.
-
AuthorPosts
-
March 16, 2015 at 3:42 am #53400FuchurMember
Hi The skype social button in this theme links to a href. I think I found the code where this is done. But I would like that the skype button calls me when someone clicks it.
So I made the code in inc/catchbase-social-icons.php
foreach ( $social_icons as $key => $value ) if( $value !='' ){ $title = explode( '-', $key ); if ( $key == 'Mail' ) $output .= '<a class="genericon_parent genericon genericon-'. strtolower( $key ) .'" target="_blank" title="'. __( 'Mail', 'catchbase') . '" href="mailto:'. sanitize_email( $value ) .'"><span class="screen-reader-text">'. __( 'Skype', 'catchbase') . '</span> </a>'; else if ( $key == 'Skype' ) $output .= '<a class="genericon_parent genericon genericon-'. strtolower( $key ) .'" target="_blank" title="'. __( 'Skype', 'catchbase') . '" href="skype:'. $value .'?call"><span class="screen-reader-text">'. __( 'Skype', 'catchbase') . '</span> </a>'; else $output .= '<a class="genericon_parent genericon genericon-'. strtolower( $key ) .'" target="_blank" title="'. $title[ 0 ] .'" href="'. esc_url( $value ) .'"><span class="screen-reader-text">'. $title[ 0 ] .'</span> </a>'; }
But it is not picked up in the header, what am I doing wrong?
Ta
March 16, 2015 at 9:43 am #53420SakinKeymaster@Fuchur: Your code look good. After you update the code. Did you change any value in Customizer social icons so that it clears the transient cache.
We are in the process of adding in the theme in next version update. We are in the process of adding two one for Skype Call and another for skype call my number. Thanks 🙂
March 16, 2015 at 3:41 pm #53427FuchurMemberAha, the joys of caching where you dont expect it 😉
However still one minor issue is that my code now generates:
skype:http://username?call
Quick hint where i should eliminate the http?
Great to hear it will be part of an update!
Thanks Frank
March 16, 2015 at 3:49 pm #53428FuchurMemberFound it
in /inc/customizer-includes/catchbase-customizer-social-icons.php
Changed the following:
if( $option == 'Email' ){ $wp_customize->add_setting( 'catchbase_theme_options['. $lower_case_option .'_link]', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_email', ) ); } else if( $option == 'Skype' ){ $wp_customize->add_setting( 'catchbase_theme_options['. $lower_case_option .'_link]', array( 'capability' => 'edit_theme_options', ) ); } else { $wp_customize->add_setting( 'catchbase_theme_options['. $lower_case_option .'_link]', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) );
March 17, 2015 at 11:39 pm #53556 -
AuthorPosts
- The topic ‘Skupe Social button’ is closed to new replies.