src/theme/functions/content.php
Function pagebar
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
public static function pagebar($displayedpages=6) {
global $wp_query;
$max_num_pages = $wp_query->max_num_pages;
if ($max_num_pages <= 1) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method pagebar
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function pagebar($displayedpages=6) {
global $wp_query;
$max_num_pages = $wp_query->max_num_pages;
if ($max_num_pages <= 1) {
Opening brace of a class must be on the line after the definition Open
Open
class Content {
- Exclude checks
Incorrect spacing between argument "$displayedpages" and equals sign; expected 1 but found 0 Open
Open
public static function pagebar($displayedpages=6) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
Open
foreach ( $thecategories as $categorienumber => $category ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
Open
foreach ( $thecategories as $categorienumber => $category ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
foreach ( $thecategories as $categorienumber => $category ) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$displayedpages"; expected 1 but found 0 Open
Open
public static function pagebar($displayedpages=6) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $categorienumber == $numberofcategories - 1 ) {
- Exclude checks
Method name "Content::get_categories" is not in camel caps format Open
Open
public static function get_categories() {
- Exclude checks
Method name "Content::get_headline" is not in camel caps format Open
Open
private static function get_headline($format) {
- Exclude checks
Terminating statement must be indented to the same level as the CASE body Open
Open
break;
- Exclude checks
Method name "Content::get_css" is not in camel caps format Open
Open
private static function get_css($format, $css='') {
- Exclude checks
There must be no space before the colon in a DEFAULT statement Open
Open
default :
- Exclude checks
Method name "Content::get_class" is not in camel caps format Open
Open
private static function get_class($format, $class='') {
- Exclude checks
There must be no space before the colon in a CASE statement Open
Open
case 'quote' : case 'link' :
- Exclude checks
Expected 0 spaces between opening bracket and argument "$format"; 1 found Open
Open
public static function get_post_vars( $format = '' ) {
- Exclude checks
There must be no space before the colon in a CASE statement Open
Open
case 'link' :
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $format == 'image' && has_post_thumbnail() )
- Exclude checks
Incorrect spacing between argument "$css" and equals sign; expected 1 but found 0 Open
Open
private static function get_css($format, $css='') {
- Exclude checks
Method name "Content::get_meta" is not in camel caps format Open
Open
private static function get_meta($format) {
- Exclude checks
The CASE body must start on the line following the statement Open
Open
case 'quote' : case 'link' :
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$class"; expected 1 but found 0 Open
Open
private static function get_class($format, $class='') {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ) )
- Exclude checks
Method name "Content::get_thumbnail" is not in camel caps format Open
Open
private static function get_thumbnail($format) {
- Exclude checks
Terminating statement must be indented to the same level as the CASE body Open
Open
break;
- Exclude checks
Terminating statement must be indented to the same level as the CASE body Open
Open
break;
- Exclude checks
Method name "Content::get_content" is not in camel caps format Open
Open
private static function get_content($format) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! $format || ! isset($symbols[$format]) || ! $symbols[$format] )
- Exclude checks
Method name "Content::get_text_for_archive_page" is not in camel caps format Open
Open
private static function get_text_for_archive_page() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! is_single() && has_excerpt() )
- Exclude checks
Incorrect spacing between argument "$class" and equals sign; expected 1 but found 0 Open
Open
private static function get_class($format, $class='') {
- Exclude checks
Terminating statement must be indented to the same level as the CASE body Open
Open
break;
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! empty($categories) ) {
- Exclude checks
There must be no space before the colon in a DEFAULT statement Open
Open
default :
- Exclude checks
There must be no space before the colon in a CASE statement Open
Open
case 'quote' : case 'link' :
- Exclude checks
Terminating statement must be indented to the same level as the CASE body Open
Open
break;
- Exclude checks
Expected 0 spaces between argument "$format" and closing bracket; 1 found Open
Open
public static function get_post_vars( $format = '' ) {
- Exclude checks
Method name "Content::get_post_vars" is not in camel caps format Open
Open
public static function get_post_vars( $format = '' ) {
- Exclude checks
Terminating statement must be indented to the same level as the CASE body Open
Open
break;
- Exclude checks
Method name "Content::get_category_symbol" is not in camel caps format Open
Open
private static function get_category_symbol($format) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$css"; expected 1 but found 0 Open
Open
private static function get_css($format, $css='') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ($page <= $displayedpages) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$thecategories = get_the_category();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Pagebar Clone
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public static function pagebar($displayedpages=6) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if (! $page) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$min = 1;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ($max_num_pages <= 1) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
class Content {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ($max_num_pages > $displayedpages) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
for ($i = $min; $i <= $max; $i++) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$i
- 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
$max_num_pages = $wp_query->max_num_pages;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$page = 1;
- 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
$max = $max_num_pages;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public static function get_categories() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
namespace enigma;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Originally created by [Sergej Müller](https://sergejmueller.github.io)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
} elseif ($page >= $displayedpages && $page < ($max_num_pages - $roundedrange)) {
- 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
global $wp_query;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$roundedrange = ceil($displayedpages / 2);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$page = (int) get_query_var('paged');
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$numberofcategories = count( $thecategories );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
echo sprintf(' <a href="%s" %s>%d</a>',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
foreach ( $thecategories as $categorienumber => $category ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$spacer = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$max = $displayedpages + 1;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$max = $max_num_pages;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
get_pagenum_link($i),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
} elseif ($page >= ($max_num_pages - $roundedrange)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$min = 1;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
($i == $page ? 'class="page active"' : 'class="page"'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$categories = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$min = $page - $roundedrange;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$max = $page + $roundedrange;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if (! empty($min) && ! empty($max)) {
- 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
// Get Categories
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( $categorienumber == $numberofcategories - 1 ) {
- 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
$spacer = ', ';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$min = $max_num_pages - $displayedpages;
- 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
);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'quote' => '',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
private static function get_headline($format) {
- 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
self::get_categories()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
switch ($format) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
case 'image':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$thumbnail = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( $format == 'image' && has_post_thumbnail() )
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Get things for the post types…
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return array(
- 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
if ( ! empty($categories) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$categories = sprintf('<span class="screen-reader hidden">%s: </span><span class="post-meta-category">%s</span>',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'aside' => '',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'image' => '',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $symbols[$format];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
( $link ? $link : get_the_permalink() ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
break;
- 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
$class = "image-post-with-thumbnail";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( ! $format || ! isset($symbols[$format]) || ! $symbols[$format] )
- 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
if ( ! is_single() && has_excerpt() )
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$content = self::get_text_for_archive_page();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $content;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
__('Category', 'e.nigma-2015'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
private static function get_class($format, $class='') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Line exceeds 120 characters; contains 170 characters Open
Open
$meta = sprintf('<hr class="before_content" /><span class="screen-reader hidden">%s</span><span class="post-meta-date"><a href="%s">%s</a></span> %s',
- 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
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
private static function get_text_for_archive_page() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
sprintf(
- 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 ($format == 'video' || $format == 'audio')
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
Open
if ( $format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ) )
- 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
get_the_title(),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
get_the_date(),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
default:
- Exclude checks
Inline control structures are not allowed Open
Open
if ( ! $format || ! isset($symbols[$format]) || ! $symbols[$format] )
- 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
private static function get_category_symbol($format) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$symbols = array(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
default :
- 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
private static function get_thumbnail($format) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
private static function get_content($format) {
- Exclude checks
Inline control structures are not allowed Open
Open
if ($format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ))
- 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
case 'link' :
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
private static function get_css($format, $css='') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$meta = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $thumbnail;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
__( 'Continue reading%s', 'e.nigma-2015' ),
- 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
'audio' => '',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
switch ($format) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$headline = '<h2><a href="' . get_the_permalink() . '">' . get_the_title() . '</a></h2>';
- 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
$meta = sprintf('<hr class="before_content" /><span class="screen-reader hidden">%s</span><span class="post-meta-date"><a href="%s">%s</a></span> %s',
- 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
)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$category->name,
- Exclude checks
Inline control structures are not allowed Open
Open
if ( $format == 'image' && has_post_thumbnail() )
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
break;
- 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
if ($format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ))
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'css' => self::get_css($format),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$spacer
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $categories;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$link = get_post_meta( get_the_ID(), '_format_link_url', true );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
__('Published on:', 'e.nigma-2015'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return get_the_excerpt();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return get_the_content(
- 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
if ( $format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ) )
- Exclude checks
Inline control structures are not allowed Open
Open
if ( $format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ) )
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $css;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'content' => self::get_content($format)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'status' => ''
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$headline = sprintf('<h2><a href="%s">%s<span class="link_arrow">%s</span></a></h2>',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $meta;
- Exclude checks
Inline control structures are not allowed Open
Open
if ( ! is_single() && has_excerpt() )
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return '<img class="hide" src="'.$featured_image[0].'" alt="'.get_the_title().'" />' . $content;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
);
- Exclude checks
Line exceeds 120 characters; contains 129 characters Open
Open
$categories = sprintf('<span class="screen-reader hidden">%s: </span><span class="post-meta-category">%s</span>',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$categories
- 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
'link' => '',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
private static function get_meta($format) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
( is_rtl() ? '←' : '→' )
- 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
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'category_symbol' => self::get_category_symbol($format),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$thumbnail = get_the_post_thumbnail();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
get_post_meta( get_the_ID(), '_format_'.$format.'_embed', true ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return ( $oembed ? $oembed : get_post_meta( get_the_ID(), '_format_'.$format.'_embed', true ) ) . $content;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public static function get_post_vars( $format = '' ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'meta' => self::get_meta($format),
- 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
'gallery' => '',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'chat' => '',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $headline;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
case 'quote' : case 'link' :
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'<span class="screen-reader hidden"> '.get_the_title().'</span>…'
- 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
$categories .= sprintf('<a href="%s">%s</a>%s',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
get_category_link( $category->term_id ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'video' => '',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
default :
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
get_the_permalink(),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$oembed = wp_oembed_get(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $class;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$css = "style=\"background-image: url('".$featured_image[0]."')\"";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'headline' => self::get_headline($format),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'thumbnail' => self::get_thumbnail($format),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
switch ($format) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
array( 'width' => 677 )
- 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
if ($format == 'video' || $format == 'audio')
- Exclude checks
Line exceeds 120 characters; contains 123 characters Open
Open
return ( $oembed ? $oembed : get_post_meta( get_the_ID(), '_format_'.$format.'_embed', true ) ) . $content;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'class' => self::get_class($format),
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
if (! $page) {
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
if ($max_num_pages <= 1) {
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
public static function pagebar($displayedpages=6) {
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
Open
if ($page <= $displayedpages) {
- Exclude checks
Opening brace should be on a new line Open
Open
public static function get_categories() {
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
Open
} else {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
} else {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
}
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
Open
get_pagenum_link($i),
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
foreach ( $thecategories as $categorienumber => $category ) {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
if ($max_num_pages > $displayedpages) {
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
Open
} elseif ($page >= $displayedpages && $page < ($max_num_pages - $roundedrange)) {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
}
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$numberofcategories = count( $thecategories );
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
Open
if ( $categorienumber == $numberofcategories - 1 ) {
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
class Content {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
}
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
Open
$i
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
Open
($i == $page ? 'class="page active"' : 'class="page"'),
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
foreach ( $thecategories as $categorienumber => $category ) {
- Exclude checks
Opening brace should be on a new line Open
Open
public static function pagebar($displayedpages=6) {
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
Open
} elseif ($page >= ($max_num_pages - $roundedrange)) {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
if (! empty($min) && ! empty($max)) {
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
Open
for ($i = $min; $i <= $max; $i++) {
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
Open
echo sprintf(' <a href="%s" %s>%d</a>',
- Exclude checks
Multi-line function call not indented correctly; expected 20 spaces but found 24 Open
Open
);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
}
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( $categorienumber == $numberofcategories - 1 ) {
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
public static function get_categories() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$numberofcategories = count( $thecategories );
- Exclude checks
Multi-line function call not indented correctly; expected 20 spaces but found 24 Open
Open
);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
switch ($format) {
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 29 Open
Open
get_the_permalink(),
- Exclude checks
Multi-line function call not indented correctly; expected 20 spaces but found 24 Open
Open
);
- Exclude checks
Multi-line function call not indented correctly; expected 28 spaces but found 32 Open
Open
__( 'Continue reading%s', 'e.nigma-2015' ),
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
return ( $oembed ? $oembed : get_post_meta( get_the_ID(), '_format_'.$format.'_embed', true ) ) . $content;
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( $format == 'image' && has_post_thumbnail() )
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
get_category_link( $category->term_id ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$link = get_post_meta( get_the_ID(), '_format_link_url', true );
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 20 Open
Open
);
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
return ( $oembed ? $oembed : get_post_meta( get_the_ID(), '_format_'.$format.'_embed', true ) ) . $content;
- Exclude checks
Multi-line function call not indented correctly; expected 20 spaces but found 24 Open
Open
get_category_link( $category->term_id ),
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private static function get_headline($format) {
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
Open
default :
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
Open
$categories = sprintf('<span class="screen-reader hidden">%s: </span><span class="post-meta-category">%s</span>',
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$link = get_post_meta( get_the_ID(), '_format_link_url', true );
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
Open
$headline = sprintf('<h2><a href="%s">%s<span class="link_arrow">%s</span></a></h2>',
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
Open
( $link ? $link : get_the_permalink() ),
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
}
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 29 Open
Open
self::get_categories()
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 24 Open
Open
sprintf(
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 20 Open
Open
);
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
Open
case 'quote' : case 'link' :
- Exclude checks
Opening brace should be on a new line Open
Open
private static function get_text_for_archive_page() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( ! is_single() && has_excerpt() )
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
Open
)
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private static function get_content($format) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( $format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ) )
- Exclude checks
Opening brace should be on a new line Open
Open
public static function get_post_vars( $format = '' ) {
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 20 Open
Open
);
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( ! empty($categories) ) {
- Exclude checks
Opening brace should be on a new line Open
Open
private static function get_category_symbol($format) {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
switch ($format) {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
}
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( ! $format || ! isset($symbols[$format]) || ! $symbols[$format] )
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
public static function get_post_vars( $format = '' ) {
- Exclude checks
Opening brace should be on a new line Open
Open
private static function get_meta($format) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Multi-line function call not indented correctly; expected 20 spaces but found 24 Open
Open
$spacer
- Exclude checks
Opening brace should be on a new line Open
Open
private static function get_headline($format) {
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
Open
get_the_title(),
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ($format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ))
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private static function get_category_symbol($format) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private static function get_thumbnail($format) {
- Exclude checks
Opening brace should be on a new line Open
Open
private static function get_thumbnail($format) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private static function get_text_for_archive_page() {
- Exclude checks
Multi-line function call not indented correctly; expected 28 spaces but found 32 Open
Open
'<span class="screen-reader hidden"> '.get_the_title().'</span>…'
- Exclude checks
Opening brace should be on a new line Open
Open
private static function get_content($format) {
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 24 Open
Open
get_post_meta( get_the_ID(), '_format_'.$format.'_embed', true ),
- Exclude checks
Opening brace should be on a new line Open
Open
private static function get_class($format, $class='') {
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 28 Open
Open
( is_rtl() ? '←' : '→' )
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private static function get_css($format, $css='') {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
Open
case 'link' :
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
get_post_meta( get_the_ID(), '_format_'.$format.'_embed', true ),
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private static function get_class($format, $class='') {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ) )
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
get_category_link( $category->term_id ),
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
Open
$meta = sprintf('<hr class="before_content" /><span class="screen-reader hidden">%s</span><span class="post-meta-date"><a href="%s">%s</a></span> %s',
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 29 Open
Open
__('Published on:', 'e.nigma-2015'),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
get_post_meta( get_the_ID(), '_format_'.$format.'_embed', true ),
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
Open
case 'image':
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 24 Open
Open
array( 'width' => 677 )
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Opening brace should be on a new line Open
Open
private static function get_css($format, $css='') {
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 20 Open
Open
);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
if ( ! empty($categories) ) {
- Exclude checks
Multi-line function call not indented correctly; expected 20 spaces but found 24 Open
Open
$categories
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 12 Open
Open
switch ($format) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( $format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ) )
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
Open
$categories .= sprintf('<a href="%s">%s</a>%s',
- Exclude checks
Multi-line function call not indented correctly; expected 20 spaces but found 24 Open
Open
__('Category', 'e.nigma-2015'),
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
Open
default :
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 29 Open
Open
get_the_date(),
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
__( 'Continue reading%s', 'e.nigma-2015' ),
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Multi-line function call not indented correctly; expected 20 spaces but found 24 Open
Open
$category->name,
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private static function get_meta($format) {
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 16 Open
Open
default:
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
__( 'Continue reading%s', 'e.nigma-2015' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ($format == 'image' && $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ))
- Exclude checks