Skip to content

Commit a851062

Browse files
committed
Better targeting when deciding whether to load Dashboard Panel.
See cuny-academic-commons/commons-in-a-box#541.
1 parent 610d15c commit a851062

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

includes/dashboard-panel.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,9 @@ function get_dashboard_panel_settings() {
5151
* @return void
5252
*/
5353
function display() {
54-
global $pagenow;
55-
5654
// Only enqueue on the main Dashboard page.
57-
if ( 'index.php' !== $pagenow ) {
55+
$screen = get_current_screen();
56+
if ( ! $screen || 'dashboard' !== $screen->id ) {
5857
return;
5958
}
6059

0 commit comments

Comments
 (0)