wp-bootstrap-loader.php
Showing 23 of 23 total issues
The class WP_Bootstrap_Loader is not named in CamelCase. Open
Open
class WP_Bootstrap_Loader { /** * Construct *
- Read upRead up
- Exclude checks
Parenthesis should always be used when instantiating a new object. Open
Open
new WP_Bootstrap_Loader;
- Exclude checks
Doc comment short description must start with a capital letter Open
Open
* jquery_migrate_async function.
- Exclude checks
Function return type is void, but function contains return statement Open
Open
* @return void
- Exclude checks
Expected 1 spaces before closing bracket; 0 found Open
Open
add_filter( 'script_loader_tag', array( $this, 'jquery_migrate_async' ), 10, 3);
- Exclude checks
Visibility must be declared on method "bootstrap_editor_css" Open
Open
function bootstrap_editor_css() {
- Exclude checks
Expected 1 spaces before closing bracket; 0 found Open
Open
add_filter( 'script_loader_tag', array( $this, 'bootstrap_async' ), 10, 2);
- Exclude checks
Visibility must be declared on method "bootstrap_scripts" Open
Open
function bootstrap_scripts() {
- Exclude checks
Class file names should be based on the class name with "class-" prepended. Expected class-wp-bootstrap-loader.php, but found wp-bootstrap-loader.php. Open
Open
<?php
- Exclude checks
Resource version not set in call to wp_register_style(). This means new versions of the style will not always be loaded due to browser caching. Open
Open
wp_register_style( 'bootstrap', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css', '', null, 'all' );
- Exclude checks
Expected 1 spaces between opening bracket and argument "$tag"; 0 found Open
Open
function bootstrap_async($tag, $handle) {
- Exclude checks
No space before closing parenthesis is prohibited Open
Open
function bootstrap_async($tag, $handle) {
- Exclude checks
Visibility must be declared on method "jquery_migrate_async" Open
Open
function jquery_migrate_async( $tag, $handle ) {
- Exclude checks
Found precision alignment of 1 spaces. Open
Open
/*
- Exclude checks
Visibility must be declared on method "__construct" Open
Open
function __construct() {
- Exclude checks
No space after opening parenthesis is prohibited Open
Open
function bootstrap_async($tag, $handle) {
- Exclude checks
Function return type is void, but function contains return statement Open
Open
* @return void
- Exclude checks
Resource version not set in call to wp_register_script(). This means new versions of the script will not always be loaded due to browser caching. Open
Open
wp_register_script( 'bootstrap', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js', 'jquery', null, true );
- Exclude checks
Resource version not set in call to wp_register_script(). This means new versions of the script will not always be loaded due to browser caching. Open
Open
wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js', null, null, true );
- Exclude checks
Visibility must be declared on method "bootstrap_async" Open
Open
function bootstrap_async($tag, $handle) {
- Exclude checks
Inline control structures are not allowed Open
Open
if ( 'bootstrap' !== $handle )
- Exclude checks
Inline control structures are not allowed Open
Open
if ( 'jquery-migrate' !== $handle )
- Exclude checks
Newline required after opening brace Open
Open
if ( ! defined( 'ABSPATH' ) ) { exit; }
- Exclude checks