'; } } add_action( 'wp_head', 'avani_pingback_header' ); /** * Change Read more text. * * Change excerpt read more link text based on custom text entered in * theme customizer. * * @return string */ function avani_excerpt_teaser() { $url = esc_url( get_permalink() ); $text = __( 'Continue reading', 'avani' ); $title = get_the_title(); if ( 0 === strlen( $title ) ) : $screen_reader = ''; else : $screen_reader = sprintf( '%s', $title ); endif; $excerpt_teaser = sprintf( '

%2$s %3$s

', $url, $text, $screen_reader ); return $excerpt_teaser; } add_filter( 'excerpt_more', 'avani_excerpt_teaser' ); /** * Enqueue inline link color to 'head' */ function avani_link_color() { $output = ''; $color = get_theme_mod( 'avani_theme_color', '' ); // Escape $color. Output only if $color is a 3 or 6 digit hex color (with #). if ( '' !== $color && preg_match( '|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) { $output .= sprintf( ' button:hover, input:hover[type="button"], input:hover[type="reset"], input:hover[type="submit"] { background-color: %1$s; border-color: %1$s; } button:focus, input:focus[type="button"], input:focus[type="reset"], input:focus[type="submit"] { background-color: %1$s; border-color: %1$s; } input:focus, textarea:focus { border-color: %1$s; } a { color: %1$s; } .nav-menu a:hover, .nav-menu a:focus { color: %1$s; } .nav-next a:hover, .nav-previous a:hover, .nav-next a:focus, .nav-previous a:focus { color: %1$s; } .widget-title > span { border-bottom: 2px solid %1$s; }', $color ); } if ( '' !== $output ) { wp_add_inline_style( 'avani-style', $output ); } } add_action( 'wp_enqueue_scripts', 'avani_link_color', 50 ); /** * Function to show the footer info, copyright information. */ function avani_footer_info() { printf( __( 'Theme by %1$s. Powered by %2$s', 'avani' ), 'PremiumWP', 'WordPress' ); }