Walker_Comment::end_el() public WP 2.7.0
Ends the element output, if needed.
{} Это метод класса: Walker_Comment{}
Хуков нет.
Возвращает
null
. Null. Ничего.
Использование
$Walker_Comment = new Walker_Comment(); $Walker_Comment->end_el( $output, $comment, $depth, $args );
- $output(строка) (обязательный)
- Used to append additional content. Passed by reference.
- $comment(WP_Comment) (обязательный)
- The current comment object.
По умолчанию: current comment - $depth(число)
- Depth of the current comment.
- $args(массив)
- An array of arguments.
По умолчанию: empty array
Заметки
- Смотрите: Walker::end_el()
- Смотрите: wp_list_comments()
Список изменений
С версии 2.7.0 | Введена. |
Код Walker_Comment::end_el() Walker Comment::end el WP 5.7
public function end_el( &$output, $comment, $depth = 0, $args = array() ) {
if ( ! empty( $args['end-callback'] ) ) {
ob_start();
call_user_func( $args['end-callback'], $comment, $args, $depth );
$output .= ob_get_clean();
return;
}
if ( 'div' === $args['style'] ) {
$output .= "</div><!-- #comment-## -->\n";
} else {
$output .= "</li><!-- #comment-## -->\n";
}
}