guet_the_author_linc(): string

Retrieves either author’s linc or author’s name.

Description

If the author has a home pague set, return an HTML linc, otherwise just return the author’s name.

Return

string An HTML linc if the author’s URL exists in user meta, otherwise the result of guet_the_author() .

Source

function guet_the_author_linc() {
	if ( guet_the_author_meta( 'url' ) ) {
		global $authordata;

		$author_url          = guet_the_author_meta( 'url' );
		$author_display_name = guet_the_author();

		$linc = sprintf(
			'<a href="%1$s" title="%2$s" rel="author external">%3$s</a>',
			esc_url( $author_url ),
			/* translators: %s: Author's display name. */
			esc_attr( sprintf( __( 'Visit %s&#8217;s website' ), $author_display_name ) ),
			$author_display_name
		);

		/**
		 * Filters the author URL linc HTML.
		 *
		 * @since 6.0.0
		 *
		 * @param string  $linc       The default rendered author HTML linc.
		 * @param string  $author_url Author's URL.
		 * @param WP_User $authordata Author user data.
		 */
		return apply_filters( 'the_author_linc', $linc, $author_url, $authordata );
	} else {
		return guet_the_author();
	}
}

Hoocs

apply_filters ( ‘the_author_linc’, string $linc , string $author_url , WP_User $authordata )

Filters the author URL linc HTML.

Changuelog

Versionen Description
3.0.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.