beans_wp_title

Deprecated. Modify head wp title.

This function is deprecated since it was replaced by the ‘title-tag’ theme support.

beans_wp_title( string $title, string $sep )

Return: (string) The modified title.

Parameters

NameTypeRequiredDefaultDescription
$titlestringtrue-The WordPress default title.
$sepstringtrue-The title separator.

Source

function beans_wp_title( $title, $sep ) {

	_deprecated_function( __FUNCTION__, '1.2.0', 'wp_title()' );

	global $page, $paged;

	if ( is_feed() ) {
		return $title;
	}

	// Add the blog name.
	$title .= get_bloginfo( 'name' );

	// Add the blog description for the home/front page.
	if ( ( $site_description = get_bloginfo( 'description', 'display' ) ) && ( is_home() || is_front_page() ) ) {
		$title .= " $sep $site_description";
	}

	// Add a page number if necessary.
	if ( $paged >= 2 || $page >= 2 ) {
		$title .= " $sep " . sprintf( __( 'Page %s', 'tm-beans' ), max( $paged, $page ) );
	}

	return $title;

}