🏡 index : ~doyle/koselig.git

author Jordan Doyle <jordan@doyle.wf> 2016-10-04 20:27:40.0 +00:00:00
committer Jordan Doyle <jordan@doyle.wf> 2016-10-04 20:27:40.0 +00:00:00
commit
904c233b181a0a1158184115034ec9a253788453 [patch]
tree
d1dac8957a2b0788ec51c9d90614387173aaa7e5
parent
a98df65de995454fe1aa31f82759fab9e3504f7c
download
904c233b181a0a1158184115034ec9a253788453.tar.gz

use globals variable rather than global



Diff

 src/Providers/WordpressServiceProvider.php | 1 +
 src/Support/Wordpress.php                  | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/Providers/WordpressServiceProvider.php b/src/Providers/WordpressServiceProvider.php
index 93e3c02..9aff474 100644
--- a/src/Providers/WordpressServiceProvider.php
+++ b/src/Providers/WordpressServiceProvider.php
@@ -59,6 +59,7 @@ class WordpressServiceProvider extends ServiceProvider
        $this->setLocationConstants();

        if ($this->app->runningInConsole()) {
            // allow wordpress to run, even when running from console (ie. artisan compiling)
            $_SERVER['SERVER_PROTOCOL'] = 'https';
        }

diff --git a/src/Support/Wordpress.php b/src/Support/Wordpress.php
index 933bf60..5ab59b0 100644
--- a/src/Support/Wordpress.php
+++ b/src/Support/Wordpress.php
@@ -17,9 +17,7 @@ class Wordpress
     */
    public static function query()
    {
        global $wp_query;

        return $wp_query;
        return $GLOBALS['wp_query'];
    }

    /**