add_node(
array(
'id' => 'cachingout',
'title' => ''
. CachingOut_Brand::mark( 'currentColor', 'currentColor', 20, CachingOut_Brand::VIEWBOX_TIGHT, 'display:block;' )
. ''
. '' . esc_html__( 'Caching Out', 'cachingout' ) . '',
'href' => admin_url( 'admin.php?page=cachingout' ),
'meta' => array(
'title' => __( 'Caching Out — Performance', 'cachingout' ),
),
)
);
$admin_bar->add_node(
array(
'id' => 'cachingout-purge',
'parent' => 'cachingout',
'title' => __( 'Purge Cache', 'cachingout' ),
'href' => $purge_nonce_url,
'meta' => array(
'title' => __( 'Clear all cached pages', 'cachingout' ),
),
)
);
// Preloading is a Pro feature (spec 30): the item exists only while
// the add-on that handles admin_post_cachingout_preload is switched on.
if ( class_exists( 'CachingOut_Features' ) && CachingOut_Features::available( 'preload' ) ) {
$admin_bar->add_node(
array(
'id' => 'cachingout-preload',
'parent' => 'cachingout',
'title' => __( 'Preload Cache', 'cachingout' ),
'href' => $preload_nonce_url,
'meta' => array(
'title' => __( 'Warm the cache by crawling the sitemap', 'cachingout' ),
),
)
);
}
/**
* Fires after the free edition's admin-bar items are added.
*
* @since 1.21.0
*
* @param WP_Admin_Bar $admin_bar Admin bar instance.
*/
do_action( 'cachingout_admin_bar_items', $admin_bar );
}
}