src/Plugin_Customizer.php
Plugin_Customizer
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
Open
abstract class Plugin_Customizer implements Plugin_Customizer_Interface {
private $customize_register_priority = 9; // Priority must be between 2 and 9
private $slug;
private $org_theme;
Method init
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function init( $config = array() ) {
if ( ! count( $config ) ) {
wp_die( /*$message = '', $title = '', $args = array()*/ );
}
Found precision alignment of 1 spaces. Open
Open
$new_rules = array(
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
Open
* @param Array $query_vars All defined query variables.
- Exclude checks
Expected 1 space before opening brace; found 0 Open
Open
add_filter( 'pre_option_template', function(){
- Exclude checks
Assignments must be the first block of code on a line Open
Open
if ( $overridden_template = locate_template( "plugin-customizer/{$template}" ) ) {
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
Open
* 2) [parent-theme]/plugin-customizer/
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
Open
* @param string $template plugin_root to the template
- Exclude checks
Equals sign not aligned with surrounding assignments; expected 3 spaces but found 1 space Open
Open
$version = PLUGIN_CUSTOMIZER_VERSION;
- Exclude checks
Found precision alignment of 2 spaces. Open
Open
sprintf( '%s/templates/(.*)$', $this->slug ) => sprintf( 'index.php?plugin-customizer-template-%s=%s', $this->slug, $wp_rewrite->preg_index( 1 ) ),
- Exclude checks
Found precision alignment of 1 spaces. Open
Open
);
- Exclude checks
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 1 space Open
Open
$this->root = plugin_dir_path( __FILE__ );
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
Open
* 1) [child-theme]/plugin-customizer/
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
Open
* @param Object $wp_rewrite Permalink structure
- Exclude checks
Found precision alignment of 1 spaces. Open
Open
$wp_rewrite->rules = $new_rules + $wp_rewrite->rules;
- Exclude checks
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space Open
Open
$src = $this->url . 'assets/js/plugin-customizer-preview-templates.js';
- Exclude checks
Expected exactly one space before closing parenthesis; " " found. Open
Open
public function switch_template_uri( $uri ) {
- Exclude checks
Please spell "WordPress" correctly. Found 1 misspelling(s): WordPres Open
Open
* WordPres Customizer is dependant on functionality in the theme. Just in case
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
Open
* @return Array Rewrite rules
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
Open
* @return Array The updated array with query variables.
- Exclude checks
Spaces must be used for mid-line alignment; tabs are not allowed Open
Open
* 3) [plugin directory]/templates/
- Exclude checks
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space Open
Open
$deps = array( 'customize-controls' );
- Exclude checks
Space found before comma in function call Open
Open
$url = add_query_arg( $this->slug , 'on', $url );
- Exclude checks
Array item not aligned correctly; expected 17 spaces but found 18 Open
Open
sprintf( '%s/templates/(.*)$', $this->slug ) => sprintf( 'index.php?plugin-customizer-template-%s=%s', $this->slug, $wp_rewrite->preg_index( 1 ) ),
- Exclude checks
Space found before comma in function call Open
Open
$this->slug = sanitize_title( $config['name'] , 'plugin-customizer' );
- Exclude checks
Equals sign not aligned with surrounding assignments; expected 9 spaces but found 2 spaces Open
Open
$this->url = plugins_url( '/', __FILE__ );
- Exclude checks
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 1 space Open
Open
$this->slug = sanitize_title( $config['name'] , 'plugin-customizer' );
- Exclude checks
Expected 1 space before opening brace; found 0 Open
Open
add_filter( 'pre_option_blogname', function(){
- Exclude checks
Expected 1 space before opening brace; found 0 Open
Open
add_filter( 'pre_option_stylesheet', function(){
- Exclude checks
Space found before comma in function call Open
Open
wp_enqueue_script( $this->slug, $src, $deps, $version , $in_footer );
- Exclude checks
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space Open
Open
$template = basename( $template, '.php' );
- Exclude checks
Found precision alignment of 1 spaces. Open
Open
return $wp_rewrite->rules;
- Exclude checks