Issues (631)

inc/customizer.php (6 issues)

Labels
Severity
1
<?php
2
/**
3
 * Strip Theme Customizer
4
 *
5
 * @package WordPress
6
 * @subpackage Strip
7
 */
8
9
	/**
10
	 * Add postMessage support for site title and description for the Theme Customizer.
11
	 *
12
	 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
0 ignored issues
show
The type WP_Customize_Manager was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
	 */
14
function strip_customize_register( $wp_customize ) {
15
	$wp_customize->get_setting( 'blogname' )        ->transport = 'postMessage';
16
	$wp_customize->get_setting( 'blogdescription' ) ->transport = 'postMessage';
17
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
18
	$wp_customize->get_setting( 'background_image' )->transport = 'postMessage';
19
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'content_title_color', array(
0 ignored issues
show
The type WP_Customize_Color_Control was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
20
		'label'   => esc_html_x( 'Content Title Color', 'admin', 'strip' ),
0 ignored issues
show
The function esc_html_x was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

20
		'label'   => /** @scrutinizer ignore-call */ esc_html_x( 'Content Title Color', 'admin', 'strip' ),
Loading history...
21
		'section' => 'colors',
22
	) ) );
23
}
24
	add_action( 'customize_register', 'strip_customize_register' );
0 ignored issues
show
The function add_action was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

24
	/** @scrutinizer ignore-call */ 
25
 add_action( 'customize_register', 'strip_customize_register' );
Loading history...
25
26
	/**
27
	 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
28
	 */
29
function strip_customize_preview_js() {
30
	wp_enqueue_script( 'strip_customizer', get_template_directory_uri() . '/js/min/customizer-min.js', array( 'customize-preview' ), '20130508', true );
0 ignored issues
show
The function get_template_directory_uri was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

30
	wp_enqueue_script( 'strip_customizer', /** @scrutinizer ignore-call */ get_template_directory_uri() . '/js/min/customizer-min.js', array( 'customize-preview' ), '20130508', true );
Loading history...
The function wp_enqueue_script was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

30
	/** @scrutinizer ignore-call */ 
31
 wp_enqueue_script( 'strip_customizer', get_template_directory_uri() . '/js/min/customizer-min.js', array( 'customize-preview' ), '20130508', true );
Loading history...
31
}
32
	add_action( 'customize_preview_init', 'strip_customize_preview_js' );
33