Skip to content

Commit

Permalink
Merge pull request #25 from siteorigin/phpcs
Browse files Browse the repository at this point in the history
PHP CS
  • Loading branch information
AlexGStapleton authored Feb 12, 2024
2 parents 9f808d9 + aed7e3b commit 44acf57
Show file tree
Hide file tree
Showing 37 changed files with 1,701 additions and 1,620 deletions.
4 changes: 2 additions & 2 deletions 404.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php get_header(); ?>

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

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

Expand Down
6 changes: 3 additions & 3 deletions admin/about/page-free.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h3><?php _e( 'Forever Free', 'origami' ) ?></h3>
<h3><?php _e( 'Forever Free', 'origami' ); ?></h3>
<p>
<?php _e( "Origami is a completely free WordPress theme.", 'origami' ) ?>
<?php _e( "We'll continue developing and enhancing it for years to come.", 'origami' ) ?>
<?php _e( 'Origami is a completely free WordPress theme.', 'origami' ); ?>
<?php _e( "We'll continue developing and enhancing it for years to come.", 'origami' ); ?>
</p>
8 changes: 4 additions & 4 deletions admin/about/page-github.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h3><?php _e( 'Developed on Github', 'origami' ) ?></h3>
<img src="<?php echo esc_url( get_template_directory_uri() ) ?>/admin/about/github.png" class="about-image-right about-image-no-text-below" />
<h3><?php _e( 'Developed on Github', 'origami' ); ?></h3>
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/admin/about/github.png" class="about-image-right about-image-no-text-below" />
<p>
<?php printf( __( "Origami is actively %sdeveloped on Github%s.", 'origami' ), '<a href="https://github.com/siteorigin/origami">', '</a>' ) ?>
<?php _e( "You can watch what's happening with its development and even make contributions yourself.", 'origami' ) ?>
<?php printf( __( 'Origami is actively %sdeveloped on Github%s.', 'origami' ), '<a href="https://github.com/siteorigin/origami">', '</a>' ); ?>
<?php _e( "You can watch what's happening with its development and even make contributions yourself.", 'origami' ); ?>
</p>
8 changes: 4 additions & 4 deletions admin/about/page-mature.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h3><?php _e( 'Stable and Mature', 'origami' ) ?></h3>
<h3><?php _e( 'Stable and Mature', 'origami' ); ?></h3>
<p>
<?php _e( "We've been developing Origami since 2012.", 'origami' ) ?>
<?php _e( "In fact, Origami was our very first WordPress Theme.", 'origami' ) ?>
<?php _e( "We've continued maintaining and evolving it over all these years - turning it into one of our most stable WordPress themes.", 'origami' ) ?>
<?php _e( "We've been developing Origami since 2012.", 'origami' ); ?>
<?php _e( 'In fact, Origami was our very first WordPress Theme.', 'origami' ); ?>
<?php _e( "We've continued maintaining and evolving it over all these years - turning it into one of our most stable WordPress themes.", 'origami' ); ?>
</p>
6 changes: 3 additions & 3 deletions admin/about/page-page-builder.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h3><?php _e( 'Enhanced by Page Builder', 'origami' ) ?></h3>
<h3><?php _e( 'Enhanced by Page Builder', 'origami' ); ?></h3>
<p>
<?php printf( __( "Origami integrates, beautifully, with our %sfree Page Builder%s plugin.", 'origami' ), '<a href="https://siteorigin.com/page-builder/">', '</a>' ) ?>
<?php _e( 'This powerful plugin gives you full drag and drop capabilities right inside Origami.', 'origami' ) ?>
<?php printf( __( 'Origami integrates, beautifully, with our %sfree Page Builder%s plugin.', 'origami' ), '<a href="https://siteorigin.com/page-builder/">', '</a>' ); ?>
<?php _e( 'This powerful plugin gives you full drag and drop capabilities right inside Origami.', 'origami' ); ?>
</p>
6 changes: 3 additions & 3 deletions admin/about/page-support.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h3><?php _e( 'Support and Documentation', 'origami' ) ?></h3>
<h3><?php _e( 'Support and Documentation', 'origami' ); ?></h3>
<p>
<?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>' ) ?>
<?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>' ) ?>
<?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>' ); ?>
<?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>' ); ?>
</p>
15 changes: 9 additions & 6 deletions admin/metabox-columns.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<?php
global $post;
$columns = get_post_meta($post->ID, 'content_columns', true);
if(empty($columns)) $columns = 1;
$columns = get_post_meta( $post->ID, 'content_columns', true );

if ( empty( $columns ) ) {
$columns = 1;
}
?>

<label><?php _e('Columns', 'origami') ?></label>
<label><?php _e( 'Columns', 'origami' ); ?></label>
<select name="content_columns">
<?php for($i = 1; $i <= 3; $i++) : ?>
<option value="<?php echo $i ?>" <?php selected($columns, $i) ?>><?php printf(_n('%1$s Column', '%1$s Columns', $i, 'origami'),$i) ?></option>
<?php endfor ?>
<?php for ( $i = 1; $i <= 3; $i++ ) { ?>
<option value="<?php echo $i; ?>" <?php selected( $columns, $i ); ?>><?php printf( _n( '%1$s Column', '%1$s Columns', $i, 'origami' ), $i ); ?></option>
<?php } ?>
</select>
26 changes: 13 additions & 13 deletions archive.php
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<?php get_header() ?>
<?php get_header(); ?>

