'; } } add_action( 'wp_head', 'avanti_pingback_header' ); /** * Change Read more text. * * Change excerpt read more link text based on custom text entered in * theme customizer. * * @return string */ function avanti_excerpt_teaser() { $url = esc_url( get_permalink() ); $text = esc_html__( 'Continue reading', 'avanti' ); $title = get_the_title(); if ( 0 === strlen( $title ) ) : $screen_reader = ''; else : $screen_reader = sprintf( '%s', $title ); endif; $excerpt_teaser = sprintf( '
', $url, $text, $screen_reader ); return $excerpt_teaser; } add_filter( 'excerpt_more', 'avanti_excerpt_teaser' ); /** * Enqueue inline link color to 'head' */ function avanti_link_color() { $output = ''; $color = get_theme_mod( 'avanti_theme_color', '' ); 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( 'avanti-style', $output ); } } add_action( 'wp_enqueue_scripts', 'avanti_link_color', 50 );