Skip to content

Commit 44acf57

Browse files
Merge pull request #25 from siteorigin/phpcs
PHP CS
2 parents 9f808d9 + aed7e3b commit 44acf57

37 files changed

+1701
-1620
lines changed

404.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php get_header(); ?>
22

33
<div class="post">
4-
<h1 class="entry-title noinfo"><?php _e('Not Found', 'origami') ?></h1>
4+
<h1 class="entry-title noinfo"><?php _e( 'Not Found', 'origami' ); ?></h1>
55

66
<div class="content" id="blog-archives">
7-
<?php echo wpautop(wp_kses_post(siteorigin_setting('text_not_found', __("We couldn't find what you were looking for.", 'origami')))) ?>
7+
<?php echo wpautop( wp_kses_post( siteorigin_setting( 'text_not_found', __( "We couldn't find what you were looking for.", 'origami' ) ) ) ); ?>
88
</div>
99
</div>
1010

admin/about/page-free.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<h3><?php _e( 'Forever Free', 'origami' ) ?></h3>
1+
<h3><?php _e( 'Forever Free', 'origami' ); ?></h3>
22
<p>
3-
<?php _e( "Origami is a completely free WordPress theme.", 'origami' ) ?>
4-
<?php _e( "We'll continue developing and enhancing it for years to come.", 'origami' ) ?>
3+
<?php _e( 'Origami is a completely free WordPress theme.', 'origami' ); ?>
4+
<?php _e( "We'll continue developing and enhancing it for years to come.", 'origami' ); ?>
55
</p>

admin/about/page-github.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<h3><?php _e( 'Developed on Github', 'origami' ) ?></h3>
2-
<img src="<?php echo esc_url( get_template_directory_uri() ) ?>/admin/about/github.png" class="about-image-right about-image-no-text-below" />
1+
<h3><?php _e( 'Developed on Github', 'origami' ); ?></h3>
2+
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/admin/about/github.png" class="about-image-right about-image-no-text-below" />
33
<p>
4-
<?php printf( __( "Origami is actively %sdeveloped on Github%s.", 'origami' ), '<a href="https://github.com/siteorigin/origami">', '</a>' ) ?>
5-
<?php _e( "You can watch what's happening with its development and even make contributions yourself.", 'origami' ) ?>
4+
<?php printf( __( 'Origami is actively %sdeveloped on Github%s.', 'origami' ), '<a href="https://github.com/siteorigin/origami">', '</a>' ); ?>
5+
<?php _e( "You can watch what's happening with its development and even make contributions yourself.", 'origami' ); ?>
66
</p>

admin/about/page-mature.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<h3><?php _e( 'Stable and Mature', 'origami' ) ?></h3>
1+
<h3><?php _e( 'Stable and Mature', 'origami' ); ?></h3>
22
<p>
3-
<?php _e( "We've been developing Origami since 2012.", 'origami' ) ?>
4-
<?php _e( "In fact, Origami was our very first WordPress Theme.", 'origami' ) ?>
5-
<?php _e( "We've continued maintaining and evolving it over all these years - turning it into one of our most stable WordPress themes.", 'origami' ) ?>
3+
<?php _e( "We've been developing Origami since 2012.", 'origami' ); ?>
4+
<?php _e( 'In fact, Origami was our very first WordPress Theme.', 'origami' ); ?>
5+
<?php _e( "We've continued maintaining and evolving it over all these years - turning it into one of our most stable WordPress themes.", 'origami' ); ?>
66
</p>

admin/about/page-page-builder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<h3><?php _e( 'Enhanced by Page Builder', 'origami' ) ?></h3>
1+
<h3><?php _e( 'Enhanced by Page Builder', 'origami' ); ?></h3>
22
<p>
3-
<?php printf( __( "Origami integrates, beautifully, with our %sfree Page Builder%s plugin.", 'origami' ), '<a href="https://siteorigin.com/page-builder/">', '</a>' ) ?>
4-
<?php _e( 'This powerful plugin gives you full drag and drop capabilities right inside Origami.', 'origami' ) ?>
3+
<?php printf( __( 'Origami integrates, beautifully, with our %sfree Page Builder%s plugin.', 'origami' ), '<a href="https://siteorigin.com/page-builder/">', '</a>' ); ?>
4+
<?php _e( 'This powerful plugin gives you full drag and drop capabilities right inside Origami.', 'origami' ); ?>
55
</p>

