', esc_url( get_bloginfo( 'pingback_url' ) ) );
}
}
add_action( 'wp_head', 'eviewp_pingback_header' );
/**
* Customizes the title of the Archive Page
*
* Credits: https://wordpress.stackexchange.com/a/179590
*/
function eviewp_get_archive_title( $title ) {
if ( is_category() ) {
$title = '' . esc_html__( 'Browsing category', 'eviewp' ) . '' . '
';
} elseif ( is_tag() ) {
$title = '' . esc_html__( 'Browsing tag', 'eviewp' ) . '' . '';
} elseif ( is_search() ) {
$title = '' . esc_html__( 'Search Results for', 'eviewp' ) . '' . '';
} elseif ( is_author() ) {
$title = '' . esc_html__( 'All Posts by', 'eviewp' ) . '' . '' ;
} elseif ( is_tax() ) { // for custom post types
/* translators: 1: single term taxonomy title */
$title = '' . esc_html__( 'Browsing', 'eviewp' ) . '' . ''; // phpcs:ignore WordPress.WP.I18n.NoEmptyStrings
} elseif ( is_post_type_archive() ) {
$title = '' . esc_html__( 'Browsing', 'eviewp' ) . '' . '';
}
return $title;
}
add_filter( 'get_the_archive_title', 'eviewp_get_archive_title' );
/**
* Returns the bright shade for a HEX color
*
* $color - HEX value
* $percent - percent of brightness/dullness
*/
function eviewpColorShade( $color, $percent ) {
$num = base_convert(substr($color, 1), 16, 10);
$amt = round(2.55 * $percent);
$r = ($num >> 16) + $amt;
$b = ($num >> 8 & 0x00ff) + $amt;
$g = ($num & 0x0000ff) + $amt;
$partialColor = '#' . substr( base_convert(0x1000000 + ($r<255?$r<1?0:$r:255)*0x10000 + ($b<255?$b<1?0:$b:255)*0x100 + ($g<255?$g<1?0:$g:255), 10, 16), 1 );
$colorPostfix = substr( $color, 5 );
$finalColor = substr( $partialColor, 0, 5 ) . $colorPostfix;
return $finalColor;
}
// Search Modal at the bottom
function eviewpSearchModal() {
?>