Deprecated

This function has been deprecated.

ap_hover_card_attributes( integer $user_id, boolean $echo = true )

Description #

Return or echo hovercard data attribute.

Parameters #

  • $user_id
    integer (Required) User id.
  • $echo
    boolean (Optional) Echo or return? Default value: true

Changelog #

VersionDescription
4.1.0Introduced.

Source #

File: includes/deprecated.php

function ap_hover_card_attributes( $user_id, $echo = true ) {
	if ( $user_id > 0 ) {
		$attr = ' data-userid="' . $user_id . '"';

		if ( true !== $echo ) {
			return $attr;
		}

		echo $attr; // xss okay.
	}
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment