Shows the title, the post thumbnail and the excerpt for every menu entry.

Additional markup will be appended to the default menu entry.

author etessore
version 1.0.0
package classes

 Methods

Initializes the object with default values.

__construct() 

Hint: overload this if you want to change the printed markup

Adds a class to the li

add_class(string $class) : \ShowItemExcerptWalkerNavMenu

Parameters

$class

string

the class

Returns

\ShowItemExcerptWalkerNavMenu$this for chainability

Builds the id of the html li element

get_container_id(object $item, array $args) : string

Parameters

$item

object

the menu item

$args

array

additional arguments

Returns

stringthe id

Builds the %excerpt% substitution

get_excerpt($item) : \Ambigous

Parameters

$item

Returns

\Ambigous the excerpt

Builds the %id% substitution

get_excerpt_id($item) : string

Parameters

$item

Returns

stringthe id

Builds the %href% substitution

get_href($item) : string

Parameters

$item

Returns

stringthe href for the current menu element

Builds the %image% substitution

get_image($item, string $size, array $args) : string

Parameters

$item

$size

string

the media size

$args

array

optional arguments for the anchor

Returns

stringthe image markup

Builds the %title% substitution

get_title($item) : \Ambigous

Parameters

$item

Returns

\Ambigous the title

Sets the thumbnail media dimension

set_thumb_media_size(string $size) : \ShowItemExcerptWalkerNavMenu

Parameters

$size

string

the media dimension

Returns

\ShowItemExcerptWalkerNavMenu$this for chainability

(non-PHPdoc)

start_el(string $output, object $item, int $depth, int $args) 
see \Walker_Nav_Menu::start_el()

Parameters

$output

string

Passed by reference. Used to append additional content.

$item

object

Menu item data object.

$depth

int

Depth of menu item. Used for padding.

$args

int

 Properties

 

$classes 
 

the excerpt buffer

$excerpt_output : string
 

$thumb_media_size 
 

the template

$tpl : string