@@ -14,7 +14,9 @@ |
||
| 14 | 14 | |
| 15 | 15 | public function __construct( $plugin ) |
| 16 | 16 | { |
| 17 | - if( $this->proceed() )return; |
|
| 17 | + if( $this->proceed() ) { |
|
| 18 | + return; |
|
| 19 | + } |
|
| 18 | 20 | |
| 19 | 21 | $this->plugin = $plugin; |
| 20 | 22 | |
@@ -27,7 +27,9 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | public function init() |
| 29 | 29 | { |
| 30 | - if( !is_plugin_active( 'meta-box/meta-box.php' ))return; |
|
| 30 | + if( !is_plugin_active( 'meta-box/meta-box.php' )) { |
|
| 31 | + return; |
|
| 32 | + } |
|
| 31 | 33 | |
| 32 | 34 | $this->normalize(); |
| 33 | 35 | |
@@ -96,7 +98,9 @@ discard block |
||
| 96 | 98 | */ |
| 97 | 99 | public function register( $metaboxes = [] ) |
| 98 | 100 | { |
| 99 | - if( get_current_screen()->id != $this->hook )return; |
|
| 101 | + if( get_current_screen()->id != $this->hook ) { |
|
| 102 | + return; |
|
| 103 | + } |
|
| 100 | 104 | foreach( parent::register() as $metabox ) { |
| 101 | 105 | new SettingsMetaBox( $metabox ); |
| 102 | 106 | } |
@@ -151,7 +155,8 @@ discard block |
||
| 151 | 155 | */ |
| 152 | 156 | protected function getInstructions() |
| 153 | 157 | { |
| 154 | - return array_filter( $this->metaboxes, function( $metabox ) { |
|
| 158 | + return array_filter( $this->metaboxes, function( $metabox ) |
|
| 159 | + { |
|
| 155 | 160 | return $this->verifyMetaBoxCondition( $metabox['condition'] ); |
| 156 | 161 | }); |
| 157 | 162 | } |