Skip to content
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.

Commit

Permalink
Fix code standards
Browse files Browse the repository at this point in the history
Excludes wpthumb from the list of directories to scan with phpcs
  • Loading branch information
GaryJones committed May 26, 2014
1 parent 8a5fd82 commit 37248f7
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 346 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ module.exports = function(grunt) {
// Lint .php files for code standards
phpcs: {
all: {
dir: ['theme/**/*.php']
dir: ['theme/**/*.php', '!theme/lib/wpthumb/**/*']
},
options: {
standard: 'ruleset.xml',
Expand Down
348 changes: 27 additions & 321 deletions phpcs.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion theme/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
'comment-form',
'comment-list',
'gallery',
'caption'
'caption',
)
);

Expand Down
6 changes: 3 additions & 3 deletions theme/lib/general/ft-default-widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
if ( ! empty( $args['current_category'] ) ) {
$_current_category = get_term( $args['current_category'], $category->taxonomy );
if ( $category->term_id == $args['current_category'] ) {
$class .= ' current-cat';
$class .= ' current-cat';
} elseif ( $category->term_id == $_current_category->parent ) {
$class .= ' current-cat-parent';
$class .= ' current-cat-parent';
}
}
$output .= ' class="' . $class . '"';
$output .= ' class="' . $class . '"';
$output .= ">$link\n";
} else {
$output .= "\t$link<br />\n";
Expand Down
8 changes: 4 additions & 4 deletions theme/lib/general/ft-widget-areas.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ function fortytwo_register_widget_areas() {
'after_title' => '</h4>',
);
register_sidebars( 4, $page_business_widget_areas );

genesis_register_sidebar(
array(
'id' => 'ft_footer-columns',
'name' => __( 'Footer Columns', 'fortytwo' ),
'description' => __( 'This is the section inserted prior to the final footer', 'fortytwo' ),
'id' => 'ft_footer-columns',
'name' => __( 'Footer Columns', 'fortytwo' ),
'description' => __( 'This is the section inserted prior to the final footer', 'fortytwo' ),
)
);
}
2 changes: 1 addition & 1 deletion theme/lib/structural/ft-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/


// Filter prevent inline css being generated for post gallery
// Filter prevent inline css being generated for post gallery
add_filter( 'use_default_gallery_style', '__return_false' );

add_action( 'genesis_before_loop', 'fortytwo_modify_default_post_structure' );
Expand Down
6 changes: 3 additions & 3 deletions theme/lib/widgets/ft-featured-content/views/widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
* @license GPL-2.0+
* @link http://forsitethemes/themes/fortytwo/
*/
?>
<?php echo $args['before_title']; ?>
<i class="ft-ico <?php echo sanitize_html_class( $instance['icon'] ); ?>"></i> <?php echo esc_html( $instance['title'] ); ?>

echo $args['before_title']; ?>
<i class="ft-ico <?php echo sanitize_html_class( $instance['icon'] ); ?>"></i> <?php echo esc_html( $instance['title'] ); ?>
<?php echo $args['after_title']; ?>
<?php if ( $instance['content'] ) { ?>
<p><?php echo esc_html( $instance['content'] ); ?></p>
Expand Down
22 changes: 13 additions & 9 deletions theme/lib/widgets/ft-jumbotron/views/widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@
*/

if ( $instance['title'] || $instance['content'] ) {
?>
<div class="ft-jumbotron-detail">
<span><?php echo esc_html( $instance['title'] ); ?></span>
<p><?php echo esc_html( $instance['content'] ); ?></p>
</div>
<?php }
if ( $instance['link_url'] && $instance['link_text'] ) { ?>
<a class="btn ft-jumbotron-action" href="<?php echo esc_url( $instance['link_url'] ); ?>"><?php echo esc_html( $instance['link_text'] ); ?></a>
<?php }
?>
<div class="ft-jumbotron-detail">
<span><?php echo esc_html( $instance['title'] ); ?></span>
<p><?php echo esc_html( $instance['content'] ); ?></p>
</div>
<?php
}

if ( $instance['link_url'] && $instance['link_text'] ) {
?>
<a class="btn ft-jumbotron-action" href="<?php echo esc_url( $instance['link_url'] ); ?>"><?php echo esc_html( $instance['link_text'] ); ?></a>
<?php
}
2 changes: 1 addition & 1 deletion theme/lib/widgets/ft-responsive-slider/views/widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<?php
while ( $slider_posts->have_posts() ):
$slider_posts->the_post();
?>
?>
<li class="slide-<?php the_ID(); ?>">
<?php
if ( $show_excerpt == 1 || $show_title == 1 ) {
Expand Down
2 changes: 1 addition & 1 deletion theme/lib/widgets/ft-responsive-slider/widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ protected function get_value( $field, $force_reload = false ) {
if ( 0 == count( $this->all_widget_settings ) || $force_reload ) {
$this->all_widget_settings = $this->get_settings();
}

if ( isset( $this->all_widget_settings[ $this->number ] ) ) {
return $this->all_widget_settings[ $this->number ][ $field ];
}
Expand Down
2 changes: 1 addition & 1 deletion theme/lib/widgets/ft-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function widget( $args, $instance ) {
return;
}

echo $args['before_widget'];
echo $args['before_widget'];
include trailingslashit( dirname( __FILE__ ) ) . $this->slug . '/views/widget.php';
echo $args['after_widget'];
}
Expand Down

0 comments on commit 37248f7

Please sign in to comment.