admin/about/page-support.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<h3><?php _e( 'Support and Documentation', 'origami' ) ?></h3>
1+
<h3><?php _e( 'Support and Documentation', 'origami' ); ?></h3>
22
<p>
3-
<?php printf( __( "Our dedicated support team is ready to help you over on our %sfree support forums%s.", 'origami' ), '<a href="https://siteorigin.com/thread/">', '</a>' ) ?>
4-
<?php printf( __( "You can also read through the %sOrigami documentation%s to get to know it even faster.", 'origami' ), '<a href="https://siteorigin.com/origami-documentation/">', '</a>' ) ?>
3+
<?php printf( __( 'Our dedicated support team is ready to help you over on our %sfree support forums%s.', 'origami' ), '<a href="https://siteorigin.com/thread/">', '</a>' ); ?>
4+
<?php printf( __( 'You can also read through the %sOrigami documentation%s to get to know it even faster.', 'origami' ), '<a href="https://siteorigin.com/origami-documentation/">', '</a>' ); ?>
55
</p>

admin/metabox-columns.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<?php
22
global $post;
3-
$columns = get_post_meta($post->ID, 'content_columns', true);
4-
if(empty($columns)) $columns = 1;
3+
$columns = get_post_meta( $post->ID, 'content_columns', true );
4+
5+
if ( empty( $columns ) ) {
6+
$columns = 1;
7+
}
58
?>
69

7-
<label><?php _e('Columns', 'origami') ?></label>
10+
<label><?php _e( 'Columns', 'origami' ); ?></label>
811
<select name="content_columns">
9-
<?php for($i = 1; $i <= 3; $i++) : ?>
10-
<option value="<?php echo $i ?>" <?php selected($columns, $i) ?>><?php printf(_n('%1$s Column', '%1$s Columns', $i, 'origami'),$i) ?></option>
11-
<?php endfor ?>
12+
<?php for ( $i = 1; $i <= 3; $i++ ) { ?>
13+
<option value="<?php echo $i; ?>" <?php selected( $columns, $i ); ?>><?php printf( _n( '%1$s Column', '%1$s Columns', $i, 'origami' ), $i ); ?></option>
14+
<?php } ?>
1215
</select>

archive.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
<?php get_header() ?>
1+
<?php get_header(); ?>
22

33
<h1 class="archive-title">
4-
<?php if ( is_day() ) : ?>
4+
<?php if ( is_day() ) { ?>
55
<?php printf( __( 'Daily Archives: %s', 'origami' ), '<span>' . get_the_date() . '</span>' ); ?>
6-
<?php elseif ( is_month() ) : ?>
6+
<?php } elseif ( is_month() ) { ?>
77
<?php printf( __( 'Monthly Archives: %s', 'origami' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'origami' ) ) . '</span>' ); ?>
8-
<?php elseif ( is_year() ) : ?>
8+
<?php } elseif ( is_year() ) { ?>
99
<?php printf( __( 'Yearly Archives: %s', 'origami' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'origami' ) ) . '</span>' ); ?>
10-
<?php elseif ( is_tag() ) : ?>
10+
<?php } elseif ( is_tag() ) { ?>
1111
<?php printf( __( 'Posts Tagged: %s', 'origami' ), '<span>' . single_tag_title( '', false ) . '</span>' ); ?>
12-
<?php elseif ( is_category() ) : ?>
12+
<?php } elseif ( is_category() ) { ?>
1313
<?php printf( __( 'Posts in Category: %s', 'origami' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?>
14-
<?php elseif ( is_search() ) : ?>
14+
<?php } elseif ( is_search() ) { ?>
1515
<?php printf( __( 'Search Results for: %s', 'origami' ), '<span>' . get_search_query() . '</span>' ); ?>
16-
<?php else : ?>
16+
<?php } else { ?>
1717
<?php _e( 'Blog Archives', 'origami' ); ?>
18-
<?php endif; ?>
18+
<?php } ?>
1919
</h1>
2020

21-
<?php the_archive_description( '<div class="archive-description">', '</div>' ) ?>
21+
<?php the_archive_description( '<div class="archive-description">', '</div>' ); ?>
2222

23-
<?php get_template_part('loop', 'index') ?>
23+
<?php get_template_part( 'loop', 'index' ); ?>
2424

2525
<div id="posts-nav">
26-
<?php posts_nav_link('', __('Newer Entries', 'origami'), __('Older Entries', 'origami')); ?>
26+
<?php posts_nav_link( '', __( 'Newer Entries', 'origami' ), __( 'Older Entries', 'origami' ) ); ?>
2727
</div>
2828

29-
<?php get_footer() ?>
29+
<?php get_footer(); ?>

author.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
<?php get_header(); the_post(); ?>
1+
<?php get_header();
2+
the_post(); ?>
23

3-
<h1 class="archive-header"><?php printf(__('Posts By %s','origami') , get_the_author_meta('display_name')) ?></h1>
4+
<h1 class="archive-header"><?php printf( __( 'Posts By %s', 'origami' ), get_the_author_meta( 'display_name' ) ); ?></h1>
45

5-
<div><?php rewind_posts(); get_template_part('loop', 'index') ?></div>
6+
<div><?php rewind_posts();
7+
get_template_part( 'loop', 'index' ); ?></div>
68

7-
<?php if(get_posts_nav_link()) : ?>
9+
<?php if ( get_posts_nav_link() ) { ?>
810
<div id="posts-nav">
9-
<?php posts_nav_link('', __('Newer Entries', 'origami'), __('Older Entries', 'origami')); ?>
11+
<?php posts_nav_link( '', __( 'Newer Entries', 'origami' ), __( 'Older Entries', 'origami' ) ); ?>
1012
</div>
11-
<?php endif; ?>
13+
<?php } ?>
1214

1315
<?php get_footer(); ?>

comments.php

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,61 @@
1-
<?php if(post_password_required()) : ?>
1+
<?php if ( post_password_required() ) { ?>
22
<a name="comments"></a>
33
<div id="comments">
4-
<p><?php _e('Password Required', 'origami') ?></p>
4+
<p><?php _e( 'Password Required', 'origami' ); ?></p>
55
</div>
66
<?php return; ?>
7-
<?php endif; ?>
7+
<?php } ?>
88

9-
<?php if(have_comments() || comments_open()) : ?>
9+
<?php if ( have_comments() || comments_open() ) { ?>
1010
<a name="comments"></a>
1111
<div id="comments" class="section">
12-
<?php if(have_comments()) : ?>
12+
<?php if ( have_comments() ) { ?>
1313
<h3 class="comments-title">
1414
<?php
1515
printf(
16-
_n('One Comment', '%1$s Comments', get_comments_number(), 'origami'),
17-
number_format_i18n(get_comments_number()),
16+
_n( 'One Comment', '%1$s Comments', get_comments_number(), 'origami' ),
17+
number_format_i18n( get_comments_number() ),
1818
'<em>' . get_the_title() . '</em>'
1919
);
20-
?>
20+
?>
2121
</h3>
2222

23-
<?php if(get_comment_pages_count() > 1 && get_option('page_comments')) : ?>
23+
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) { ?>
2424
<div class="navigation">
2525
<div
26-
class="nav-previous"><?php previous_comments_link(__('<span class="meta-nav">&larr;</span> Older Comments', 'origami')); ?></div>
26+
class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'origami' ) ); ?></div>
2727
<div
28-
class="nav-next"><?php next_comments_link(__('Newer Comments <span class="meta-nav">&rarr;</span>', 'origami')); ?></div>
28+
class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'origami' ) ); ?></div>
2929
</div>
30-
<?php endif; ?>
30+
<?php } ?>
3131

