bbp_get_author_ip( array $args = array() )
Return the author IP address of a post
Description Description
Parameters Parameters
- $args
-
(Optional) If an integer, it is used as reply id.
Default value: array()
Return Return
(string) Author link of reply
Source Source
File: includes/users/template.php
function bbp_get_author_ip( $args = array() ) { // Used as post id $post_id = is_numeric( $args ) ? (int) $args : 0; // Parse arguments against default values $r = bbp_parse_args( $args, array( 'post_id' => $post_id, 'before' => '<span class="bbp-author-ip">(', 'after' => ')</span>' ), 'get_author_ip' ); // Get the author IP meta value $author_ip = get_post_meta( $r['post_id'], '_bbp_author_ip', true ); $author_ip = ! empty( $author_ip ) ? $r['before'] . esc_html( $author_ip ) . $r['after'] : ''; // Filter & return return apply_filters( 'bbp_get_author_ip', $author_ip, $r, $args ); }
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |