mirror of
https://github.com/Frumph/comicpress.git
synced 2026-01-31 02:05:17 +01:00
added escaping functions for output part 1
the first files have no WPCS messages more
This commit is contained in:
15
404.php
15
404.php
@@ -9,7 +9,8 @@
|
||||
* @package Comicpress
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="post uentry type-page">
|
||||
|
||||
@@ -18,7 +19,7 @@ get_header(); ?>
|
||||
<div class="post-info">
|
||||
|
||||
<h2 class="page-title">
|
||||
<?php _e( 'Page Not Found', 'comicpress' ); ?>
|
||||
<?php esc_html_e( 'Page Not Found', 'comicpress' ); ?>
|
||||
</h2>
|
||||
|
||||
</div>
|
||||
@@ -26,10 +27,10 @@ get_header(); ?>
|
||||
<div class="entry">
|
||||
|
||||
<p>
|
||||
<a href="<?php echo site_url(); ?>">
|
||||
<?php _e( 'Click here to return to the home page', 'comicpress' ); ?>
|
||||
<a href="<?php echo esc_html( site_url() ); ?>">
|
||||
<?php esc_html_e( 'Click here to return to the home page', 'comicpress' ); ?>
|
||||
</a>
|
||||
<?php _e( 'or try a search:', 'comicpress' ); ?>
|
||||
<?php esc_html_e( 'or try a search:', 'comicpress' ); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php get_search_form(); ?>
|
||||
@@ -45,4 +46,6 @@ get_header(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
<?php
|
||||
get_footer();
|
||||
?>
|
||||
|
||||
162
search.php
162
search.php
@@ -1,4 +1,13 @@
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Search Page
|
||||
* by Philip M. Hofer (Frumph)
|
||||
* http://frumph.net/
|
||||
*
|
||||
* Content for the Search page.
|
||||
*
|
||||
* @package Comicpress
|
||||
*/
|
||||
|
||||
get_header();
|
||||
|
||||
@@ -7,115 +16,114 @@ if ( have_posts() ) :
|
||||
$count = $wp_query->found_posts;
|
||||
?>
|
||||
|
||||
<h2 class="page-title">
|
||||
<h2 class="page-title">
|
||||
|
||||
<?php
|
||||
_e( 'Search for ‘', 'comicpress' );
|
||||
the_search_query();
|
||||
_e( '’', 'comicpress'
|
||||
);
|
||||
?>
|
||||
<?php
|
||||
esc_html_e( 'Search for ‘', 'comicpress' );
|
||||
the_search_query();
|
||||
esc_html_e( '’', 'comicpress' );
|
||||
?>
|
||||
|
||||
</h2>
|
||||
</h2>
|
||||
|
||||
<div class="searchresults">
|
||||
<div class="searchresults">
|
||||
|
||||
<?php
|
||||
printf(
|
||||
<?php
|
||||
printf(
|
||||
/* translators: Number of found results */
|
||||
_n( '%d result', '%d results', 'comicpress' ),
|
||||
$count
|
||||
);
|
||||
);
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php
|
||||
if ( comicpress_themeinfo( 'display_archive_as_links' ) ) {
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div <?php post_class(); ?>>
|
||||
|
||||
<div class="post-head"></div>
|
||||
|
||||
<div class="entry">
|
||||
|
||||
<table class="archive-table">
|
||||
|
||||
<div class="clear"></div>
|
||||
<?php
|
||||
if ( comicpress_themeinfo( 'display_archive_as_links' ) ) {
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<tr>
|
||||
<td class="archive-date">
|
||||
<?php the_time( 'M d, Y' ); ?>
|
||||
</td>
|
||||
<td class="archive-title">
|
||||
<a href="<?php echo esc_html( get_permalink( $post->ID ) ); ?>" rel="bookmark" title="<?php esc_html_e( 'Permanent Link:', 'comicpress' ); ?> <?php the_title(); ?>">
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<div class="post-head"></div>
|
||||
<?php
|
||||
endwhile;
|
||||
?>
|
||||
|
||||
<div class="entry">
|
||||
|
||||
<table class="archive-table">
|
||||
|
||||
<?php
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="archive-date">
|
||||
<?php the_time( 'M d, Y' ); ?>
|
||||
</td>
|
||||
<td class="archive-title">
|
||||
<a href="<?php echo get_permalink( $post->ID ); ?>" rel="bookmark" title="<?php _e( 'Permanent Link:', 'comicpress' ); ?> <?php the_title(); ?>">
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
endwhile;
|
||||
?>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="post-foot"></div>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
$post_format = ( $post->post_type !== 'post' ) ? $post->post_type : get_post_format();
|
||||
get_template_part( 'content', $post_format );
|
||||
endwhile;
|
||||
}
|
||||
?>
|
||||
<div class="post-foot"></div>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
$post_format = ( $post->post_type !== 'post' ) ? $post->post_type : get_post_format();
|
||||
get_template_part( 'content', $post_format );
|
||||
endwhile;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php
|
||||
comicpress_pagination();
|
||||
else :
|
||||
?>
|
||||
|
||||
<div class="post post-search uentry type-page">
|
||||
<div class="post post-search uentry type-page">
|
||||
|
||||
<div class="post-head"></div>
|
||||
<div class="post-head"></div>
|
||||
|
||||
<div class="post-content">
|
||||
<div class="post-content">
|
||||
|
||||
<div class="entry">
|
||||
<div class="entry">
|
||||
|
||||
<h3>
|
||||
<?php _e( 'No results found.', 'comicpress' ); ?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php _e( 'Try another search?', 'comicpress' ); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php get_search_form(); ?>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="post-foot"></div>
|
||||
<h3>
|
||||
<?php esc_html_e( 'No results found.', 'comicpress' ); ?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e( 'Try another search?', 'comicpress' ); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php get_search_form(); ?>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="post-foot"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
|
||||
get_footer();
|
||||
?>
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
<form method="get" class="searchform" action="<?php echo home_url(); ?>">
|
||||
<input type="text" value="<?php _e( 'Search...', 'comicpress' ); ?>" name="s" class="s-search" onfocus="this.value=(this.value=='<?php _e( 'Search...', 'comicpress' ); ?>') ? '' : this.value;" onblur="this.value=(this.value=='') ? '<?php _e( 'Search...', 'comicpress' ); ?>' : this.value;" />
|
||||
<button type="submit">»</button>
|
||||
<?php
|
||||
/**
|
||||
* Search Form
|
||||
* by Philip M. Hofer (Frumph)
|
||||
* http://frumph.net/
|
||||
*
|
||||
* Method for the Search form.
|
||||
*
|
||||
* @package Comicpress
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<form method="get" class="searchform" action="<?php echo esc_html( home_url() ); ?>">
|
||||
<input type="text" value="<?php esc_html_e( 'Search...', 'comicpress' ); ?>" name="s" class="s-search" onfocus="this.value=(this.value=='<?php esc_html_e( 'Search...', 'comicpress' ); ?>') ? '' : this.value;" onblur="this.value=(this.value=='') ? '<?php esc_html_e( 'Search...', 'comicpress' ); ?>' : this.value;" />
|
||||
<button type="submit">
|
||||
<?php esc_html_e( '»', 'comicpress' ); ?>
|
||||
</button>
|
||||
</form>
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
|
||||
<div class="sidebar-no-widgets">
|
||||
|
||||
<?php _e( 'There are currently no widgets assigned to the left-sidebar, place some!', 'comicpress' ); ?>
|
||||
<?php esc_html_e( 'There are currently no widgets assigned to the left-sidebar, place some!', 'comicpress' ); ?>
|
||||
<br />
|
||||
<br />
|
||||
<?php _e( 'Once you add widgets to this sidebar, this default information will go away.', 'comicpress' ); ?>
|
||||
<?php esc_html_e( 'Once you add widgets to this sidebar, this default information will go away.', 'comicpress' ); ?>
|
||||
<br />
|
||||
<br />
|
||||
<?php _e( 'Widgets can be added by going to your dashboard (wp-admin) ➔ Appearance ➔ Widgets, drag a widget you want to see into one of the appropriate sidebars.', 'comicpress' ); ?>
|
||||
<?php esc_html_e( 'Widgets can be added by going to your dashboard (wp-admin) ➔ Appearance ➔ Widgets, drag a widget you want to see into one of the appropriate sidebars.', 'comicpress' ); ?>
|
||||
<br />
|
||||
|
||||
</div>
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
|
||||
<div class="sidebar-no-widgets">
|
||||
|
||||
<?php _e( 'There are currently no widgets assigned to the right-sidebar, place some!', 'comicpress' ); ?>
|
||||
<?php esc_html_e( 'There are currently no widgets assigned to the right-sidebar, place some!', 'comicpress' ); ?>
|
||||
<br />
|
||||
<br />
|
||||
<?php _e( 'Once you add widgets to this sidebar, this default information will go away.', 'comicpress' ); ?>
|
||||
<?php esc_html_e( 'Once you add widgets to this sidebar, this default information will go away.', 'comicpress' ); ?>
|
||||
<br />
|
||||
<br />
|
||||
<?php _e( 'Widgets can be added by going to your dashboard (wp-admin) ➔ Appearance ➔ Widgets, drag a widget you want to see into one of the appropriate sidebars.', 'comicpress' ); ?>
|
||||
<?php esc_html_e( 'Widgets can be added by going to your dashboard (wp-admin) ➔ Appearance ➔ Widgets, drag a widget you want to see into one of the appropriate sidebars.', 'comicpress' ); ?>
|
||||
<br />
|
||||
|
||||
</div>
|
||||
|
||||
11
single.php
11
single.php
@@ -19,16 +19,23 @@ if ( have_posts() ) {
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
|
||||
<div class="post-head"></div>
|
||||
|
||||
<div class="post">
|
||||
|
||||
<p>
|
||||
<?php _e( 'Sorry, post is not found.', 'comicpress' ); ?>
|
||||
<?php esc_html_e( 'Sorry, post is not found.', 'comicpress' ); ?>
|
||||
</p>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="post-foot"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
get_footer();
|
||||
|
||||
Reference in New Issue
Block a user