AnsPress_Reputation_Query::the_ref_content()
Description #
Out put reference content.
Source #
File: includes/reputation.php
public function the_ref_content() { if ( in_array( $this->reputation->parent, array( 'post', 'question', 'answer' ), true ) ) { echo '<a class="ap-reputation-ref" href="' . esc_url( ap_get_short_link( array( 'ap_p' => $this->reputation->rep_ref_id ) ) ) . '">'; if ( ! empty( $this->reputation->ref->post_title ) ) { echo '<strong>' . esc_html( $this->reputation->ref->post_title ) . '</strong>'; } if ( ! empty( $this->reputation->ref->post_content ) ) { echo '<p>' . esc_html( ap_truncate_chars( wp_strip_all_tags( $this->reputation->ref->post_content ), 200 ) ) . '</p>'; } echo '</a>'; } elseif ( 'comment' === $this->reputation->parent ) { echo '<a class="ap-reputation-ref" href="' . esc_url( ap_get_short_link( array( 'ap_c' => $this->reputation->rep_ref_id ) ) ) . '">'; if ( ! empty( $this->reputation->ref->comment_content ) ) { echo '<p>' . esc_html( ap_truncate_chars( wp_strip_all_tags( $this->reputation->ref->comment_content ), 200 ) ) . '</p>'; } echo '</a>'; } }
Expand full source code Collapse full source code View on GitHub: includes/reputation.php:901
Add your comment