src/theme/functions.php
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 83 and the first side effect is on line 2. Open
Open
<?php
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( strrpos($link, 'href') )
- Exclude checks
Expected 0 spaces between argument "$url" and closing bracket; 1 found Open
Open
add_filter('oembed_dataparse', function ( $return, $data, $url ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$return"; 1 found Open
Open
add_filter('oembed_dataparse', function ( $return, $data, $url ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! isset( $content_width ) )
- 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
wp_enqueue_script( 'comment-reply' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( strrpos($link, 'href') )
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_enqueue_style( 'style', get_template_directory_uri() . '/css/screen.min.css', array( 'dashicons' ), false, 'screen' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Raleway:100%7CRoboto+Slab:400,700%7COpen+Sans:400italic,400,700' );
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
Open
add_theme_support( 'post-formats', array( 'aside', 'link', 'video', 'audio', 'image', 'quote', 'gallery', 'chat', 'status' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
add_theme_support( 'custom-header', array(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'height' => 125
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
) );
- Exclude checks
Inline control structures are not allowed Open
Open
if ( ! isset( $content_width ) )
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return str_replace(' frameborder="0"', '', $return);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_enqueue_script( 'jquery-enigma', get_template_directory_uri() . '/js/jquery.enigma.min.js', array( 'jquery' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Article image support. http://codex.wordpress.org/Post_Thumbnails
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Support Title-tag
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'default-text-color' => 'AAA',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Register Menu location(s)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return str_replace("href", "class='page' href", $link);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_enqueue_script( 'jquery-scrollupformenu', get_template_directory_uri() . '/js/jquery.scrollupformenu.min.js', array( 'jquery' ) );
- Exclude checks
Line exceeds 120 characters; contains 137 characters Open
Open
wp_enqueue_script( 'jquery-scrollupformenu', get_template_directory_uri() . '/js/jquery.scrollupformenu.min.js', array( 'jquery' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Add support for Post formats
- 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
// Textdomain
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
add_theme_support('automatic-feed-links');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
load_theme_textdomain('enigma-2015', '/' . dirname( plugin_basename( __FILE__ ) ) . '/languages');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return "<div class='center'>" . $link . "</div>";
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
Open
wp_enqueue_style( 'style', get_template_directory_uri() . '/css/screen.min.css', array( 'dashicons' ), false, 'screen' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_enqueue_style( 'style-print', get_template_directory_uri() . '/css/print.min.css', array( 'dashicons' ), false, 'print' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
add_theme_support( 'custom-background', array(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Add support for HTML5 elements
- Exclude checks
Line exceeds 120 characters; contains 140 characters Open
Open
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Raleway:100%7CRoboto+Slab:400,700%7COpen+Sans:400italic,400,700' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
register_nav_menus( array(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return "<a href='". isset($_SERVER["HTTP_HOST"]) . isset($_SERVER["REQUEST_URI"]) ."' class=\"active page\">" . $link . "</a>";
- Exclude checks
Line exceeds 120 characters; contains 129 characters Open
Open
wp_enqueue_style( 'style-print', get_template_directory_uri() . '/css/print.min.css', array( 'dashicons' ), false, 'print' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
add_theme_support( 'post-formats', array( 'aside', 'link', 'video', 'audio', 'image', 'quote', 'gallery', 'chat', 'status' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
add_theme_support('post-thumbnails');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
add_theme_support( 'title-tag' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Support Custom header and custom background image
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'main_menu' => __( 'Main Menu', 'e.nigma-2015' )
- Exclude checks
Inline control structures are not allowed Open
Open
if ( strrpos($link, 'href') )
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'default-color' => '494949',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
add_theme_support( 'html5', array( 'comment-form', 'search-form', 'gallery', 'caption' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Auto-discovery feed in header
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
add_editor_style( 'css/editor-style.min.css' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$content_width = 584;
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
Open
return "<a href='". isset($_SERVER["HTTP_HOST"]) . isset($_SERVER["REQUEST_URI"]) ."' class=\"active page\">" . $link . "</a>";
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
add_theme_support( 'html5', array( 'comment-form', 'search-form', 'gallery', 'caption' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
'main_menu' => __( 'Main Menu', 'e.nigma-2015' )
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
add_action( 'widgets_init', '\enigma\Widgets::widgets_init' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_enqueue_script( 'jquery-scrollupformenu', get_template_directory_uri() . '/js/jquery.scrollupformenu.min.js', array( 'jquery' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_enqueue_script( 'jquery-enigma', get_template_directory_uri() . '/js/jquery.enigma.min.js', array( 'jquery' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_enqueue_style( 'style', get_template_directory_uri() . '/css/screen.min.css', array( 'dashicons' ), false, 'screen' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_theme_support( 'post-formats', array( 'aside', 'link', 'video', 'audio', 'image', 'quote', 'gallery', 'chat', 'status' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( ! isset( $content_width ) )
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_action( 'the_content_more_link', function ($link) {
- Exclude checks
No space found after comma in function call Open
Open
add_filter('wp_link_pages_args','\enigma\Helper::add_next_and_number');
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_theme_support( 'custom-header', array(
- Exclude checks
Opening brace should be on a new line Open
Open
function enigma_2015_styles_init() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_theme_support( 'html5', array( 'comment-form', 'search-form', 'gallery', 'caption' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
load_theme_textdomain('enigma-2015', '/' . dirname( plugin_basename( __FILE__ ) ) . '/languages');
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_action( 'comment_form_before', function () {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
load_theme_textdomain('enigma-2015', '/' . dirname( plugin_basename( __FILE__ ) ) . '/languages');
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
register_nav_menus( array(
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_action( 'admin_init', function () {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_action( 'widgets_init', '\enigma\Widgets::widgets_init' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_enqueue_style( 'style', get_template_directory_uri() . '/css/screen.min.css', array( 'dashicons' ), false, 'screen' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_action( 'wp_enqueue_scripts', 'enigma_2015_styles_init' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
add_action( 'wp_enqueue_scripts', 'enigma_2015_styles_init' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_action( 'after_setup_theme', function () {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
add_theme_support( 'post-formats', array( 'aside', 'link', 'video', 'audio', 'image', 'quote', 'gallery', 'chat', 'status' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Raleway:100%7CRoboto+Slab:400,700%7COpen+Sans:400italic,400,700' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_enqueue_style( 'style-print', get_template_directory_uri() . '/css/print.min.css', array( 'dashicons' ), false, 'print' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
load_theme_textdomain('enigma-2015', '/' . dirname( plugin_basename( __FILE__ ) ) . '/languages');
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
load_theme_textdomain('enigma-2015', '/' . dirname( plugin_basename( __FILE__ ) ) . '/languages');
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_enqueue_script( 'jquery-scrollupformenu', get_template_directory_uri() . '/js/jquery.scrollupformenu.min.js', array( 'jquery' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_editor_style( 'css/editor-style.min.css' );
- Exclude checks
Opening brace should be on a new line Open
Open
function enigma_2015_scripts_init() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Raleway:100%7CRoboto+Slab:400,700%7COpen+Sans:400italic,400,700' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
add_theme_support( 'title-tag' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
add_theme_support( 'custom-header', array(
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
register_nav_menus( array(
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
'main_menu' => __( 'Main Menu', 'e.nigma-2015' )
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( ! isset( $content_width ) )
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
add_editor_style( 'css/editor-style.min.css' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( strrpos($link, 'href') )
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
add_filter('oembed_dataparse', function ( $return, $data, $url ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_theme_support( 'custom-background', array(
- Exclude checks
Expected 0 spaces before closing bracket; 2 found Open
Open
add_theme_support( 'custom-background', array(
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_enqueue_script( 'comment-reply' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_enqueue_script( 'comment-reply' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_enqueue_style( 'style-print', get_template_directory_uri() . '/css/print.min.css', array( 'dashicons' ), false, 'print' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! isset( $content_width ) )
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_theme_support( 'title-tag' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
add_action( 'the_content_more_link', function ($link) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_enqueue_script( 'jquery-enigma', get_template_directory_uri() . '/js/jquery.enigma.min.js', array( 'jquery' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_action( 'wp_enqueue_scripts', 'enigma_2015_scripts_init' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
add_action( 'wp_enqueue_scripts', 'enigma_2015_scripts_init' );
- Exclude checks