wp-bootstrap-navwalker icon indicating copy to clipboard operation
wp-bootstrap-navwalker copied to clipboard

It would be really easy to add FontAwesome support!

Open jensstalder opened this issue 12 years ago • 1 comments

        /*
         * Glyphicons
         * ===========
         * Since the the menu item is NOT a Divider or Header we check the see
         * if there is a value in the attr_title property. If the attr_title
         * property is NOT null we apply it as the class name for the glyphicon.
         */
        if ( ! empty( $item->attr_title ) && strpos($item->attr_title, 'glyphicon-') === 0     ){
            $item_output .= '<a'. $attributes .'><span class="glyphicon ' . esc_attr( $item->attr_title ) . '"></span>&nbsp;';
        } elseif ( ! empty( $item->attr_title ) && strpos($item->attr_title, 'fa-') === 0 ) {
            $item_output .= '<a'. $attributes .'><span class="fa ' . esc_attr( $item->attr_title ) . '"></span>&nbsp;';
        } else{
            $item_output .= '<a'. $attributes .'>';
        }

jensstalder avatar Mar 22 '14 12:03 jensstalder

This is coming in the next version of the walker, we are creating a whole icon support structure.

SideQuestDIY avatar Apr 01 '14 17:04 SideQuestDIY