<h1 class="archive-title">
<?php if ( is_day() ) : ?>
<?php if ( is_day() ) { ?>
<?php printf( __( 'Daily Archives: %s', 'origami' ), '<span>' . get_the_date() . '</span>' ); ?>
<?php elseif ( is_month() ) : ?>
<?php } elseif ( is_month() ) { ?>
<?php printf( __( 'Monthly Archives: %s', 'origami' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'origami' ) ) . '</span>' ); ?>
<?php elseif ( is_year() ) : ?>
<?php } elseif ( is_year() ) { ?>
<?php printf( __( 'Yearly Archives: %s', 'origami' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'origami' ) ) . '</span>' ); ?>
<?php elseif ( is_tag() ) : ?>
<?php } elseif ( is_tag() ) { ?>
<?php printf( __( 'Posts Tagged: %s', 'origami' ), '<span>' . single_tag_title( '', false ) . '</span>' ); ?>
<?php elseif ( is_category() ) : ?>
<?php } elseif ( is_category() ) { ?>
<?php printf( __( 'Posts in Category: %s', 'origami' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?>
<?php elseif ( is_search() ) : ?>
<?php } elseif ( is_search() ) { ?>
<?php printf( __( 'Search Results for: %s', 'origami' ), '<span>' . get_search_query() . '</span>' ); ?>
<?php else : ?>
<?php } else { ?>
<?php _e( 'Blog Archives', 'origami' ); ?>
<?php endif; ?>
<?php } ?>
</h1>

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

<?php get_template_part('loop', 'index') ?>
<?php get_template_part( 'loop', 'index' ); ?>

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

<?php get_footer() ?>
<?php get_footer(); ?>
14 changes: 8 additions & 6 deletions author.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<?php get_header(); the_post(); ?>
<?php get_header();
the_post(); ?>

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

<div><?php rewind_posts(); get_template_part('loop', 'index') ?></div>
<div><?php rewind_posts();
get_template_part( 'loop', 'index' ); ?></div>

<?php if(get_posts_nav_link()) : ?>
<?php if ( get_posts_nav_link() ) { ?>
<div id="posts-nav">
<?php posts_nav_link('', __('Newer Entries', 'origami'), __('Older Entries', 'origami')); ?>
<?php posts_nav_link( '', __( 'Newer Entries', 'origami' ), __( 'Older Entries', 'origami' ) ); ?>
</div>
<?php endif; ?>
<?php } ?>

<?php get_footer(); ?>
56 changes: 28 additions & 28 deletions comments.php
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
<?php if(post_password_required()) : ?>
<?php if ( post_password_required() ) { ?>
<a name="comments"></a>
<div id="comments">
<p><?php _e('Password Required', 'origami') ?></p>
<p><?php _e( 'Password Required', 'origami' ); ?></p>
</div>
<?php return; ?>
<?php endif; ?>
<?php } ?>

<?php if(have_comments() || comments_open()) : ?>
<?php if ( have_comments() || comments_open() ) { ?>
<a name="comments"></a>
<div id="comments" class="section">
<?php if(have_comments()) : ?>
<?php if ( have_comments() ) { ?>
<h3 class="comments-title">
<?php
printf(
_n('One Comment', '%1$s Comments', get_comments_number(), 'origami'),
number_format_i18n(get_comments_number()),
_n( 'One Comment', '%1$s Comments', get_comments_number(), 'origami' ),
number_format_i18n( get_comments_number() ),
'<em>' . get_the_title() . '</em>'
);
?>
?>
</h3>

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

<ol class="commentlist">
<?php
// List comments
wp_list_comments(array(
'callback' => 'origami_comment'
));
?>
// List comments
wp_list_comments( array(
'callback' => 'origami_comment',
) );
?>
</ol>
<?php endif; ?>
<?php } ?>

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

<?php if(!comments_open() && !is_page() && post_type_supports(get_post_type(), 'comments')) : ?>
<?php if ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) { ?>
<div id="comments" class="comments-disabled content">
<p><?php _e('Comments are Disabled', 'origami') ?></p>
<p><?php _e( 'Comments are Disabled', 'origami' ); ?></p>
</div>
<?php endif; ?>
<?php } ?>
22 changes: 11 additions & 11 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@



<?php if(!empty($sidebars_widgets['site-footer'])) : ?>
<?php if ( ! empty( $sidebars_widgets['site-footer'] ) ) { ?>

<?php do_action('origami_before_footer_widgets') ?>
<?php do_action( 'origami_before_footer_widgets' ); ?>

<?php get_template_part('parts/footer-widgets') ?>
<?php get_template_part( 'parts/footer-widgets' ); ?>

<?php do_action('origami_after_footer_widgets') ?>
<?php do_action( 'origami_after_footer_widgets' ); ?>

<?php endif; ?>
<?php } ?>

<?php do_action('origami_bottom_page_container') ?>
<?php do_action( 'origami_bottom_page_container' ); ?>

</div>

<?php do_action('origami_after_page_container') ?>
<?php do_action( 'origami_after_page_container' ); ?>

<?php do_action('origami_before_footer') ?>
<?php do_action( 'origami_before_footer' ); ?>

<?php get_template_part('parts/footer-copyright') ?>
<?php get_template_part( 'parts/footer-copyright' ); ?>

<?php do_action('origami_after_footer') ?>
<?php do_action( 'origami_after_footer' ); ?>

</div>

<?php wp_footer() ?>
<?php wp_footer(); ?>
</body>
</html>
Loading

0 comments on commit 44acf57

Please sign in to comment.