- Convert all PHP files from CRLF to LF line endings - Reformat multi-line function calls per WPCS standard (opening paren last on line, closing paren on own line) - Fix assignment-in-conditional in single-peptide.php - Change double quotes to single quotes in content-none.php - Exclude InvalidClassFileName sniff (standard WP functions.php pattern) - Fix archive-peptide.php opening PHP tag placement Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
52 lines
1.3 KiB
PHP
52 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* Template part for displaying content when nothing is found
|
|
*
|
|
* @package peptide-starter
|
|
*/
|
|
|
|
?>
|
|
<div class="ps-card">
|
|
<header class="entry-header">
|
|
<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'peptide-starter' ); ?></h1>
|
|
</header>
|
|
|
|
<div class="entry-content">
|
|
<?php
|
|
if ( is_search() ) {
|
|
?>
|
|
<p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'peptide-starter' ); ?></p>
|
|
<?php
|
|
get_search_form();
|
|
} elseif ( is_home() && current_user_can( 'publish_posts' ) ) {
|
|
?>
|
|
<p>
|
|
<?php
|
|
printf(
|
|
wp_kses(
|
|
__( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'peptide-starter' ),
|
|
array(
|
|
'a' => array(
|
|
'href' => array(),
|
|
),
|
|
)
|
|
),
|
|
esc_url( admin_url( 'post-new.php' ) )
|
|
);
|
|
?>
|
|
</p>
|
|
<?php
|
|
} elseif ( is_archive() ) {
|
|
?>
|
|
<p><?php esc_html_e( 'It looks like there are no posts for this archive. Try a different category or date.', 'peptide-starter' ); ?></p>
|
|
<?php
|
|
} else {
|
|
?>
|
|
<p><?php esc_html_e( 'It seems we can\'t find what you\'re looking for. Perhaps searching can help.', 'peptide-starter' ); ?></p>
|
|
<?php
|
|
get_search_form();
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|