diff --git a/stream-reports.php b/stream-reports.php index 638bc6626..c454f28ab 100644 --- a/stream-reports.php +++ b/stream-reports.php @@ -139,22 +139,21 @@ public function page() { 'slug' => 'all', 'path' => null, ); - if ( isset( $_GET['view'] ) && !empty( $_GET['view'] ) ){ + if ( isset( $_GET['view'] ) && ! empty( $_GET['view'] ) ){ $view->slug = $_GET['view']; } // First we check if the file exists in our plugin folder, otherwhise give the user an error - if ( ! file_exists( WP_STREAM_REPORTS_VIEW_DIR . sanitize_file_name( $view->slug ) . ".php" ) ){ + if ( ! file_exists( WP_STREAM_REPORTS_VIEW_DIR . sanitize_file_name( $view->slug ) . '.php' ) ){ $view->slug = 'error'; } - // Define the path for the view we - $view->path = WP_STREAM_REPORTS_VIEW_DIR . sanitize_file_name( $view->slug ) . ".php"; + $view->path = WP_STREAM_REPORTS_VIEW_DIR . sanitize_file_name( $view->slug ) . '.php'; // Execute some actions before including the view, to allow others to hook in here // Use these to do stuff related to the view you are working with - do_action( "stream-reports-view", $view ); + do_action( 'stream-reports-view', $view ); do_action( "stream-reports-view-{$view->slug}", $view ); include_once $view->path;