PHP Class Twitter\WordPress\Site\Username

Since: 1.0.0
ファイルを表示 Open project: twitter/wordpress Class Usage Examples

Public Methods

Method Description
getSiteAttribution ( integer | string | boolean | null $post_id = null ) : string Attribute a webpage to a Twitter @username for the site or site section
getViaAttribution ( integer | string | null $post_id = null ) : string Attribute a Tweet created through a link on your site to a Twitter username

Method Details

getSiteAttribution() public static method

Similar to a site byline or masthead with Twitter attribution Affects Twitter Analytics
public static getSiteAttribution ( integer | string | boolean | null $post_id = null ) : string
$post_id integer | string | boolean | null WP_Post->ID, false response of get_the_ID, proprietary post ID, or null if outside of a post context or no post ID found
return string Twitter username or empty string

getViaAttribution() public static method

Attribute a Tweet created through a link on your site to a Twitter username
Since: 1.0.0
public static getViaAttribution ( integer | string | null $post_id = null ) : string
$post_id integer | string | null WP_Post->ID, proprietary post ID, or null if outside of a post context or no post ID found
return string Twitter username or empty string