Completed
Push — remove/site-verification-in-to... ( 983ed1 )
by
unknown
12:17
created

blog-verification-tools.php ➔ jetpack_verification_options_form()   B

Complexity

Conditions 3
Paths 2

Size

Total Lines 62

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
nc 2
nop 0
dl 0
loc 62
rs 8.829
c 0
b 0
f 0

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
// Edit here to add new services
4
function jetpack_verification_services() {
5
	return array(
6
			'google' => array(
7
			'name'   =>'Google Search Console',
8
			'key'    =>'google-site-verification',
9
			'format' =>'dBw5CvburAxi537Rp9qi5uG2174Vb6JwHwIRwPSLIK8',
10
			'url'    => 'https://www.google.com/webmasters/tools/',
11
		),
12
		'bing' => array(
13
			'name'   =>'Bing Webmaster Center',
14
			'key'    =>'msvalidate.01',
15
			'format' =>'12C1203B5086AECE94EB3A3D9830B2E',
16
			'url'    => 'http://www.bing.com/webmaster/',
17
		 ),
18
		'pinterest' => array(
19
			'name'   => 'Pinterest Site Verification',
20
			'key'    => 'p:domain_verify',
21
			'format' => 'f100679e6048d45e4a0b0b92dce1efce',
22
			'url'    => 'https://pinterest.com/website/verify/',
23
		),
24
		'yandex'     => array(
25
			'name'   => 'Yandex.Webmaster',
26
			'key'    => 'yandex-verification',
27
			'format' => '44d68e1216009f40',
28
			'url'    => 'https://webmaster.yandex.com/sites/',
29
		),
30
	);
31
}
32
33
34
function jetpack_verification_options_init() {
35
	register_setting( 'verification_services_codes_fields', 'verification_services_codes', 'jetpack_verification_validate' );
36
}
37
add_action( 'admin_init', 'jetpack_verification_options_init' );
38