@@ -22,8 +22,8 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | public function __construct() |
| 24 | 24 | { |
| 25 | - $this->file = realpath( dirname( dirname( __FILE__ )) . '/pollux.php' ); |
|
| 26 | - $this->gatekeeper = new GateKeeper( plugin_basename( $this->file )); |
|
| 25 | + $this->file = realpath( dirname( dirname( __FILE__ ) ) . '/pollux.php' ); |
|
| 26 | + $this->gatekeeper = new GateKeeper( plugin_basename( $this->file ) ); |
|
| 27 | 27 | |
| 28 | 28 | $data = get_file_data( $this->file, array( |
| 29 | 29 | 'id' => 'Text Domain', |
@@ -46,10 +46,10 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | $controller = $this->make( 'Controller' ); |
| 48 | 48 | |
| 49 | - add_action( 'admin_enqueue_scripts', array( $controller, 'registerAssets' )); |
|
| 50 | - add_action( 'admin_init', array( $controller, 'removeDashboardWidgets' )); |
|
| 51 | - add_action( 'wp_before_admin_bar_render', array( $controller, 'removeWordPressMenu' )); |
|
| 52 | - add_filter( 'admin_footer_text', array( $controller, 'filterWordPressFooter' )); |
|
| 49 | + add_action( 'admin_enqueue_scripts', array( $controller, 'registerAssets' ) ); |
|
| 50 | + add_action( 'admin_init', array( $controller, 'removeDashboardWidgets' ) ); |
|
| 51 | + add_action( 'wp_before_admin_bar_render', array( $controller, 'removeWordPressMenu' ) ); |
|
| 52 | + add_filter( 'admin_footer_text', array( $controller, 'filterWordPressFooter' ) ); |
|
| 53 | 53 | |
| 54 | 54 | // Disallow indexing of the site on non-production environments |
| 55 | 55 | if( !$this->environment( 'production' ) && !is_admin() ) { |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | { |
| 65 | 65 | Facade::clearResolvedInstances(); |
| 66 | 66 | Facade::setFacadeApplication( $this ); |
| 67 | - $this->config = ( new Config( $this ))->get(); |
|
| 67 | + $this->config = ( new Config( $this ) )->get(); |
|
| 68 | 68 | $this->registerAliases(); |
| 69 | 69 | $classNames = array( |
| 70 | 70 | 'MetaBox\MetaBox', 'PostType\PostType', 'Settings\Settings', 'Taxonomy\Taxonomy', |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | public function environment( $checkFor = '' ) |
| 82 | 82 | { |
| 83 | 83 | $environment = defined( 'WP_ENV' ) ? WP_ENV : 'production'; |
| 84 | - if( !empty( $checkFor )) { |
|
| 84 | + if( !empty( $checkFor ) ) { |
|
| 85 | 85 | return $environment == $checkFor; |
| 86 | 86 | } |
| 87 | 87 | return $environment; |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $option = apply_filters( 'pollux/settings/option', Settings::ID ); |
| 96 | 96 | $settings = get_option( $option ); |
| 97 | 97 | if( !$settings ) { |
| 98 | - update_option( $option, [] ); |
|
| 98 | + update_option( $option, [ ] ); |
|
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | |
@@ -146,6 +146,6 @@ discard block |
||
| 146 | 146 | */ |
| 147 | 147 | public function url( $path = '' ) |
| 148 | 148 | { |
| 149 | - return esc_url( plugin_dir_url( $this->file ) . ltrim( trim( $path ), '/' )); |
|
| 149 | + return esc_url( plugin_dir_url( $this->file ) . ltrim( trim( $path ), '/' ) ); |
|
| 150 | 150 | } |
| 151 | 151 | } |