src/theme/functions/customizer.php
Method register
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function register($wp_customize){
$wp_customize->add_setting('enigma_2015_header_link_color', array(
'default' => 'FAFAFA',
'type' => 'theme_mod',
Spaces must be used for alignment; tabs are not allowed Open
Open
$wp_customize->add_control( 'enigma_2015_information_about', array(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'priority' => 120,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
));
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'settings' => 'enigma_2015_information_image',
- Exclude checks
The closing brace for the class must go on the next line after the body Open
Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
) ) );
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
$wp_customize->add_setting('enigma_2015_information_about', array(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
));
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'title' => __('Information', 'e.nigma-2015'),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
));
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'default' => __('Welcome to my blog', 'e.nigma-2015'),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'type' => 'theme_mod',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
));
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'description' => __('Displays a small about section in the footer of your blog.', 'e.nigma-2015'),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'label' => __('About', 'e.nigma-2015'),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'settings' => 'enigma_2015_information_about'
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
) ) );
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'sanitize_callback' => function ($text) { return $text; }
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
$wp_customize->add_setting('enigma_2015_information_image', array(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'label' => __( 'Header Link Color', 'e.nigma-2015' ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'type' => 'textarea',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'default' => get_template_directory_uri().'/screenshot.png',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'settings' => 'enigma_2015_header_link_color',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'label' => __('Image', 'e.nigma-2015'),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
$wp_customize->add_control( new \WP_Customize_Color_Control($wp_customize, 'enigma_2015_header_link_color', array(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'section' => 'colors',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
$wp_customize->add_section('enigma_2015_information', array(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'section' => 'enigma_2015_information',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'type' => 'theme_mod',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
$wp_customize->add_control( new \WP_Customize_Image_Control($wp_customize, 'image', array(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'section' => 'enigma_2015_information',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'sanitize_callback' => 'esc_url_raw'
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
class Customizer {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'type' => 'theme_mod',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public static function register($wp_customize){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'sanitize_js_callback' => 'maybe_hash_hex_color',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
namespace enigma;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'default' => 'FAFAFA',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$wp_customize->add_control( new \WP_Customize_Color_Control($wp_customize, 'enigma_2015_header_link_color', array(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'sanitize_callback' => array( 'WP_Customize_Manager', '_sanitize_header_textcolor' ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$wp_customize->add_setting('enigma_2015_header_link_color', array(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
class Customizer {
- Exclude checks
Line exceeds 120 characters; contains 126 characters Open
Open
$wp_customize->add_control( new \WP_Customize_Color_Control($wp_customize, 'enigma_2015_header_link_color', array(
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
}
- Exclude checks
Opening brace should be on a new line Open
Open
public static function register($wp_customize){
- Exclude checks
Opening brace must be the last content on the line Open
Open
'sanitize_callback' => function ($text) { return $text; }
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$wp_customize->add_control( new \WP_Customize_Image_Control($wp_customize, 'image', array(
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$wp_customize->add_control( new \WP_Customize_Color_Control($wp_customize, 'enigma_2015_header_link_color', array(
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
'label' => __( 'Header Link Color', 'e.nigma-2015' ),
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$wp_customize->add_control( new \WP_Customize_Color_Control($wp_customize, 'enigma_2015_header_link_color', array(
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$wp_customize->add_control( new \WP_Customize_Image_Control($wp_customize, 'image', array(
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$wp_customize->add_control( 'enigma_2015_information_about', array(
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$wp_customize->add_control( new \WP_Customize_Image_Control($wp_customize, 'image', array(
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$wp_customize->add_control( new \WP_Customize_Color_Control($wp_customize, 'enigma_2015_header_link_color', array(
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
'label' => __( 'Header Link Color', 'e.nigma-2015' ),
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
class Customizer {
- Exclude checks
Closing brace must be on a line by itself Open
Open
'sanitize_callback' => function ($text) { return $text; }
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
public static function register($wp_customize){
- Exclude checks