From 28fa869706c51d311b6b49665e9163a3efe9be34 Mon Sep 17 00:00:00 2001 From: Tyler Carter Date: Fri, 4 Apr 2014 10:11:28 -0700 Subject: [PATCH 1/2] Move chart height filter to load_page call. Fixes #64 --- includes/meta-boxes.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/meta-boxes.php b/includes/meta-boxes.php index 446487269..f82f54fe4 100644 --- a/includes/meta-boxes.php +++ b/includes/meta-boxes.php @@ -44,7 +44,6 @@ public function __construct() { // Register all ajax action and check referer for this class WP_Stream_Reports::handle_ajax_request( $ajax_hooks, $this ); - add_filter( 'screen_settings', array( $this, 'chart_height_display' ), 10, 2 ); } /** @@ -109,6 +108,8 @@ public function load_page() { $this->setup_user(); } + add_filter( 'screen_settings', array( $this, 'chart_height_display' ), 10, 2 ); + // Enqueue all core scripts required for this page to work add_screen_option( 'layout_columns', array( 'max' => 2, 'default' => 2 ) ); From 97dc4f40ccd28ff8330db0b17ea999a82f17ca0a Mon Sep 17 00:00:00 2001 From: Frankie Jarrett Date: Fri, 4 Apr 2014 12:17:48 -0500 Subject: [PATCH 2/2] Add inline comment to action --- includes/meta-boxes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/meta-boxes.php b/includes/meta-boxes.php index f82f54fe4..3e7873d6b 100644 --- a/includes/meta-boxes.php +++ b/includes/meta-boxes.php @@ -43,7 +43,6 @@ public function __construct() { // Register all ajax action and check referer for this class WP_Stream_Reports::handle_ajax_request( $ajax_hooks, $this ); - } /** @@ -108,6 +107,7 @@ public function load_page() { $this->setup_user(); } + // Add screen option for chart height add_filter( 'screen_settings', array( $this, 'chart_height_display' ), 10, 2 ); // Enqueue all core scripts required for this page to work