@@ -12,6 +12,6 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | protected function getOption() |
| 14 | 14 | { |
| 15 | - return get_option( apply_filters( 'pollux/archives/option', Archive::ID ), [] ); |
|
| 15 | + return get_option( apply_filters( 'pollux/archives/option', Archive::ID ), [ ] ); |
|
| 16 | 16 | } |
| 17 | 17 | } |
@@ -21,9 +21,9 @@ discard block |
||
| 21 | 21 | { |
| 22 | 22 | parent::init(); |
| 23 | 23 | |
| 24 | - add_action( 'pollux/archives/saved', [$this, 'addCustomNoticeOnSave'] ); |
|
| 25 | - add_action( 'pollux/archives/editor', [$this, 'renderEditor'] ); |
|
| 26 | - add_filter( 'pollux/archives/metabox/submit', [$this, 'filterSubmitMetaBox'] ); |
|
| 24 | + add_action( 'pollux/archives/saved', [ $this, 'addCustomNoticeOnSave' ] ); |
|
| 25 | + add_action( 'pollux/archives/editor', [ $this, 'renderEditor' ] ); |
|
| 26 | + add_filter( 'pollux/archives/metabox/submit', [ $this, 'filterSubmitMetaBox' ] ); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
@@ -49,8 +49,8 @@ discard block |
||
| 49 | 49 | __( 'Archive', 'pollux' ), |
| 50 | 50 | 'edit_theme_options', |
| 51 | 51 | static::id(), |
| 52 | - [$this, 'renderPage'], |
|
| 53 | - ])); |
|
| 52 | + [ $this, 'renderPage' ], |
|
| 53 | + ] ) ); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | public function filterSubmitMetaBox( array $args ) |
| 73 | 73 | { |
| 74 | - $args[1] = __( 'Save Archive', 'pollux' ); |
|
| 74 | + $args[ 1 ] = __( 'Save Archive', 'pollux' ); |
|
| 75 | 75 | return $args; |
| 76 | 76 | } |
| 77 | 77 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | 'wp_autoresize_on' => true, |
| 92 | 92 | 'add_unload_trigger' => false, |
| 93 | 93 | ], |
| 94 | - ]); |
|
| 94 | + ] ); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | 'heading' => sprintf( __( '%s Archive', 'pollux' ), 'Post' ), |
| 107 | 107 | 'id' => static::id(), |
| 108 | 108 | 'title' => ArchiveMeta::get( 'title' ), |
| 109 | - ]); |
|
| 109 | + ] ); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | /** |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | protected function getDefaults() |
| 116 | 116 | { |
| 117 | - return []; |
|
| 117 | + return [ ]; |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /** |
@@ -30,8 +30,8 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | public function __construct() |
| 32 | 32 | { |
| 33 | - $this->file = realpath( dirname( dirname( __FILE__ )) . '/pollux.php' ); |
|
| 34 | - $this->gatekeeper = new GateKeeper( plugin_basename( $this->file )); |
|
| 33 | + $this->file = realpath( dirname( dirname( __FILE__ ) ) . '/pollux.php' ); |
|
| 34 | + $this->gatekeeper = new GateKeeper( plugin_basename( $this->file ) ); |
|
| 35 | 35 | |
| 36 | 36 | $data = get_file_data( $this->file, array( |
| 37 | 37 | 'id' => 'Text Domain', |
@@ -54,10 +54,10 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | $controller = $this->make( 'Controller' ); |
| 56 | 56 | |
| 57 | - add_action( 'admin_enqueue_scripts', array( $controller, 'registerAssets' )); |
|
| 58 | - add_action( 'admin_init', array( $controller, 'removeDashboardWidgets' )); |
|
| 59 | - add_action( 'wp_before_admin_bar_render', array( $controller, 'removeWordPressMenu' )); |
|
| 60 | - add_filter( 'admin_footer_text', array( $controller, 'filterWordPressFooter' )); |
|
| 57 | + add_action( 'admin_enqueue_scripts', array( $controller, 'registerAssets' ) ); |
|
| 58 | + add_action( 'admin_init', array( $controller, 'removeDashboardWidgets' ) ); |
|
| 59 | + add_action( 'wp_before_admin_bar_render', array( $controller, 'removeWordPressMenu' ) ); |
|
| 60 | + add_filter( 'admin_footer_text', array( $controller, 'filterWordPressFooter' ) ); |
|
| 61 | 61 | |
| 62 | 62 | // Disallow indexing of the site on non-production environments |
| 63 | 63 | if( !$this->environment( 'production' ) && !is_admin() ) { |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | public function environment( $checkFor = '' ) |
| 73 | 73 | { |
| 74 | 74 | $environment = defined( 'WP_ENV' ) ? WP_ENV : 'production'; |
| 75 | - if( !empty( $checkFor )) { |
|
| 75 | + if( !empty( $checkFor ) ) { |
|
| 76 | 76 | return $environment == $checkFor; |
| 77 | 77 | } |
| 78 | 78 | return $environment; |
@@ -83,8 +83,8 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | public function onActivation() |
| 85 | 85 | { |
| 86 | - if( !get_option( Settings::id() )) { |
|
| 87 | - update_option( Settings::id(), [] ); |
|
| 86 | + if( !get_option( Settings::id() ) ) { |
|
| 87 | + update_option( Settings::id(), [ ] ); |
|
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | 90 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | */ |
| 111 | 111 | public function url( $path = '' ) |
| 112 | 112 | { |
| 113 | - return esc_url( plugin_dir_url( $this->file ) . ltrim( trim( $path ), '/' )); |
|
| 113 | + return esc_url( plugin_dir_url( $this->file ) . ltrim( trim( $path ), '/' ) ); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | { |
| 121 | 121 | Facade::clearResolvedInstances(); |
| 122 | 122 | Facade::setFacadeApplication( $this ); |
| 123 | - $this->config = ( new Config( $this ))->get(); |
|
| 123 | + $this->config = ( new Config( $this ) )->get(); |
|
| 124 | 124 | $this->registerAliases(); |
| 125 | 125 | $classNames = array( |
| 126 | 126 | 'MetaBox\MetaBox', |