3232
<ol class="commentlist">
3333
<?php
34-
// List comments
35-
wp_list_comments(array(
36-
'callback' => 'origami_comment'
37-
));
38-
?>
34+
// List comments
35+
wp_list_comments( array(
36+
'callback' => 'origami_comment',
37+
) );
38+
?>
3939
</ol>
40-
<?php endif; ?>
40+
<?php } ?>
4141

4242
<?php
4343
// Display the comment form
4444
$commenter = wp_get_current_commenter();
45-
comment_form(array(
45+
comment_form( array(
4646
'fields' => array(
47-
'author' => sprintf('<input name="author" type="text" placeholder="%s" value="' . esc_attr( $commenter['comment_author'] ) . '" required />', __('Name*', 'origami')),
48-
'email' => sprintf('<input name="email" type="text" placeholder="%s" value="' . esc_attr( $commenter['comment_author_email'] ) . '" required />', __('Email*', 'origami')),
49-
'url' => sprintf('<input name="url" type="text" placeholder="%s" value="' . esc_attr( $commenter['comment_author_url'] ) . '" />', __('Website', 'origami')),
47+
'author' => sprintf( '<input name="author" type="text" placeholder="%s" value="' . esc_attr( $commenter['comment_author'] ) . '" required />', __( 'Name*', 'origami' ) ),
48+
'email' => sprintf( '<input name="email" type="text" placeholder="%s" value="' . esc_attr( $commenter['comment_author_email'] ) . '" required />', __( 'Email*', 'origami' ) ),
49+
'url' => sprintf( '<input name="url" type="text" placeholder="%s" value="' . esc_attr( $commenter['comment_author_url'] ) . '" />', __( 'Website', 'origami' ) ),
5050
),
5151
'comment_field' => '<textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea>',
52-
));
53-
?>
52+
) );
53+
?>
5454
</div>
55-
<?php endif; ?>
55+
<?php } ?>
5656

57-
<?php if(!comments_open() && !is_page() && post_type_supports(get_post_type(), 'comments')) : ?>
57+
<?php if ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) { ?>
5858
<div id="comments" class="comments-disabled content">
59-
<p><?php _e('Comments are Disabled', 'origami') ?></p>
59+
<p><?php _e( 'Comments are Disabled', 'origami' ); ?></p>
6060
</div>
61-
<?php endif; ?>
61+
<?php } ?>

0 commit comments

Comments
 (0)