chemiker/e.nigma-2015

View on GitHub
src/theme/functions.php

Summary

Maintainability
A
0 mins
Test Coverage

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

<?php
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

    if ( strrpos($link, 'href') )
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces between argument "$url" and closing bracket; 1 found
Open

add_filter('oembed_dataparse', function ( $return, $data, $url ) {
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces between opening bracket and argument "$return"; 1 found
Open

add_filter('oembed_dataparse', function ( $return, $data, $url ) {
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

if ( ! isset( $content_width ) )
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    wp_enqueue_script( 'comment-reply' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    if ( strrpos($link, 'href') )
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    wp_enqueue_style( 'style', get_template_directory_uri() . '/css/screen.min.css', array( 'dashicons' ), false, 'screen' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Raleway:100%7CRoboto+Slab:400,700%7COpen+Sans:400italic,400,700' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Line exceeds 120 characters; contains 131 characters
Open

    add_theme_support( 'post-formats', array( 'aside', 'link', 'video', 'audio', 'image', 'quote', 'gallery', 'chat', 'status' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    add_theme_support( 'custom-header', array(
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'height' => 125
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Inline control structures are not allowed
Open

if ( ! isset( $content_width ) )
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    return str_replace(' frameborder="0"', '', $return);
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    wp_enqueue_script( 'jquery-enigma', get_template_directory_uri() . '/js/jquery.enigma.min.js', array( 'jquery' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    // Article image support. http://codex.wordpress.org/Post_Thumbnails
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    // Support Title-tag
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'default-text-color' => 'AAA',
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    // Register Menu location(s)
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return str_replace("href", "class='page' href", $link);
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    wp_enqueue_script( 'jquery-scrollupformenu', get_template_directory_uri() . '/js/jquery.scrollupformenu.min.js', array( 'jquery' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Line exceeds 120 characters; contains 137 characters
Open

    wp_enqueue_script( 'jquery-scrollupformenu', get_template_directory_uri() . '/js/jquery.scrollupformenu.min.js', array( 'jquery' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    // Add support for Post formats
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    )  );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    // Textdomain
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    add_theme_support('automatic-feed-links');
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    load_theme_textdomain('enigma-2015', '/' . dirname( plugin_basename( __FILE__ ) ) . '/languages');
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    return "<div class='center'>" . $link . "</div>";
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Line exceeds 120 characters; contains 125 characters
Open

    wp_enqueue_style( 'style', get_template_directory_uri() . '/css/screen.min.css', array( 'dashicons' ), false, 'screen' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    wp_enqueue_style( 'style-print', get_template_directory_uri() . '/css/print.min.css', array( 'dashicons' ), false, 'print' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    add_theme_support( 'custom-background', array(
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    // Add support for HTML5 elements
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Line exceeds 120 characters; contains 140 characters
Open

    wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Raleway:100%7CRoboto+Slab:400,700%7COpen+Sans:400italic,400,700' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    register_nav_menus( array(
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    return "<a href='". isset($_SERVER["HTTP_HOST"]) . isset($_SERVER["REQUEST_URI"]) ."' class=\"active page\">" . $link . "</a>";
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Line exceeds 120 characters; contains 129 characters
Open

    wp_enqueue_style( 'style-print', get_template_directory_uri() . '/css/print.min.css', array( 'dashicons' ), false, 'print' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    add_theme_support( 'post-formats', array( 'aside', 'link', 'video', 'audio', 'image', 'quote', 'gallery', 'chat', 'status' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    add_theme_support('post-thumbnails');
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    add_theme_support( 'title-tag' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    // Support Custom header and custom background image
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'main_menu' => __( 'Main Menu', 'e.nigma-2015' )
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Inline control structures are not allowed
Open

    if ( strrpos($link, 'href') )
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'default-color' => '494949',
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    add_theme_support( 'html5', array( 'comment-form', 'search-form', 'gallery', 'caption' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    // Auto-discovery feed in header
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    add_editor_style( 'css/editor-style.min.css' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    $content_width = 584;
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Line exceeds 120 characters; contains 131 characters
Open

    return "<a href='". isset($_SERVER["HTTP_HOST"]) . isset($_SERVER["REQUEST_URI"]) ."' class=\"active page\">" . $link . "</a>";
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

    add_theme_support( 'html5', array( 'comment-form', 'search-form', 'gallery', 'caption' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

        'main_menu' => __( 'Main Menu', 'e.nigma-2015' )
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

add_action( 'widgets_init', '\enigma\Widgets::widgets_init' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

    wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

    wp_enqueue_script( 'jquery-scrollupformenu', get_template_directory_uri() . '/js/jquery.scrollupformenu.min.js', array( 'jquery' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

    wp_enqueue_script( 'jquery-enigma', get_template_directory_uri() . '/js/jquery.enigma.min.js', array( 'jquery' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

    wp_enqueue_style( 'style', get_template_directory_uri() . '/css/screen.min.css', array( 'dashicons' ), false, 'screen' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

    add_theme_support( 'post-formats', array( 'aside', 'link', 'video', 'audio', 'image', 'quote', 'gallery', 'chat', 'status' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

if ( ! isset( $content_width ) )
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

add_action( 'the_content_more_link', function ($link) {
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

No space found after comma in function call
Open

add_filter('wp_link_pages_args','\enigma\Helper::add_next_and_number');
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

    add_theme_support( 'custom-header', array(
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Opening brace should be on a new line
Open

function enigma_2015_styles_init() {
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

    add_theme_support( 'html5', array( 'comment-form', 'search-form', 'gallery', 'caption' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

    load_theme_textdomain('enigma-2015', '/' . dirname( plugin_basename( __FILE__ ) ) . '/languages');
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

add_action( 'comment_form_before', function () {
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

    load_theme_textdomain('enigma-2015', '/' . dirname( plugin_basename( __FILE__ ) ) . '/languages');
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

    register_nav_menus( array(
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

add_action( 'admin_init', function () {
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

add_action( 'widgets_init', '\enigma\Widgets::widgets_init' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

    wp_enqueue_style( 'style', get_template_directory_uri() . '/css/screen.min.css', array( 'dashicons' ), false, 'screen' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

add_action( 'wp_enqueue_scripts', 'enigma_2015_styles_init' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

add_action( 'wp_enqueue_scripts', 'enigma_2015_styles_init' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

add_action( 'after_setup_theme', function () {
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

    add_theme_support( 'post-formats', array( 'aside', 'link', 'video', 'audio', 'image', 'quote', 'gallery', 'chat', 'status' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

    wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Raleway:100%7CRoboto+Slab:400,700%7COpen+Sans:400italic,400,700' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

    wp_enqueue_style( 'style-print', get_template_directory_uri() . '/css/print.min.css', array( 'dashicons' ), false, 'print' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

    load_theme_textdomain('enigma-2015', '/' . dirname( plugin_basename( __FILE__ ) ) . '/languages');
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

    load_theme_textdomain('enigma-2015', '/' . dirname( plugin_basename( __FILE__ ) ) . '/languages');
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

    wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

    wp_enqueue_script( 'jquery-scrollupformenu', get_template_directory_uri() . '/js/jquery.scrollupformenu.min.js', array( 'jquery' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

    add_editor_style( 'css/editor-style.min.css' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Opening brace should be on a new line
Open

function enigma_2015_scripts_init() {
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

    wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Raleway:100%7CRoboto+Slab:400,700%7COpen+Sans:400italic,400,700' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

    add_theme_support( 'title-tag' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

    add_theme_support( 'custom-header', array(
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

    register_nav_menus( array(
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

        'main_menu' => __( 'Main Menu', 'e.nigma-2015' )
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces after opening bracket; 1 found
Open

if ( ! isset( $content_width ) )
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

    add_editor_style( 'css/editor-style.min.css' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces after opening bracket; 1 found
Open

    if ( strrpos($link, 'href') )
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

add_filter('oembed_dataparse', function ( $return, $data, $url ) {
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

    add_theme_support( 'custom-background', array(
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 2 found
Open

    add_theme_support( 'custom-background', array(
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

    wp_enqueue_script( 'comment-reply' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

    wp_enqueue_script( 'comment-reply' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

    wp_enqueue_style( 'style-print', get_template_directory_uri() . '/css/print.min.css', array( 'dashicons' ), false, 'print' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

if ( ! isset( $content_width ) )
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

    add_theme_support( 'title-tag' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

add_action( 'the_content_more_link', function ($link) {
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

    wp_enqueue_script( 'jquery-enigma', get_template_directory_uri() . '/js/jquery.enigma.min.js', array( 'jquery' ) );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

add_action( 'wp_enqueue_scripts', 'enigma_2015_scripts_init' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

add_action( 'wp_enqueue_scripts', 'enigma_2015_scripts_init' );
Severity: Minor
Found in src/theme/functions.php by phpcodesniffer

There are no issues that match your filters.

Category
Status