\n"; } /** * @see Walker::start_el() * @since 3.0.0 * * @param string $output Passed by reference. Used to append additional content. * @param object $item Menu item data object. * @param int $depth Depth of menu item. Used for padding. * @param int $current_page Menu item ID. * @param object $args */ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; /** * Dividers, Headers or Disabled * ============================= * Determine whether the item is a Divider, Header, Disabled or regular * menu item. To prevent errors we use the strcasecmp() function to so a * comparison that is not case sensitive. The strcasecmp() function returns * a 0 if the strings are equal. */ if ( strcasecmp( $item->attr_title, 'divider' ) == 0 && $depth === 1 ) { $output .= $indent . ''; $fb_output .= ''; if ( $container ) $fb_output .= ''; echo $fb_output; } } } /** * A custom WordPress comment walker class to implement the Bootstrap 3 Media object in wordpress comment list. * * @package WP Bootstrap Comment Walker * @version 1.0.0 * @author Edi Amin * @license http://opensource.org/licenses/gpl-2.0.php GPL v2 or later * @link https://github.com/ediamin/wp-bootstrap-comment-walker */ class Bootstrap_Comment_Walker extends Walker_Comment { /** * Output a comment in the HTML5 format. * * @access protected * @since 1.0.0 * * @see wp_list_comments() * * @param object $comment Comment to display. * @param int $depth Depth of comment. * @param array $args An array of arguments. */ protected function html5_comment( $comment, $depth, $args ) { $tag = ( 'div' === $args['style'] ) ? 'div' : 'li'; ?> < id="comment-" has_children ? 'parent media' : 'media' ); ?>>
%s', get_comment_author_link() ); ?> comment_approved ) : ?>