@@ -13,10 +13,10 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function buildClassName( $name, $path = '' ) |
15 | 15 | { |
16 | - $className = array_map( 'ucfirst', array_map( 'strtolower', preg_split( '/[-_]/', $name ))); |
|
16 | + $className = array_map( 'ucfirst', array_map( 'strtolower', preg_split( '/[-_]/', $name ) ) ); |
|
17 | 17 | $className = implode( '', $className ); |
18 | 18 | return !empty( $path ) |
19 | - ? str_replace( '\\\\', '\\', sprintf( '%s\%s', $path, $className )) |
|
19 | + ? str_replace( '\\\\', '\\', sprintf( '%s\%s', $path, $className ) ) |
|
20 | 20 | : $className; |
21 | 21 | } |
22 | 22 | |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function buildMethodName( $name, $prefix = 'get' ) |
29 | 29 | { |
30 | - return lcfirst( $this->buildClassName( $prefix . '-' . $name )); |
|
30 | + return lcfirst( $this->buildClassName( $prefix . '-' . $name ) ); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | public function getCurrentScreen() |
64 | 64 | { |
65 | 65 | global $current_screen, $pagenow; |
66 | - if( isset( $current_screen )) { |
|
66 | + if( isset( $current_screen ) ) { |
|
67 | 67 | $current_screen->pagenow = $pagenow; |
68 | 68 | return $current_screen; |
69 | 69 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function startsWith( $needle, $haystack ) |
83 | 83 | { |
84 | - return substr( $haystack, 0, strlen( $needle )) === $needle; |
|
84 | + return substr( $haystack, 0, strlen( $needle ) ) === $needle; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function filterWordPressFooter( $text ) |
27 | 27 | { |
28 | - if( $this->app->config['remove_wordpress_footer'] )return; |
|
28 | + if( $this->app->config[ 'remove_wordpress_footer' ] )return; |
|
29 | 29 | return $text; |
30 | 30 | } |
31 | 31 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | { |
38 | 38 | $screen = ( new Helper )->getCurrentScreen(); |
39 | 39 | |
40 | - if(( new Helper )->endsWith( '_archive', $screen->id ) && $screen->pagenow == 'edit.php' ) { |
|
40 | + if( ( new Helper )->endsWith( '_archive', $screen->id ) && $screen->pagenow == 'edit.php' ) { |
|
41 | 41 | wp_enqueue_script( 'editor-expand' ); |
42 | 42 | wp_enqueue_script( 'common' ); |
43 | 43 | wp_enqueue_script( 'wp-lists' ); |
@@ -47,24 +47,24 @@ discard block |
||
47 | 47 | wp_enqueue_script( 'jquery-touch-punch' ); |
48 | 48 | } |
49 | 49 | } |
50 | - if( $screen->id == sprintf( 'toplevel_page_%s', Settings::id() )) { |
|
50 | + if( $screen->id == sprintf( 'toplevel_page_%s', Settings::id() ) ) { |
|
51 | 51 | wp_enqueue_script( 'common' ); |
52 | 52 | wp_enqueue_script( 'wp-lists' ); |
53 | 53 | wp_enqueue_script( 'postbox' ); |
54 | 54 | } |
55 | 55 | wp_enqueue_style( 'pollux/main.css', |
56 | 56 | $this->app->url( 'assets/main.css' ), |
57 | - apply_filters( 'pollux/enqueue/css/deps', [] ), |
|
57 | + apply_filters( 'pollux/enqueue/css/deps', [ ] ), |
|
58 | 58 | $this->app->version |
59 | 59 | ); |
60 | 60 | wp_enqueue_script( 'pollux/main.js', |
61 | 61 | $this->app->url( 'assets/main.js' ), |
62 | - apply_filters( 'pollux/enqueue/js/deps', [] ), |
|
62 | + apply_filters( 'pollux/enqueue/js/deps', [ ] ), |
|
63 | 63 | $this->app->version |
64 | 64 | ); |
65 | 65 | wp_localize_script( 'pollux/main.js', |
66 | 66 | apply_filters( 'pollux/enqueue/js/localize/name', $this->app->id ), |
67 | - apply_filters( 'pollux/enqueue/js/localize/variables', [] ) |
|
67 | + apply_filters( 'pollux/enqueue/js/localize/variables', [ ] ) |
|
68 | 68 | ); |
69 | 69 | } |
70 | 70 | |
@@ -74,11 +74,11 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function removeDashboardWidgets() |
76 | 76 | { |
77 | - if( !$this->app->config['remove_dashboard_widgets'] )return; |
|
77 | + if( !$this->app->config[ 'remove_dashboard_widgets' ] )return; |
|
78 | 78 | $widgets = apply_filters( 'pollux/dashoard/widgets', [ |
79 | 79 | 'dashboard_primary', |
80 | 80 | 'dashboard_quick_press', |
81 | - ]); |
|
81 | + ] ); |
|
82 | 82 | foreach( $widgets as $widget ) { |
83 | 83 | remove_meta_box( $widget, 'dashboard', 'normal' ); |
84 | 84 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function removeWordPressMenu() |
92 | 92 | { |
93 | - if( !$this->app->config['remove_wordpress_menu'] )return; |
|
93 | + if( !$this->app->config[ 'remove_wordpress_menu' ] )return; |
|
94 | 94 | global $wp_admin_bar; |
95 | 95 | $wp_admin_bar->remove_menu( 'wp-logo' ); |
96 | 96 | } |