Permalink
Browse files

More phpcs fixes

  • Loading branch information...
fjarrett committed Feb 22, 2017
1 parent 2eb99df commit 4d8aa9c8cc5234973e3283de403e137a2af0932b
View
@@ -14,6 +14,7 @@
* @package Primer
* @since 1.0.0
*/
get_header(); ?>
<section id="primary" class="content-area">
View
@@ -31,20 +31,20 @@
<h2 class="comments-title">
<?php
printf( // xss ok.
_nx(
'%1$d thought on %2$s',
'%1$d thoughts on %2$s',
get_comments_number(),
'1. number of comments, 2. post title',
'primer'
),
number_format_i18n( get_comments_number() ),
sprintf(
'<span>&ldquo;%s&rdquo;</span>',
get_the_title()
)
);
printf( // xss ok.
_nx(
'%1$d thought on %2$s',
'%1$d thoughts on %2$s',
get_comments_number(),
'1. number of comments, 2. post title',
'primer'
),
number_format_i18n( get_comments_number() ),
sprintf(
'<span>&ldquo;%s&rdquo;</span>',
get_the_title()
)
);
?>
</h2>
View
@@ -7,6 +7,7 @@
* @package Primer
* @since 1.0.0
*/
?>
<section class="no-results not-found">
View
@@ -7,6 +7,7 @@
* @package Primer
* @since 1.0.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
View
@@ -7,6 +7,7 @@
* @package Primer
* @since 1.0.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
View
@@ -7,11 +7,13 @@
* @package Primer
* @since 1.0.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
/**
* Fires inside the `article` element, before the content.
*
@@ -20,6 +22,7 @@
* @since 1.0.0
*/
do_action( 'primer_before_post_content' );
?>
<?php if ( ! is_single() || ! primer_use_featured_hero_image() ) : ?>
@@ -31,6 +34,7 @@
<?php get_template_part( 'templates/parts/loop/post', 'title' ); ?>
<?php
/**
* Fires after templates/parts/loop/post template
*
@@ -39,6 +43,7 @@
* @since 1.0.0
*/
do_action( 'primer_after_post_title_template' );
?>
<?php if ( is_single() ) : ?>
@@ -54,12 +59,14 @@
<?php get_template_part( 'templates/parts/loop/post', 'footer' ); ?>
<?php
/**
* Fires inside the `article` element, after the content.
*
* @since 1.0.0
*/
do_action( 'primer_after_post_content' );
?>
</article><!-- #post-## -->
View
@@ -9,24 +9,28 @@
* @package Primer
* @since 1.0.0
*/
?>
</div><!-- #content -->
<?php
/**
* Fires before the `<footer>` element.
*
* @since 1.0.0
*/
do_action( 'primer_before_footer' );
?>
<footer id="colophon" class="site-footer">
<div class="site-footer-inner">
<?php
/**
* Fires inside the `<footer>` element.
*
@@ -35,13 +39,15 @@
* @since 1.0.0
*/
do_action( 'primer_footer' );
?>
</div><!-- .site-footer-inner -->
</footer><!-- #colophon -->
<?php
/**
* Fires after the `<footer>` element.
*
@@ -50,6 +56,7 @@
* @since 1.0.0
*/
do_action( 'primer_after_footer' );
?>
</div><!-- #page -->
View
@@ -211,39 +211,39 @@ function primer_setup() {
/**
* Enable support for Automatic Feed Links.
*
* @link https://codex.wordpress.org/Function_Reference/add_theme_support#Feed_Links
* @link https://developer.wordpress.org/reference/functions/add_theme_support/#feed-links
* @since 1.0.0
*/
add_theme_support( 'automatic-feed-links' );
/**
* Enable support for plugins and themes to manage the document title tag.
*
* @link https://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
* @link https://developer.wordpress.org/reference/functions/add_theme_support/#title-tag
* @since 1.0.0
*/
add_theme_support( 'title-tag' );
/**
* Enable support for Post Thumbnails on posts and pages.
*
* @link https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
* @link https://developer.wordpress.org/reference/functions/add_theme_support/#post-thumbnails
* @since 1.0.0
*/
add_theme_support( 'post-thumbnails' );
/**
* Enable support for customizer selective refresh
* Enable support for customizer selective refresh.
*
* https://developer.wordpress.org/reference/functions/add_theme_support/#customize-selective-refresh-widgets
* @link https://developer.wordpress.org/reference/functions/add_theme_support/#customize-selective-refresh-widgets
* @since 1.0.0
*/
add_theme_support( 'customize-selective-refresh-widgets' );
/**
* Register custom Custom Navigation Menus.
*
* @link https://codex.wordpress.org/Function_Reference/register_nav_menus
* @link https://developer.wordpress.org/reference/functions/register_nav_menus/
* @since 1.0.0
*/
register_nav_menus(
@@ -306,11 +306,11 @@ function primer_setup() {
* @filter image_size_names_choose
* @since 1.0.0
*
* @param array $sizes
* @param array $size_names Array of image sizes and their names.
*
* @return array
*/
function primer_image_size_names_choose( $sizes ) {
function primer_image_size_names_choose( $size_names ) {
global $primer_image_sizes;
@@ -319,7 +319,7 @@ function primer_image_size_names_choose( $sizes ) {
wp_list_pluck( $primer_image_sizes, 'label' )
);
return array_merge( $sizes, $labels );
return array_merge( $size_names, $labels );
}
View
@@ -29,32 +29,37 @@
<body <?php body_class(); ?>>
<?php
/**
* Fires inside the `<body>` element.
*
* @since 1.0.0
*/
do_action( 'primer_body' );
?>
<div id="page" class="hfeed site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'primer' ); ?></a>
<?php
/**
* Fires before the `<header>` element.
*
* @since 1.0.0
*/
do_action( 'primer_before_header' );
?>
<header id="masthead" class="site-header" role="banner">
<div class="site-header-wrapper">
<?php
/**
* Fires inside the `<header>` element.
*
@@ -64,22 +69,26 @@
* @since 1.0.0
*/
do_action( 'primer_header' );
?>
</div><!-- .site-header-wrapper -->
<?php
/**
* Fires inside the `<div class="site-header-wrapper">` element.
*
* @since 1.0.0
*/
do_action( 'primer_after_site_header_wrapper' );
?>
</header><!-- #masthead -->
<?php
/**
* Fires after the `<header>` element.
*
@@ -89,6 +98,7 @@
* @since 1.0.0
*/
do_action( 'primer_after_header' );
?>
<div id="content" class="site-content">
View
@@ -125,7 +125,7 @@ function primer_wc_shop_layout( $layout ) {
if ( is_shop() ) {
remove_filter( 'primer_current_layout', __FUNCTION__ ); // Prevent infinite loop
remove_filter( 'primer_current_layout', __FUNCTION__ ); // Prevent infinite loop.
$layout = primer_get_layout( wc_get_page_id( 'shop' ) );
@@ -218,10 +218,10 @@ function primer_wc_product_classes( $classes ) {
global $post, $woocommerce_loop;
// Check if we are on a single product page
// Check if we are on a single product page.
$is_product = ( is_shop() && 'product' === $post->post_type );
// Check if we are in an upsell or related product loop
// Check if we are in an upsell or related product loop.
$is_upsell_or_related = (
is_single()
&&
@@ -401,7 +401,7 @@ function primer_wc_promoted_products( $per_page = 4, $columns = 4, $recent_fallb
*
* @var int
*/
$per_page = (int) apply_filters( 'primer_wc_promoted_products_per_page', $per_page ); // Can be negative
$per_page = (int) apply_filters( 'primer_wc_promoted_products_per_page', $per_page ); // Can be negative.
/**
* Filter the number of columns to display promoted products in.
@@ -469,7 +469,7 @@ function primer_wc_best_selling_products( $per_page = 4, $columns = 4 ) {
*
* @var int
*/
$per_page = (int) apply_filters( 'primer_wc_best_selling_products_per_page', $per_page ); // Can be negative
$per_page = (int) apply_filters( 'primer_wc_best_selling_products_per_page', $per_page ); // Can be negative.
/**
* Filter the number of columns to display best-selling products in.
@@ -494,10 +494,10 @@ function primer_wc_best_selling_products( $per_page = 4, $columns = 4 ) {
* @filter wp_get_nav_menu_items
* @since NEXT
*
* @param array $items
* @param object $menu
* @param array $items An array of menu item post objects.
* @param object $menu The menu object.
*
* @return array $items
* @return array
*/
function primer_wc_generate_cart_menu_item( $items, $menu ) {
Oops, something went wrong.

0 comments on commit 4d8aa9c

Please sign in to comment.