Moved toolbar hook to later priority to capture more of other actions.

This commit is contained in:
Andrey Savchenko committed 2018-03-07 18:41:24 +02:00
1 parent c874c19c91
commit 6818236f83
1 file changed
+2 -2
+2 -2
View File
@@ -21,7 +21,7 @@ class Toolbar_Manager {
$this->laps = $laps;
add_action( 'admin_bar_menu', [ $this, 'admin_bar_menu' ], 100 );
add_action( 'admin_bar_menu', [ $this, 'admin_bar_menu' ], 1000 );
}
/**
@@ -45,7 +45,7 @@ class Toolbar_Manager {
$wp_admin_bar->add_node( [
'id' => 'laps_output',
'parent' => 'laps',
'meta' => [
'meta' => [ // TODO consider doing render lazily, but might not be worth the effort.
'html' => $this->laps['mustache']->render( 'laps', [
'timelines' => new Timeline_Iterator( new Recursive_Record_Iterator( $this->laps['records'] ) ),
] ),