'; $markup .= get_the_category_list( ', ', get_the_ID() ); $markup .= ''; echo wp_kses( $markup, $this->alowed_tags() ); } /** * Render meta list. * * @param array $order the order array. Passed through the action parameter. */ public function render_meta_list( $order, $wrp_class = '' ) { global $post; if ( ! is_array( $order ) || empty( $order ) || isset( $order['hide_meta'] ) ) { return; } $order = $this->sanitize_order_array( $order ); $markup = ''; $markup .= '
'; echo wp_kses( $markup, $this->alowed_tags() ); } /** * 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( 'avatar', 'author', 'date', 'category', 'comments', ); foreach ( $order as $index => $value ) { if ( ! in_array( $value, $allowed_order_values ) ) { unset( $order[ $index ] ); } } return $order; } /** * Get the get_avatar a link. * * @return string */ private function get_avatar( $order ) { if( !empty( $order ) && in_array( 'avatar',$order ) ) return ' '.get_avatar( get_the_author_meta('user_email'), $size = '60').' '; } /** * 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, 'bc-consulting' ), $comments_number ); } return '' . esc_html( $comments ) . ''; } /** * Render the tags list. */ public function render_tags_list() { $tags = get_the_tags(); if ( ! is_array( $tags ) ) { return; } $html = ' '; echo wp_kses_post( $html ); } /** * Get