sanitize_order_array( $order ); $markup = ''; $markup .= ''; echo wp_kses( $markup, business_consultant_finder_alowed_tags() ); } /** * Get the comments with a link. * * @return string */ private function get_comments() { $comments_number = get_comments_number(); if ( ! comments_open() ) { return ''; } if ( $comments_number == 0 ) { return ''; } else { /* translators: %s: number of comments */ $comments = sprintf( _n( '%s Comment', '%s Comments', $comments_number, 'business-consultant-finder' ), $comments_number ); } return '' . esc_html( $comments ) . ''; } /** * Makes sure there's a valid meta order array. * * @param array $order meta order array. * * @return mixed */ private function sanitize_order_array( $order ) { $allowed_order_values = array( 'author', 'date', 'category', 'comments', ); foreach ( $order as $index => $value ) { if ( ! in_array( $value, $allowed_order_values ) ) { unset( $order[ $index ] ); } } return $order; } /** * Render the tags list. */ public function render_tags_list() { $tags = get_the_tags(); if ( ! is_array( $tags ) ) { return; } $html = '
'; $html .= '' . esc_html__( 'Tags', 'business-consultant-finder' ) . ':'; foreach ( $tags as $tag ) { $tag_link = get_tag_link( $tag->term_id ); $html .= ''; } $html .= '
'; echo wp_kses_post( $html ); } /** * Get