Moved toolbar hook to later priority to capture more of other actions.
This commit is contained in:
1 parent
c874c19c91
commit
6818236f83
1 file changed
+2
-2
@@ -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'] ) ),
|
||||
] ),
|
||||
|
||||
Reference in new issue
Block a user