Passed
Push — master ( 32d871...06bde6 )
by Paul
06:00
created
plugin/Controllers/SettingsController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
 			return $input;
22 22
 		}
23 23
 		$triggered = true;
24
-		if( !is_array( $input )) {
24
+		if( !is_array( $input ) ) {
25 25
 			$input = ['settings' => []];
26 26
 		}
27 27
 		if( key( $input ) == 'settings' ) {
28
-			glsr( Notice::class )->addSuccess( __( 'Settings updated.', 'site-reviews' ));
28
+			glsr( Notice::class )->addSuccess( __( 'Settings updated.', 'site-reviews' ) );
29 29
 		}
30 30
 		$options = array_replace_recursive( glsr( OptionManager::class )->all(), $input );
31 31
 		$options = $this->sanitizeSubmissions( $input, $options );
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	{
42 42
 		register_setting( Application::ID.'-settings', OptionManager::databaseKey(), [
43 43
 			'sanitize_callback' => [$this, 'callbackRegisterSettings'],
44
-		]);
44
+		] );
45 45
 	}
46 46
 
47 47
 	/**
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
 	 */
50 50
 	protected function sanitizeSubmissions( array $input, array $options )
51 51
 	{
52
-		if( isset( $input['settings']['submissions'] )) {
52
+		if( isset($input['settings']['submissions']) ) {
53 53
 			$inputForm = $input['settings']['submissions'];
54
-			$options['settings']['submissions']['required'] = isset( $inputForm['required'] )
54
+			$options['settings']['submissions']['required'] = isset($inputForm['required'])
55 55
 				? $inputForm['required']
56 56
 				: [];
57 57
 		}
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	protected function sanitizeTranslations( array $input, array $options )
65 65
 	{
66
-		if( isset( $input['settings']['strings'] )) {
67
-			$options['settings']['strings'] = array_values( array_filter( $input['settings']['strings'] ));
66
+		if( isset($input['settings']['strings']) ) {
67
+			$options['settings']['strings'] = array_values( array_filter( $input['settings']['strings'] ) );
68 68
 			array_walk( $options['settings']['strings'], function( &$string ) {
69
-				if( isset( $string['s2'] )) {
69
+				if( isset($string['s2']) ) {
70 70
 					$string['s2'] = wp_strip_all_tags( $string['s2'] );
71 71
 				}
72
-				if( isset( $string['p2'] )) {
72
+				if( isset($string['p2']) ) {
73 73
 					$string['p2'] = wp_strip_all_tags( $string['p2'] );
74 74
 				}
75 75
 			});
Please login to merge, or discard this patch.
plugin/Modules/System.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 			'inactive-plugin' => 'Inactive Plugins',
38 38
 			'setting' => 'Plugin Settings',
39 39
 		];
40
-		$systemInfo = array_reduce( array_keys( $details ), function( $carry, $key ) use( $details ) {
40
+		$systemInfo = array_reduce( array_keys( $details ), function( $carry, $key ) use($details) {
41 41
 			$methodName = glsr( Helper::class )->buildMethodName( 'get-'.$key.'-details' );
42 42
 			if( method_exists( $this, $methodName ) && $systemDetails = $this->$methodName() ) {
43 43
 				return $carry.$this->implode( $details[$key], $systemDetails );
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
 	{
55 55
 		$plugins = get_plugins();
56 56
 		$activePlugins = (array)get_option( 'active_plugins', [] );
57
-		$inactive = array_diff_key( $plugins, array_flip( $activePlugins ));
58
-		return $this->normalizePluginList( array_diff_key( $plugins, $inactive ));
57
+		$inactive = array_diff_key( $plugins, array_flip( $activePlugins ) );
58
+		return $this->normalizePluginList( array_diff_key( $plugins, $inactive ) );
59 59
 	}
60 60
 
61 61
 	/**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	public function getInactivePluginDetails()
80 80
 	{
81 81
 		$activePlugins = (array)get_option( 'active_plugins', [] );
82
-		return $this->normalizePluginList( array_diff_key( get_plugins(), array_flip( $activePlugins )));
82
+		return $this->normalizePluginList( array_diff_key( get_plugins(), array_flip( $activePlugins ) ) );
83 83
 	}
84 84
 
85 85
 	/**
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
 	{
90 90
 		$plugins = array_merge(
91 91
 			get_mu_plugins(),
92
-			get_plugins( '/../'.basename( WPMU_PLUGIN_DIR ))
92
+			get_plugins( '/../'.basename( WPMU_PLUGIN_DIR ) )
93 93
 		);
94
-		if( empty( $plugins ))return;
94
+		if( empty($plugins) )return;
95 95
 		return $this->normalizePluginList( $plugins );
96 96
 	}
97 97
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	 */
101 101
 	public function getMultisitePluginDetails()
102 102
 	{
103
-		if( !is_multisite() || empty( get_site_option( 'active_sitewide_plugins', [] )))return;
103
+		if( !is_multisite() || empty(get_site_option( 'active_sitewide_plugins', [] )) )return;
104 104
 		return $this->normalizePluginList( wp_get_active_network_plugins() );
105 105
 	}
106 106
 
@@ -122,11 +122,11 @@  discard block
 block discarded – undo
122 122
 			'Max Input Vars' => ini_get( 'max_input_vars' ),
123 123
 			'Memory Limit' => ini_get( 'memory_limit' ),
124 124
 			'Post Max Size' => ini_get( 'post_max_size' ),
125
-			'Session Cookie Path' => esc_html( ini_get( 'session.cookie_path' )),
126
-			'Session Name' => esc_html( ini_get( 'session.name' )),
127
-			'Session Save Path' => esc_html( ini_get( 'session.save_path' )),
128
-			'Session Use Cookies' => var_export( wp_validate_boolean( ini_get( 'session.use_cookies' )), true ),
129
-			'Session Use Only Cookies' => var_export( wp_validate_boolean( ini_get( 'session.use_only_cookies' )), true ),
125
+			'Session Cookie Path' => esc_html( ini_get( 'session.cookie_path' ) ),
126
+			'Session Name' => esc_html( ini_get( 'session.name' ) ),
127
+			'Session Save Path' => esc_html( ini_get( 'session.save_path' ) ),
128
+			'Session Use Cookies' => var_export( wp_validate_boolean( ini_get( 'session.use_cookies' ) ), true ),
129
+			'Session Use Only Cookies' => var_export( wp_validate_boolean( ini_get( 'session.use_only_cookies' ) ), true ),
130 130
 			'Upload Max Filesize' => ini_get( 'upload_max_filesize' ),
131 131
 		];
132 132
 	}
@@ -154,13 +154,13 @@  discard block
 block discarded – undo
154 154
 		$settings = glsr( OptionManager::class )->get( 'settings', [] );
155 155
 		$settings = $helper->flattenArray( $settings, true );
156 156
 		foreach( ['submissions.recaptcha.key', 'submissions.recaptcha.secret'] as $key ) {
157
-			if( empty( $settings[$key] ))continue;
157
+			if( empty($settings[$key]) )continue;
158 158
 			$settings[$key] = str_repeat( '*', 10 );
159 159
 		}
160 160
 		$details = [];
161 161
 		foreach( $settings as $key => $value ) {
162
-			if( $helper->startsWith( 'strings', $key ) && $helper->endsWith( 'id', $key ))continue;
163
-			$value = htmlspecialchars( trim( preg_replace('/\s\s+/', '\\n', $value )), ENT_QUOTES, 'UTF-8' );
162
+			if( $helper->startsWith( 'strings', $key ) && $helper->endsWith( 'id', $key ) )continue;
163
+			$value = htmlspecialchars( trim( preg_replace( '/\s\s+/', '\\n', $value ) ), ENT_QUOTES, 'UTF-8' );
164 164
 			$details[$key] = $value;
165 165
 		}
166 166
 		return $details;
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 				return $value;
241 241
 			}
242 242
 		}
243
-		return implode( ',', array_filter( [DB_HOST, $serverName] ));
243
+		return implode( ',', array_filter( [DB_HOST, $serverName] ) );
244 244
 	}
245 245
 
246 246
 	/**
@@ -261,8 +261,8 @@  discard block
 block discarded – undo
261 261
 	{
262 262
 		$plugins = get_plugins();
263 263
 		$activePlugins = (array)get_option( 'active_plugins', [] );
264
-		$inactive = $this->normalizePluginList( array_diff_key( $plugins, array_flip( $activePlugins )));
265
-		$active = $this->normalizePluginList( array_diff_key( $plugins, $inactive ));
264
+		$inactive = $this->normalizePluginList( array_diff_key( $plugins, array_flip( $activePlugins ) ) );
265
+		$active = $this->normalizePluginList( array_diff_key( $plugins, $inactive ) );
266 266
 		return $active + $inactive;
267 267
 	}
268 268
 
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 	protected function implode( $title, array $details )
274 274
 	{
275 275
 		$strings = ['['.$title.']'];
276
-		$padding = max( array_map( 'strlen', array_keys( $details )) );
276
+		$padding = max( array_map( 'strlen', array_keys( $details ) ) );
277 277
 		$padding = max( [$padding, static::PAD] );
278 278
 		foreach( $details as $key => $value ) {
279 279
 			$strings[] = is_string( $key )
Please login to merge, or discard this patch.
plugin/Database/DefaultsManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@  discard block
 block discarded – undo
13 13
 	public function defaults()
14 14
 	{
15 15
 		$settings = $this->settings();
16
-		$defaults = array_combine( array_keys( $settings ), array_column( $settings, 'default' ));
16
+		$defaults = array_combine( array_keys( $settings ), array_column( $settings, 'default' ) );
17 17
 		return wp_parse_args( $defaults, [
18 18
 			'version' => '',
19 19
 			'version_upgraded_from' => '',
20
-		]);
20
+		] );
21 21
 	}
22 22
 
23 23
 	/**
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	protected function normalize( array $settings )
58 58
 	{
59 59
 		array_walk( $settings, function( &$setting ) {
60
-			if( isset( $setting['default'] ))return;
60
+			if( isset($setting['default']) )return;
61 61
 			$setting['default'] = '';
62 62
 		});
63 63
 		return $settings;
Please login to merge, or discard this patch.
plugin/Controllers/Controller.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	 */
16 16
 	public function download( $filename, $content )
17 17
 	{
18
-		if( !current_user_can( Application::CAPABILITY ))return;
18
+		if( !current_user_can( Application::CAPABILITY ) )return;
19 19
 		nocache_headers();
20 20
 		header( 'Content-Type: text/plain' );
21 21
 		header( 'Content-Disposition: attachment; filename="'.$filename.'"' );
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 	 */
31 31
 	public function execute( $command )
32 32
 	{
33
-		$handlerClass = str_replace( 'Commands', 'Handlers', get_class( $command ));
34
-		if( !class_exists( $handlerClass )) {
33
+		$handlerClass = str_replace( 'Commands', 'Handlers', get_class( $command ) );
34
+		if( !class_exists( $handlerClass ) ) {
35 35
 			throw new InvalidArgumentException( 'Handler '.$handlerClass.' not found.' );
36 36
 		}
37 37
 		try {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 		}
40 40
 		catch( Exception $e ) {
41 41
 			status_header( 400 );
42
-			glsr( Notice::class )->addError( new WP_Error( 'site_reviews_error', $e->getMessage() ));
42
+			glsr( Notice::class )->addError( new WP_Error( 'site_reviews_error', $e->getMessage() ) );
43 43
 			glsr_log()->error( $e->getMessage() );
44 44
 		}
45 45
 	}
@@ -49,6 +49,6 @@  discard block
 block discarded – undo
49 49
 	 */
50 50
 	protected function getPostId()
51 51
 	{
52
-		return intval( filter_input( INPUT_GET, 'post' ));
52
+		return intval( filter_input( INPUT_GET, 'post' ) );
53 53
 	}
54 54
 }
Please login to merge, or discard this patch.
plugin/Controllers/AjaxController.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	{
25 25
 		wp_send_json( glsr( Html::class )->renderPartial( 'link', [
26 26
 			'post_id' => $request['ID'],
27
-		]));
27
+		] ) );
28 28
 	}
29 29
 
30 30
 	/**
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	 */
33 33
 	public function routerChangeReviewStatus( array $request )
34 34
 	{
35
-		wp_send_json( $this->execute( new ChangeStatus( $request )));
35
+		wp_send_json( $this->execute( new ChangeStatus( $request ) ) );
36 36
 	}
37 37
 
38 38
 	/**
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
 	public function routerClearLog()
42 42
 	{
43 43
 		glsr( AdminController::class )->routerClearLog();
44
-		wp_send_json([
44
+		wp_send_json( [
45 45
 			'logger' => glsr( Logger::class )->get(),
46 46
 			'notices' => glsr( Notice::class )->get(),
47
-		]);
47
+		] );
48 48
 	}
49 49
 
50 50
 	/**
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
 	{
55 55
 		$shortcode = $request['shortcode'];
56 56
 		$response = false;
57
-		if( array_key_exists( $shortcode, glsr()->mceShortcodes )) {
57
+		if( array_key_exists( $shortcode, glsr()->mceShortcodes ) ) {
58 58
 			$data = glsr()->mceShortcodes[$shortcode];
59
-			if( !empty( $data['errors'] )) {
59
+			if( !empty($data['errors']) ) {
60 60
 				$data['btn_okay'] = [esc_html__( 'Okay', 'site-reviews' )];
61 61
 			}
62 62
 			$response = [
@@ -76,10 +76,10 @@  discard block
 block discarded – undo
76 76
 	public function routerSearchPosts( array $request )
77 77
 	{
78 78
 		$results = glsr( Database::class )->searchPosts( $request['search'] );
79
-		wp_send_json_success([
79
+		wp_send_json_success( [
80 80
 			'empty' => '<div>'.__( 'Nothing found.', 'site-reviews' ).'</div>',
81 81
 			'items' => $results,
82
-		]);
82
+		] );
83 83
 	}
84 84
 
85 85
 	/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function routerSearchTranslations( array $request )
89 89
 	{
90
-		if( empty( $request['exclude'] )) {
90
+		if( empty($request['exclude']) ) {
91 91
 			$request['exclude'] = [];
92 92
 		}
93 93
 		$results = glsr( Translator::class )
@@ -95,10 +95,10 @@  discard block
 block discarded – undo
95 95
 			->exclude()
96 96
 			->exclude( $request['exclude'] )
97 97
 			->renderResults();
98
-		wp_send_json_success([
98
+		wp_send_json_success( [
99 99
 			'empty' => '<div>'.__( 'Nothing found.', 'site-reviews' ).'</div>',
100 100
 			'items' => $results,
101
-		]);
101
+		] );
102 102
 	}
103 103
 
104 104
 	/**
@@ -108,11 +108,11 @@  discard block
 block discarded – undo
108 108
 	{
109 109
 		$response = glsr( PublicController::class )->routerCreateReview( $request );
110 110
 		$session = glsr( Session::class );
111
-		wp_send_json([
111
+		wp_send_json( [
112 112
 			'errors' => $session->get( $request['form_id'].'-errors', false, true ),
113 113
 			'message' => $response,
114 114
 			'recaptcha' => $session->get( $request['form_id'].'-recaptcha', false, true ),
115
-		]);
115
+		] );
116 116
 	}
117 117
 
118 118
 	/**
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
 	 */
121 121
 	public function routerTogglePinned( array $request )
122 122
 	{
123
-		wp_send_json([
123
+		wp_send_json( [
124 124
 			'notices' => glsr( Notice::class )->get(),
125
-			'pinned' => $this->execute( new TogglePinned( $request )),
126
-		]);
125
+			'pinned' => $this->execute( new TogglePinned( $request ) ),
126
+		] );
127 127
 	}
128 128
 }
Please login to merge, or discard this patch.
plugin/Database/OptionManager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	public function all()
25 25
 	{
26 26
 		$options = get_option( static::databaseKey(), [] );
27
-		if( !is_array( $options )) {
27
+		if( !is_array( $options ) ) {
28 28
 			delete_option( static::databaseKey() );
29 29
 			$options = ['settings' => []];
30 30
 		}
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
 		$options = $this->all();
43 43
 		$pointer = &$options;
44 44
 		foreach( $keys as $key ) {
45
-			if( !isset( $pointer[$key] ) || !is_array( $pointer[$key] ))continue;
45
+			if( !isset($pointer[$key]) || !is_array( $pointer[$key] ) )continue;
46 46
 			$pointer = &$pointer[$key];
47 47
 		}
48
-		unset( $pointer[$last] );
48
+		unset($pointer[$last]);
49 49
 		return $this->set( $options );
50 50
 	}
51 51
 
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
 			glsr( DefaultsManager::class )->defaults()
78 78
 		);
79 79
 		array_walk( $options, function( &$value ) {
80
-			if( !is_string( $value ))return;
81
-			$value = wp_kses( $value, wp_kses_allowed_html( 'post' ));
80
+			if( !is_string( $value ) )return;
81
+			$value = wp_kses( $value, wp_kses_allowed_html( 'post' ) );
82 82
 		});
83 83
 		return glsr( Helper::class )->convertDotNotationArray( $options );
84 84
 	}
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 */
91 91
 	public function set( $pathOrOptions, $value = '' )
92 92
 	{
93
-		if( is_string( $pathOrOptions )) {
93
+		if( is_string( $pathOrOptions ) ) {
94 94
 			$pathOrOptions = glsr( Helper::class )->setPathValue( $pathOrOptions, $value, $this->all() );
95 95
 		}
96 96
 		return update_option( static::databaseKey(), (array)$pathOrOptions );
Please login to merge, or discard this patch.
plugin/Router.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	public function routeAdminPostRequest()
17 17
 	{
18 18
 		$request = filter_input( INPUT_POST, Application::ID, FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
19
-		if( !isset( $request['action'] ))return;
19
+		if( !isset($request['action']) )return;
20 20
 		$this->checkNonce( $request['action'] );
21 21
 		$this->routeRequest( 'admin', $request['action'], $request );
22 22
 	}
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	public function routeAjaxRequest()
28 28
 	{
29 29
 		$request = $this->normalizeAjaxRequest();
30
-		if( !wp_verify_nonce( $request['nonce'], $request['action'] )) {
30
+		if( !wp_verify_nonce( $request['nonce'], $request['action'] ) ) {
31 31
 			glsr_log()->error( 'Nonce check failed for ajax request' )->info( $request );
32 32
 			wp_die( -1, 403 );
33 33
 		}
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function routeRequest( $type, $action, array $request = [] )
54 54
 	{
55
-		$controller = glsr( glsr( Helper::class )->buildClassName( $type.'-controller', 'Controllers' ));
55
+		$controller = glsr( glsr( Helper::class )->buildClassName( $type.'-controller', 'Controllers' ) );
56 56
 		$method = glsr( Helper::class )->buildMethodName( $action, 'router' );
57
-		if( is_callable( [$controller, $method] )) {
57
+		if( is_callable( [$controller, $method] ) ) {
58 58
 			call_user_func( [$controller, $method], $request );
59 59
 			return;
60 60
 		}
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 */
71 71
 	public function routeWebhookRequest()
72 72
 	{
73
-		$request = filter_input( INPUT_GET, sprintf( '%s-hook', Application::ID ));
73
+		$request = filter_input( INPUT_GET, sprintf( '%s-hook', Application::ID ) );
74 74
 		if( !$request )return;
75 75
 		// @todo manage webhook here
76 76
 	}
@@ -109,14 +109,14 @@  discard block
 block discarded – undo
109 109
 	protected function normalizeAjaxRequest()
110 110
 	{
111 111
 		$request = filter_input( INPUT_POST, 'request', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
112
-		if( isset( $request[Application::ID]['action'] )) {
112
+		if( isset($request[Application::ID]['action']) ) {
113 113
 			$request = $request[Application::ID];
114 114
 		}
115
-		if( !isset( $request['action'] )) {
115
+		if( !isset($request['action']) ) {
116 116
 			glsr_log()->error( 'The AJAX request must include an action' )->info( $request );
117 117
 			wp_die();
118 118
 		}
119
-		if( !isset( $request['nonce'] )) {
119
+		if( !isset($request['nonce']) ) {
120 120
 			glsr_log()->error( 'The AJAX request must include a nonce' )->info( $request );
121 121
 			wp_die();
122 122
 		}
Please login to merge, or discard this patch.
plugin/Filters.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -38,27 +38,27 @@
 block discarded – undo
38 38
 	 */
39 39
 	public function run()
40 40
 	{
41
-		add_filter( 'mce_external_plugins',                                    [$this->admin, 'filterTinymcePlugins'], 15 );
42
-		add_filter( 'plugin_action_links_'.$this->basename,                    [$this->admin, 'filterActionLinks'] );
43
-		add_filter( 'dashboard_glance_items',                                  [$this->admin, 'filterDashboardGlanceItems'] );
44
-		add_filter( 'wp_editor_settings',                                      [$this->editor, 'filterEditorSettings'] );
45
-		add_filter( 'the_editor',                                              [$this->editor, 'filterEditorTextarea'] );
46
-		add_filter( 'gettext',                                                 [$this->editor, 'filterPostStatusLabels'], 10, 3 );
47
-		add_filter( 'gettext_with_context',                                    [$this->editor, 'filterPostStatusLabelsWithContext'], 10, 4 );
48
-		add_filter( 'post_updated_messages',                                   [$this->editor, 'filterUpdateMessages'] );
49
-		add_filter( 'bulk_post_updated_messages',                              [$this->listtable, 'filterBulkUpdateMessages'], 10, 2 );
50
-		add_filter( 'manage_'.Application::POST_TYPE.'_posts_columns',         [$this->listtable, 'filterColumnsForPostType'] );
51
-		add_filter( 'post_date_column_status',                                 [$this->listtable, 'filterDateColumnStatus'], 10, 2 );
52
-		add_filter( 'default_hidden_columns',                                  [$this->listtable, 'filterDefaultHiddenColumns'], 10, 2 );
53
-		add_filter( 'display_post_states',                                     [$this->listtable, 'filterPostStates'], 10, 2 );
54
-		add_filter( 'post_row_actions',                                        [$this->listtable, 'filterRowActions'], 10, 2 );
41
+		add_filter( 'mce_external_plugins', [$this->admin, 'filterTinymcePlugins'], 15 );
42
+		add_filter( 'plugin_action_links_'.$this->basename, [$this->admin, 'filterActionLinks'] );
43
+		add_filter( 'dashboard_glance_items', [$this->admin, 'filterDashboardGlanceItems'] );
44
+		add_filter( 'wp_editor_settings', [$this->editor, 'filterEditorSettings'] );
45
+		add_filter( 'the_editor', [$this->editor, 'filterEditorTextarea'] );
46
+		add_filter( 'gettext', [$this->editor, 'filterPostStatusLabels'], 10, 3 );
47
+		add_filter( 'gettext_with_context', [$this->editor, 'filterPostStatusLabelsWithContext'], 10, 4 );
48
+		add_filter( 'post_updated_messages', [$this->editor, 'filterUpdateMessages'] );
49
+		add_filter( 'bulk_post_updated_messages', [$this->listtable, 'filterBulkUpdateMessages'], 10, 2 );
50
+		add_filter( 'manage_'.Application::POST_TYPE.'_posts_columns', [$this->listtable, 'filterColumnsForPostType'] );
51
+		add_filter( 'post_date_column_status', [$this->listtable, 'filterDateColumnStatus'], 10, 2 );
52
+		add_filter( 'default_hidden_columns', [$this->listtable, 'filterDefaultHiddenColumns'], 10, 2 );
53
+		add_filter( 'display_post_states', [$this->listtable, 'filterPostStates'], 10, 2 );
54
+		add_filter( 'post_row_actions', [$this->listtable, 'filterRowActions'], 10, 2 );
55 55
 		add_filter( 'manage_edit-'.Application::POST_TYPE.'_sortable_columns', [$this->listtable, 'filterSortableColumns'] );
56
-		add_filter( 'ngettext',                                                [$this->listtable, 'filterStatusText'], 10, 5 );
57
-		add_filter( 'script_loader_tag',                                       [$this->public, 'filterEnqueuedScripts'], 10, 2 );
58
-		add_filter( 'query_vars',                                              [$this->public, 'filterQueryVars'] );
59
-		add_filter( 'gettext',                                                 [$this->translator, 'filterGettext'], 10, 3 );
60
-		add_filter( 'gettext_with_context',                                    [$this->translator, 'filterGettextWithContext'], 10, 4 );
61
-		add_filter( 'ngettext',                                                [$this->translator, 'filterNgettext'], 10, 5 );
62
-		add_filter( 'ngettext_with_context',                                   [$this->translator, 'filterNgettextWithContext'], 10, 6 );
56
+		add_filter( 'ngettext', [$this->listtable, 'filterStatusText'], 10, 5 );
57
+		add_filter( 'script_loader_tag', [$this->public, 'filterEnqueuedScripts'], 10, 2 );
58
+		add_filter( 'query_vars', [$this->public, 'filterQueryVars'] );
59
+		add_filter( 'gettext', [$this->translator, 'filterGettext'], 10, 3 );
60
+		add_filter( 'gettext_with_context', [$this->translator, 'filterGettextWithContext'], 10, 4 );
61
+		add_filter( 'ngettext', [$this->translator, 'filterNgettext'], 10, 5 );
62
+		add_filter( 'ngettext_with_context', [$this->translator, 'filterNgettextWithContext'], 10, 6 );
63 63
 	}
64 64
 }
Please login to merge, or discard this patch.
plugin/Handlers/ChangeStatus.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@  discard block
 block discarded – undo
12 12
 	 */
13 13
 	public function handle( Command $command )
14 14
 	{
15
-		$postId = wp_update_post([
15
+		$postId = wp_update_post( [
16 16
 			'ID' => $command->id,
17 17
 			'post_status' => $command->status,
18
-		]);
19
-		if( is_wp_error( $postId )) {
18
+		] );
19
+		if( is_wp_error( $postId ) ) {
20 20
 			glsr_log()->error( $postId->get_error_message() );
21 21
 			return [];
22 22
 		}
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 			'aria-label' => '&#8220;'.esc_attr( $title ).'&#8221; ('.__( 'Edit', 'site-reviews' ).')',
38 38
 			'class' => 'row-title',
39 39
 			'href' => get_edit_post_link( $postId ),
40
-		]);
40
+		] );
41 41
 	}
42 42
 
43 43
 	/**
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	protected function getPostState( $postId )
48 48
 	{
49 49
 		ob_start();
50
-		_post_states( get_post( $postId ));
50
+		_post_states( get_post( $postId ) );
51 51
 		return ob_get_clean();
52 52
 	}
53 53
 }
Please login to merge, or discard this patch.