Browse Source

fix: coding standards

pull/351/head
Ricardo Aragon 2 years ago
parent
commit
9fd60d8c24
  1. 2
      inc/helpers/namespace.php
  2. 2
      partials/content-front-page.php

2
inc/helpers/namespace.php

@ -446,7 +446,7 @@ function maybe_truncate_string( $string, $length = 40 ) {
function get_catalog_page(): ?\WP_Post { function get_catalog_page(): ?\WP_Post {
$catalog_pages = get_pages( [ $catalog_pages = get_pages( [
'meta_key' => '_wp_page_template', 'meta_key' => '_wp_page_template',
'meta_value' => 'page-catalog.php', 'meta_value' => 'page-catalog.php', //phpcs:ignore HM.Performance.SlowMetaQuery.slow_query_meta_value
]); ]);
return $catalog_pages[0] ?? null; return $catalog_pages[0] ?? null;
} }

2
partials/content-front-page.php

@ -58,7 +58,7 @@ if ( $catalog_page ) {
<div class="slider" role="region" aria-labelledby="latest-books-title" data-total-pages="<?php echo $catalog_data['pages']; ?>" <div class="slider" role="region" aria-labelledby="latest-books-title" data-total-pages="<?php echo $catalog_data['pages']; ?>"
<?php <?php
if ( $next_page <= $catalog_data['pages'] ) : if ( $next_page <= $catalog_data['pages'] ) :
?> ?>
data-next-page="<?php echo $next_page; ?>"<?php endif; ?>> data-next-page="<?php echo $next_page; ?>"<?php endif; ?>>
<ul class="books"> <ul class="books">
<?php <?php

Loading…
Cancel
Save