Completed
Push — master ( 0ab7b5...1a45bc )
by Marin
02:48
created

Header_Scripts_Field   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 5
Bugs 1 Features 0
Metric Value
wmc 2
c 5
b 1
f 0
lcom 0
cbo 1
dl 0
loc 15
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get_default_help_text() 0 3 1
A get_hook_name() 0 3 1
1
<?php 
2
3
namespace Carbon_Fields\Field;
4
5
/**
6
 * Header scripts field class.
7
 * Intended only for use in theme options container.
8
 */
9
class Header_Scripts_Field extends Scripts_Field {
10
	/**
11
	 * Default help text to be displayed for this type of field.
12
	 */
13
	public function get_default_help_text() {
14
		return __( 'If you need to add scripts to your header, you should enter them here.', 'carbon_fields' );
15
	}
16
17
	/**
18
	 * Action name to be hooked on.
19
	 */
20
	public function get_hook_name() {
21
		return 'wp_head';
22
	}
23
}
24