From 56b71e848b0a0dec40cef88ecf47566200b6da32 Mon Sep 17 00:00:00 2001 From: Gustavo Bordoni Date: Tue, 11 Feb 2014 17:31:23 -0200 Subject: [PATCH] Workin on Coding Standards for #11 #12 --- stream-reports.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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;