PHP 클래스 Rarst\Fragment_Cache\Menu_Cache

상속: extends Rarst\Fragment_Cache\Fragment_Cache
파일 보기 프로젝트 열기: rarst/fragment-cache

공개 메소드들

메소드 설명
disable ( )
enable ( )
fallback_cb ( array $args ) : string Restore arguments and fetch cached fragment for them.
pre_wp_nav_menu ( string $menu, object $args ) : string Return cached menu, using pre-generation hook.
update_menus_edited ( ) Save timestamp when menus were last modified for cache salt.
wp_nav_menu_args ( array $args ) : array Fake no menu matches to force menu run custom callback.
wp_nav_menu_objects ( array $menu_items ) : array Strip current* classes from menu items, since shared when cached.

보호된 메소드들

메소드 설명
callback ( string $name, array $args ) : string Generate and timestamp menu output.

메소드 상세

callback() 보호된 메소드

Generate and timestamp menu output.
protected callback ( string $name, array $args ) : string
$name string Fragment name.
$args array Arguments.
리턴 string

disable() 공개 메소드

public disable ( )

enable() 공개 메소드

public enable ( )

fallback_cb() 공개 메소드

Restore arguments and fetch cached fragment for them.
사용 중단:
public fallback_cb ( array $args ) : string
$args array Arguments.
리턴 string

pre_wp_nav_menu() 공개 메소드

Return cached menu, using pre-generation hook.
public pre_wp_nav_menu ( string $menu, object $args ) : string
$menu string Menu HTML to return.
$args object Menu arguments.
리턴 string

update_menus_edited() 공개 메소드

Save timestamp when menus were last modified for cache salt.
public update_menus_edited ( )

wp_nav_menu_args() 공개 메소드

Fake no menu matches to force menu run custom callback.
사용 중단:
public wp_nav_menu_args ( array $args ) : array
$args array Menu arguments.
리턴 array

wp_nav_menu_objects() 공개 메소드

Strip current* classes from menu items, since shared when cached.
public wp_nav_menu_objects ( array $menu_items ) : array
$menu_items array Array of menu item objects.
리턴 array