Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #53400
    Fuchur
    Member

    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

    #53420
    Sakin
    Keymaster

    @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 🙂

    #53427
    Fuchur
    Member

    Aha, 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

    #53428
    Fuchur
    Member

    Found 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',
    				) );
    #53556
    Sakin
    Keymaster

    @Fuchur: Nice. But we will be adding it soon in new version update.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Skupe Social button’ is closed to new replies.