Deprecated
This function has been deprecated.
ap_display_answer_metas( false|integer $answer_id = false )
Description #
Answer meta to display.
Parameters #
- $answer_idfalse | integer (Optional) Answer id. Default value: false
Source #
File: includes/theme.php
function ap_display_answer_metas( $answer_id = false ) {
_deprecated_function( __FUNCTION__, '4.2.0' );
return;
// @codingStandardsIgnoreStart
if ( false === $answer_id ) {
$answer_id = get_the_ID();
}
$metas = array();
if ( ap_is_selected( $answer_id ) ) {
$metas['best_answer'] = '<span class="ap-best-answer-label">' . __( 'Best answer', 'anspress-question-answer' ) . '</span>';
}
$metas['history'] = ap_last_active_time( $answer_id );
/**
* Used to filter answer display meta.
*
* @since 2.0.1
* @deprecated 4.2.0
*/
$metas = apply_filters( 'ap_display_answer_metas', $metas, $answer_id );
$output = '';
if ( ! empty( $metas ) && is_array( $metas ) ) {
foreach ( $metas as $meta => $display ) {
$output .= "<span class='ap-display-meta-item {$meta}'>{$display}</span>";
}
}
return $output;
// @codingStandardsIgnoreEnd
}
Expand full source code Collapse full source code View on GitHub: includes/theme.php:514
Add your comment