mirror of
https://github.com/Frumph/comicpress.git
synced 2026-01-31 02:05:17 +01:00
Reduce WP Messages
and make the code readable
This commit is contained in:
18
404.php
18
404.php
@@ -12,23 +12,37 @@
|
||||
get_header(); ?>
|
||||
|
||||
<div class="post uentry type-page">
|
||||
|
||||
<div class="post-content">
|
||||
|
||||
<div class="post-info">
|
||||
|
||||
<h2 class="page-title">
|
||||
<?php _e( 'Page Not Found', 'comicpress' ); ?>
|
||||
</h2>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="entry">
|
||||
|
||||
<p>
|
||||
<a href="<?php echo site_url(); ?>"><?php _e( 'Click here to return to the home page', 'comicpress' ); ?></a> <?php _e( 'or try a search:', 'comicpress' ); ?>
|
||||
<a href="<?php echo site_url(); ?>">
|
||||
<?php _e( 'Click here to return to the home page', 'comicpress' ); ?>
|
||||
</a>
|
||||
<?php _e( 'or try a search:', 'comicpress' ); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php get_search_form(); ?>
|
||||
<?php get_search_form(); ?>
|
||||
</p>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
|
||||
97
archive.php
97
archive.php
@@ -22,7 +22,7 @@ if ( is_category() ) {
|
||||
if ( isset( $wp_query->query_vars['cat'] ) ) $theCatID = (int) $wp_query->query_vars['cat'];
|
||||
}
|
||||
|
||||
$count = $wp_query->found_posts;
|
||||
$count = $wp_query->found_posts;
|
||||
if ( empty( $count ) ) $count = 'No';
|
||||
|
||||
$title_string = '';
|
||||
@@ -45,7 +45,7 @@ if ( $count > 0 ) {
|
||||
} elseif ( isset( $wp_query->query_vars['taxonomy'] ) && taxonomy_exists( $wp_query->query_vars['taxonomy'] ) ) {
|
||||
$taxonomy_name = '';
|
||||
if ( isset( $wp_query->query_vars['chapters'] ) ) {
|
||||
$taxonomy_name = get_term_by('slug', $wp_query->query_vars['chapters'], 'chapters');
|
||||
$taxonomy_name = get_term_by( 'slug', $wp_query->query_vars['chapters'], 'chapters' );
|
||||
if ( ! is_wp_error( $taxonomy_name ) && ! empty( $taxonomy_name ) ) $title_string = $taxonomy_name->name;
|
||||
} elseif (isset($wp_query->query_vars['locations'])) {
|
||||
$taxonomy_name = get_term_by( 'slug', $wp_query->query_vars['locations'], 'locations' );
|
||||
@@ -63,11 +63,17 @@ if ( $count > 0 ) {
|
||||
} else $title_string = __( 'No Archive Found.', 'comicpress' );
|
||||
if ( have_posts() ) {
|
||||
?>
|
||||
<h2 class="page-title"><?php echo $title_string; ?></h2>
|
||||
|
||||
<h2 class="page-title">
|
||||
<?php echo $title_string; ?>
|
||||
</h2>
|
||||
|
||||
<?php
|
||||
if ( isset( $wp_query->query_vars['chapters'] ) || ( $wp_query->query_vars['post_type'] == 'comic' ) ) {
|
||||
?>
|
||||
|
||||
<div class="archiveresults">
|
||||
|
||||
<?php
|
||||
printf(
|
||||
/* translators: Number of found comic */
|
||||
@@ -75,11 +81,15 @@ if ( have_posts() ) {
|
||||
$count
|
||||
);
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
|
||||
<div class="archiveresults">
|
||||
|
||||
<?php
|
||||
printf(
|
||||
/* translators: Number of found results */
|
||||
@@ -87,72 +97,112 @@ if ( have_posts() ) {
|
||||
$count
|
||||
);
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php
|
||||
if ( function_exists( 'ceo_pluginfo' ) && ( isset( $wp_query->query_vars['chapters'] ) || isset( $wp_query->query_vars['characters'] ) || isset( $wp_query->query_vars['locations'] ) || ( $wp_query->query_vars['post_type'] == 'comic' ) ) && ( comicpress_themeinfo( 'display_archive_as_links' ) && ! comicpress_is_bbpress() ) ) {
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
?>
|
||||
|
||||
<div class="archivecomicthumbwrap">
|
||||
|
||||
<div class="archivecomicthumbdate">
|
||||
|
||||
<?php echo get_the_time( 'M jS, Y' ); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="archivecomicframe">
|
||||
|
||||
<?php
|
||||
$thumbnail = ceo_display_comic_thumbnail( 'thumbnail', $post );
|
||||
$thumbnail = ( ! $thumbnail ) ? __( 'No Thumbnail or Featured Image Found.', 'comicpress' ) : $thumbnail;
|
||||
?>
|
||||
<a href="<?php the_permalink(); ?>" title="<?php echo the_title(); ?>"><?php echo $thumbnail; ?></a><br />
|
||||
|
||||
<a href="<?php the_permalink(); ?>" title="<?php echo the_title(); ?>">
|
||||
<?php echo $thumbnail; ?>
|
||||
</a>
|
||||
<br />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
endwhile;
|
||||
} elseif ( comicpress_themeinfo( 'display_archive_as_links' ) || comicpress_is_bbpress() ) { ?>
|
||||
} elseif ( comicpress_themeinfo( 'display_archive_as_links' ) || comicpress_is_bbpress() ) {
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
|
||||
<div class="post-head"></div>
|
||||
|
||||
<div class="entry">
|
||||
<table class="archive-table">
|
||||
<?php
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
?>
|
||||
<tr>
|
||||
<td class="archive-date">
|
||||
<span class="archive-date-month-day"><?php the_time( 'M d, ' ); ?></span>
|
||||
<span class="archive-date-year"><?php the_time( 'Y' ); ?></span>
|
||||
</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>
|
||||
|
||||
<table class="archive-table">
|
||||
|
||||
<?php
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="archive-date">
|
||||
<span class="archive-date-month-day">
|
||||
<?php the_time( 'M d, ' ); ?>
|
||||
</span>
|
||||
<span class="archive-date-year">
|
||||
<?php the_time( 'Y' ); ?>
|
||||
</span>
|
||||
</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>
|
||||
?>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
while (have_posts() ) : the_post();
|
||||
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 {
|
||||
?>
|
||||
|
||||
<h2 class="page-title">
|
||||
<?php echo $title_string; ?>
|
||||
</h2>
|
||||
|
||||
<div class="archiveresults">
|
||||
|
||||
<?php
|
||||
printf(
|
||||
/* translators: Number of found results */
|
||||
@@ -160,8 +210,11 @@ if ( have_posts() ) {
|
||||
$count
|
||||
);
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php
|
||||
}
|
||||
get_footer();
|
||||
|
||||
155
author.php
155
author.php
@@ -25,18 +25,31 @@ if ( get_query_var( 'author_name' ) ) {
|
||||
<h2>
|
||||
<?php _e( 'No such author.', 'comicpress' ); ?>
|
||||
</h2>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
|
||||
<div class="post-head"></div>
|
||||
|
||||
<div class="post-content">
|
||||
|
||||
<div class="entry">
|
||||
|
||||
<div class="userpage-avatar">
|
||||
<?php echo str_replace( 'photo', 'photo instant nocorner itxtalt', get_avatar( $curauth->user_email, 64, comicpress_random_default_avatar( $curauth->user_email ), esc_attr( $curauth->display_name, 1) ) ); ?>
|
||||
|
||||
<?php
|
||||
echo str_replace( 'photo', 'photo instant nocorner itxtalt', get_avatar( $curauth->user_email, 64, comicpress_random_default_avatar( $curauth->user_email ), esc_attr( $curauth->display_name, 1 ) ) );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="userpage-info">
|
||||
|
||||
<div class="userpage-bio">
|
||||
|
||||
<?php
|
||||
if ( $curauth->display_name )
|
||||
$authorname = $curauth->display_name;
|
||||
@@ -46,92 +59,142 @@ if ( get_query_var( 'author_name' ) ) {
|
||||
$authorname = $curauth->user_nicename;
|
||||
else $authorname = $curauth->user_login;
|
||||
?>
|
||||
<h2><?php echo $authorname; ?></h2>
|
||||
<?php if ( current_user_can( 'manage_options' ) ) { ?>
|
||||
<table class="user-info">
|
||||
<tr>
|
||||
<td class="user-info-name">
|
||||
<?php _e( 'Registered on', 'comicpress' ); ?>
|
||||
</td>
|
||||
<td class="user-info-value">
|
||||
<?php echo date_i18n( get_option( 'date_format' ), strtotime( $curauth->user_registered ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="user-info-name">
|
||||
<?php _e( 'Posts #', 'comicpress' ); ?>
|
||||
</td>
|
||||
<td class="user-info-value">
|
||||
<?php
|
||||
$author_id = get_the_author_meta( 'ID' );
|
||||
echo count_user_posts( $author_id );
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
|
||||
<h2>
|
||||
<?php echo $authorname; ?>
|
||||
</h2>
|
||||
|
||||
<?php
|
||||
if ( current_user_can( 'manage_options' ) ) {
|
||||
?>
|
||||
|
||||
<table class="user-info">
|
||||
<tr>
|
||||
<td class="user-info-name">
|
||||
<?php _e( 'Registered on', 'comicpress' ); ?>
|
||||
</td>
|
||||
<td class="user-info-value">
|
||||
<?php
|
||||
echo date_i18n( get_option( 'date_format' ), strtotime( $curauth->user_registered ) );
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="user-info-name">
|
||||
<?php _e( 'Posts #', 'comicpress' ); ?>
|
||||
</td>
|
||||
<td class="user-info-value">
|
||||
<?php
|
||||
$author_id = get_the_author_meta( 'ID' );
|
||||
echo count_user_posts( $author_id );
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<br />
|
||||
<table class="user-contacts">
|
||||
<?php if ( current_user_can( 'manage_options' ) ) { ?>
|
||||
|
||||
<?php
|
||||
if ( current_user_can( 'manage_options' ) ) {
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="user-contacts-serv">
|
||||
<?php _e( 'Email', 'comicpress' ); ?>
|
||||
</td>
|
||||
<td class="user-contacts-url">
|
||||
<a href="mailto://<?php echo $curauth->user_email; ?>" target="_blank"><?php echo $curauth->user_email; ?></a>
|
||||
<a href="mailto://<?php echo $curauth->user_email; ?>" target="_blank">
|
||||
<?php echo $curauth->user_email; ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ( !empty( $curauth->user_url ) ) {
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="user-contacts-serv">
|
||||
<?php _e( 'Website', 'comicpress' ); ?>
|
||||
</td>
|
||||
<td class="user-contacts-url">
|
||||
<a href="<?php echo $curauth->user_url; ?>" target="_blank"><?php echo $curauth->user_url; ?></a>
|
||||
<a href="<?php echo $curauth->user_url; ?>" target="_blank">
|
||||
<?php echo $curauth->user_url; ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ( ! empty( $curauth->twitter ) ) {
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="user-contacts-serv">
|
||||
<?php _e( 'Twitter', 'comicpress' ); ?>
|
||||
</td>
|
||||
<td class="user-contacts-url">
|
||||
<a href="<?php echo $curauth->twitter; ?>" target="_blank"><?php echo $curauth->twitter; ?></a>
|
||||
<a href="<?php echo $curauth->twitter; ?>" target="_blank">
|
||||
<?php echo $curauth->twitter; ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ( ! empty( $curauth->facebook ) ) {
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="user-contacts-serv">
|
||||
<?php _e( 'Facebook', 'comicpress' ); ?>
|
||||
</td>
|
||||
<td class="user-contacts-url">
|
||||
<a href="<?php echo $curauth->facebook; ?>" target="_blank"><?php echo $curauth->facebook; ?></a>
|
||||
<a href="<?php echo $curauth->facebook; ?>" target="_blank">
|
||||
<?php echo $curauth->facebook; ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ( ! empty( $curauth->description ) ) { ?>
|
||||
<?php
|
||||
if ( ! empty( $curauth->description ) ) {
|
||||
?>
|
||||
|
||||
<div class="userpage-desc">
|
||||
<?php echo $curauth->description; ?>
|
||||
|
||||
<?php
|
||||
echo $curauth->description;
|
||||
?>
|
||||
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php if ( have_posts() ) { ?>
|
||||
<?php
|
||||
if ( have_posts() ) {
|
||||
?>
|
||||
|
||||
<div class="userpage-posts">
|
||||
|
||||
<h3>
|
||||
<?php
|
||||
printf(
|
||||
@@ -142,6 +205,7 @@ if ( get_query_var( 'author_name' ) ) {
|
||||
?>
|
||||
</h3>
|
||||
<br />
|
||||
|
||||
<table class="author-posts">
|
||||
<?php
|
||||
while ( have_posts() ) :
|
||||
@@ -152,17 +216,32 @@ if ( get_query_var( 'author_name' ) ) {
|
||||
<?php the_time( 'M j, Y' ); ?>
|
||||
</td>
|
||||
<td class="author-archive-title">
|
||||
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
|
||||
<a href="<?php the_permalink(); ?>">
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php
|
||||
endwhile;
|
||||
?>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="post-foot"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
get_footer();
|
||||
|
||||
2
blog.php
2
blog.php
@@ -15,7 +15,7 @@ $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
|
||||
|
||||
$blog_query = array(
|
||||
'paged' => $paged,
|
||||
'post_type' => 'post'
|
||||
'post_type' => 'post',
|
||||
);
|
||||
|
||||
$wp_query = new WP_Query();
|
||||
|
||||
125
comments.php
125
comments.php
@@ -1,6 +1,11 @@
|
||||
<?php
|
||||
if ( post_password_required() ) { ?>
|
||||
<p class="nocomments"><?php _e( 'This post is password protected. Enter the password to view comments.', 'comicpress' ); ?></p>
|
||||
if ( post_password_required() ) {
|
||||
?>
|
||||
|
||||
<p class="nocomments">
|
||||
<?php _e( 'This post is password protected. Enter the password to view comments.', 'comicpress' ); ?>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
return;
|
||||
}
|
||||
@@ -9,23 +14,40 @@ if ( ! comments_open() && ! get_comments_number() ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="comment-wrapper">
|
||||
<?php if ( comments_open() ) { ?>
|
||||
|
||||
<?php
|
||||
if ( comments_open() ) {
|
||||
?>
|
||||
|
||||
<div class="commentsrsslink">
|
||||
<?php post_comments_feed_link( __( 'Comments RSS', 'comicpress' ) ); ?>
|
||||
|
||||
<?php
|
||||
post_comments_feed_link( __( 'Comments RSS', 'comicpress' ) );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<h4 id="comments">
|
||||
<?php comments_number( __( 'Discussion ¬', 'comicpress' ), __( 'Discussion ¬', 'comicpress' ), __( 'Discussion (%) ¬', 'comicpress' ) ); ?>
|
||||
|
||||
<?php
|
||||
comments_number( __( 'Discussion ¬', 'comicpress' ), __( 'Discussion ¬', 'comicpress' ), __( 'Discussion (%) ¬', 'comicpress' ) );
|
||||
?>
|
||||
|
||||
</h4>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ( isset( $comments_by_type['pings'] ) && ( ! isset( $wp_query->query_vars['cpage'] ) || ( (int) $wp_query->query_vars['cpage'] < 2 ) ) && ( count( $comments_by_type['pings'] ) > 0 ) ) {
|
||||
?>
|
||||
<div id="pingtrackback-wrap">
|
||||
|
||||
<ol class="commentlist">
|
||||
<li>
|
||||
<ul>
|
||||
<?php
|
||||
<li>
|
||||
<ul>
|
||||
|
||||
<?php
|
||||
$comment_args = array(
|
||||
'type' => 'pings',
|
||||
'avatar_size' => 32,
|
||||
@@ -34,16 +56,21 @@ if ( isset( $comments_by_type['pings'] ) && ( ! isset( $wp_query->query_vars['cp
|
||||
);
|
||||
wp_list_comments( $comment_args );
|
||||
?>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ( ! empty( $comments_by_type['comment'] ) ) {
|
||||
?>
|
||||
|
||||
<ol class="commentlist">
|
||||
<?php
|
||||
|
||||
<?php
|
||||
$comment_args = array(
|
||||
'type' => 'comment',
|
||||
'reply_text' => __( 'Reply ¬', 'comicpress' ),
|
||||
@@ -53,7 +80,9 @@ if ( ! empty( $comments_by_type['comment'] ) ) {
|
||||
);
|
||||
wp_list_comments( $comment_args );
|
||||
?>
|
||||
|
||||
</ol>
|
||||
|
||||
<?php
|
||||
if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) {
|
||||
if ( comicpress_themeinfo( 'enable_numbered_pagination' ) ) {
|
||||
@@ -64,24 +93,51 @@ if ( ! empty( $comments_by_type['comment'] ) ) {
|
||||
$pagelinks = str_replace( '<span', '<li', $pagelinks );
|
||||
$pagelinks = str_replace( '</span>', '</li>', $pagelinks );
|
||||
?>
|
||||
<div id="wp-paginav">
|
||||
<div id="paginav">
|
||||
<?php echo '<ul><li class="paginav-extend">' . __( 'Comment Pages', 'comicpress' ) . '</li>' . $pagelinks . '</ul>'; ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php } else { ?>
|
||||
<div class="commentnav">
|
||||
<div class="commentnav-right">
|
||||
<?php next_comments_link( __( 'Next Comments ↑', 'comicpress' ) ); ?>
|
||||
</div>
|
||||
<div class="commentnav-left">
|
||||
<?php previous_comments_link( __( '↓ Previous Comments', 'comicpress' ) ); ?>
|
||||
<div id="wp-paginav">
|
||||
|
||||
<div id="paginav">
|
||||
|
||||
<?phP
|
||||
echo '<ul><li class="paginav-extend">' . __( 'Comment Pages', 'comicpress' ) . '</li>' . $pagelinks . '</ul>';
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
|
||||
<div class="commentnav">
|
||||
|
||||
<div class="commentnav-right">
|
||||
|
||||
<?php
|
||||
next_comments_link( __( 'Next Comments ↑', 'comicpress' ) );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="commentnav-left">
|
||||
|
||||
<?php
|
||||
previous_comments_link( __( '↓ Previous Comments', 'comicpress' ) );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -89,10 +145,14 @@ if ( ! empty( $comments_by_type['comment'] ) ) {
|
||||
|
||||
if ( comments_open() ) {
|
||||
?>
|
||||
|
||||
<div class="comment-wrapper-respond">
|
||||
|
||||
<?php
|
||||
$fields = array(
|
||||
'author' => '<p class="comment-form-author">' . '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" />' . ' <label for="author"><small>' . __( '*NAME', 'comicpress' ) . '</small></label></p>', 'email' => '<p class="comment-form-email">' . '<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" /> <label for="email">' . __( '*EMAIL', 'comicpress' ) . '<small> — <a href="https://gravatar.com" target="_blank" rel="noopener noreferrer">' . __( 'Get a Gravatar', 'comicpress' ) . '</a></small></label></p>', 'url' => '<p class="comment-form-url">' . '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /> <label for="url">' . __( 'Website URL', 'comicpress' ) . '</label></p>'
|
||||
'author' => '<p class="comment-form-author">' . '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" />' . ' <label for="author"><small>' . __( '*NAME', 'comicpress' ) . '</small></label></p>',
|
||||
'email' => '<p class="comment-form-email">' . '<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" /> <label for="email">' . __( '*EMAIL', 'comicpress' ) . '<small> — <a href="https://gravatar.com" target="_blank" rel="noopener noreferrer">' . __( 'Get a Gravatar', 'comicpress' ) . '</a></small></label></p>',
|
||||
'url' => '<p class="comment-form-url">' . '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /> <label for="url">' . __( 'Website URL', 'comicpress' ) . '</label></p>'
|
||||
);
|
||||
$args = array(
|
||||
'fields' => apply_filters( 'comment_form_default_fields', $fields ),
|
||||
@@ -105,10 +165,19 @@ if ( comments_open() ) {
|
||||
);
|
||||
comment_form( $args );
|
||||
?>
|
||||
|
||||
</div>
|
||||
<?php } elseif ( ! comments_open() && ( get_comments_number() > 0 ) ) { ?>
|
||||
|
||||
<?php
|
||||
} elseif ( ! comments_open() && ( get_comments_number() > 0 ) ) {
|
||||
?>
|
||||
|
||||
<p class="closed-comments">
|
||||
<?php _e( 'Comments are closed.', 'comicpress' ); ?>
|
||||
</p>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,23 @@
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<div class="post-content">
|
||||
|
||||
<div class="entry">
|
||||
<?php comicpress_display_the_content(); ?>
|
||||
|
||||
<?php
|
||||
comicpress_display_the_content();
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
<?php edit_post_link(__( 'Edit this post.', 'comicpress' ), '', ''); ?>
|
||||
|
||||
<?php
|
||||
edit_post_link( __( 'Edit this post.', 'comicpress' ), '', '' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</article>
|
||||
|
||||
@@ -1,40 +1,83 @@
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<div class="post-content">
|
||||
<?php if (!comicpress_is_bbpress()) comicpress_display_author_gravatar(); ?>
|
||||
|
||||
<?php
|
||||
if ( ! comicpress_is_bbpress() ) comicpress_display_author_gravatar();
|
||||
?>
|
||||
|
||||
<div class="post-info">
|
||||
|
||||
<?php
|
||||
comicpress_display_post_title();
|
||||
if (!comicpress_is_bbpress()) comicpress_display_post_calendar();
|
||||
if (is_sticky()) { ?><div class="sticky-image">Featured Post</div><?php }
|
||||
if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post();
|
||||
comicpress_display_post_title();
|
||||
if ( ! comicpress_is_bbpress() ) comicpress_display_post_calendar();
|
||||
if ( is_sticky() ) {
|
||||
?>
|
||||
|
||||
<div class="sticky-image">
|
||||
Featured Post
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ( function_exists( 'comicpress_show_mood_in_post' ) ) comicpress_show_mood_in_post();
|
||||
?>
|
||||
|
||||
<div class="post-text">
|
||||
|
||||
<?php
|
||||
comicpress_display_post_author();
|
||||
comicpress_display_post_date(); comicpress_display_post_time(); comicpress_display_modified_date_time();
|
||||
comicpress_display_post_date();
|
||||
comicpress_display_post_time();
|
||||
comicpress_display_modified_date_time();
|
||||
comicpress_display_post_category();
|
||||
if (function_exists('the_ratings') && $post->post_type == 'post') { the_ratings(); }
|
||||
do_action('comicpress-post-info');
|
||||
do_action('comic-post-info');
|
||||
wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ', 'after' => '</div>', 'next_or_number' => 'number'));
|
||||
if ( function_exists( 'the_ratings' ) && $post->post_type == 'post' ) {
|
||||
the_ratings();
|
||||
}
|
||||
do_action( 'comicpress-post-info' );
|
||||
do_action( 'comic-post-info' );
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ',
|
||||
'after' => '</div>',
|
||||
'next_or_number' => 'number',
|
||||
) );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="entry">
|
||||
<?php comicpress_display_the_content(); ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="post-extras">
|
||||
|
||||
<?php
|
||||
comicpress_display_post_tags();
|
||||
do_action('comicpress-post-extras');
|
||||
do_action('comic-post-extras');
|
||||
comicpress_display_comment_link();
|
||||
comicpress_display_the_content();
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
<?php edit_post_link(__( 'Edit this comic.', 'comicpress' ), '', ''); ?>
|
||||
|
||||
<div class="post-extras">
|
||||
|
||||
<?php
|
||||
comicpress_display_post_tags();
|
||||
do_action( 'comicpress-post-extras' );
|
||||
do_action( 'comic-post-extras' );
|
||||
comicpress_display_comment_link();
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
edit_post_link( __( 'Edit this comic.', 'comicpress' ), '', '' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
||||
@@ -1,15 +1,40 @@
|
||||
<?php
|
||||
if (!is_home() && !is_archive() && !is_search()) { comicpress_display_post_thumbnail('large'); ?><div class="clear"></div><?php }
|
||||
if ( ! is_home() && ! is_archive() && ! is_search() ) {
|
||||
comicpress_display_post_thumbnail( 'large' );
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<div class="post-content">
|
||||
<?php if (is_home() || is_archive() || is_search()) comicpress_display_post_thumbnail('thumbnail'); ?>
|
||||
|
||||
<?php
|
||||
if ( is_home() || is_archive() || is_search()) comicpress_display_post_thumbnail( 'thumbnail' );
|
||||
?>
|
||||
|
||||
<div class="entry">
|
||||
<?php the_content(); ?>
|
||||
|
||||
<?php
|
||||
the_content();
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
<?php edit_post_link(__( 'Edit this post.', 'comicpress' ), '', ''); ?>
|
||||
|
||||
<?php
|
||||
edit_post_link( __( 'Edit this post.', 'comicpress' ), '', '' );
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</article>
|
||||
|
||||
@@ -1,22 +1,49 @@
|
||||
<?php comicpress_display_post_thumbnail(); ?>
|
||||
<?php
|
||||
comicpress_display_post_thumbnail();
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<div class="post-content">
|
||||
|
||||
<div class="post-info">
|
||||
|
||||
<?php
|
||||
comicpress_display_post_title();
|
||||
comicpress_display_post_title();
|
||||
?>
|
||||
|
||||
<div class="post-text">
|
||||
<?php
|
||||
wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ', 'after' => '</div>', 'next_or_number' => 'number'));
|
||||
?>
|
||||
|
||||
<?php
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ',
|
||||
'after' => '</div>',
|
||||
'next_or_number' => 'number',
|
||||
) );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="entry">
|
||||
<?php comicpress_display_the_content(); ?>
|
||||
|
||||
<?php
|
||||
comicpress_display_the_content();
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
<?php edit_post_link(__( 'Edit this page.', 'comicpress' ), '', ''); ?>
|
||||
|
||||
<?php
|
||||
edit_post_link( __( 'Edit this page.', 'comicpress' ), '', '' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
||||
91
content.php
91
content.php
@@ -1,19 +1,45 @@
|
||||
<?php
|
||||
if (!comicpress_is_bbpress()) comicpress_display_blog_navigation();
|
||||
if (!is_home() && !is_archive() && !is_search()) { comicpress_display_post_thumbnail('large'); ?><div class="clear"></div><?php }
|
||||
if ( ! comicpress_is_bbpress() ) comicpress_display_blog_navigation();
|
||||
if ( ! is_home() && ! is_archive() && ! is_search() ) {
|
||||
comicpress_display_post_thumbnail( 'large' );
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<div class="post-content">
|
||||
<?php if (is_home() || is_archive() || is_search()) comicpress_display_post_thumbnail('thumbnail'); ?>
|
||||
<?php if (!comicpress_is_bbpress()) comicpress_display_author_gravatar(); ?>
|
||||
|
||||
<?php
|
||||
if ( is_home() || is_archive() || is_search()) comicpress_display_post_thumbnail( 'thumbnail' );
|
||||
?>
|
||||
<?php
|
||||
if ( ! comicpress_is_bbpress() ) comicpress_display_author_gravatar();
|
||||
?>
|
||||
|
||||
<div class="post-info">
|
||||
|
||||
<?php
|
||||
comicpress_display_post_title();
|
||||
if (!comicpress_is_bbpress()) comicpress_display_post_calendar();
|
||||
if (is_sticky()) { ?><div class="sticky-image">Featured Post</div><?php }
|
||||
if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post();
|
||||
comicpress_display_post_title();
|
||||
if ( ! comicpress_is_bbpress() ) comicpress_display_post_calendar();
|
||||
if ( is_sticky() ) {
|
||||
?>
|
||||
|
||||
<div class="sticky-image">
|
||||
Featured Post
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ( function_exists( 'comicpress_show_mood_in_post' ) ) comicpress_show_mood_in_post();
|
||||
?>
|
||||
|
||||
<div class="post-text">
|
||||
|
||||
<?php
|
||||
comicpress_display_post_author();
|
||||
comicpress_display_post_date();
|
||||
@@ -21,28 +47,55 @@ if (!is_home() && !is_archive() && !is_search()) { comicpress_display_post_thumb
|
||||
comicpress_display_modified_date_time();
|
||||
comicpress_display_post_category();
|
||||
/* Integrate the WP-Plugin: WP-PostRatings */
|
||||
if (function_exists('the_ratings') && $post->post_type == 'post') { the_ratings(); }
|
||||
do_action('comicpress-post-info');
|
||||
wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ', 'after' => '</div>', 'next_or_number' => 'number'));
|
||||
if ( function_exists( 'the_ratings' ) && $post->post_type == 'post' ) {
|
||||
the_ratings();
|
||||
}
|
||||
do_action( 'comicpress-post-info' );
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ',
|
||||
'after' => '</div>',
|
||||
'next_or_number' => 'number',
|
||||
) );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="entry">
|
||||
<?php comicpress_display_the_content(); ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="post-extras">
|
||||
|
||||
<?php
|
||||
comicpress_display_post_tags();
|
||||
do_action('comicpress-post-extras');
|
||||
comicpress_display_comment_link();
|
||||
comicpress_display_the_content();
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
<?php edit_post_link(__( 'Edit this post.', 'comicpress' ), '', ''); ?>
|
||||
|
||||
<div class="post-extras">
|
||||
|
||||
<?php
|
||||
comicpress_display_post_tags();
|
||||
do_action( 'comicpress-post-extras' );
|
||||
comicpress_display_comment_link();
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
edit_post_link( __( 'Edit this post.', 'comicpress' ), '', '' );
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</article>
|
||||
|
||||
221
footer.php
221
footer.php
@@ -1,48 +1,175 @@
|
||||
<?php get_template_part('layout', 'foot'); ?>
|
||||
<?php if (!get_theme_mod('comicpress-customize-detach-footer', false)) { ?>
|
||||
<footer id="footer">
|
||||
<?php do_action('comicpress-footer'); ?>
|
||||
<div id="footer-sidebar-wrapper">
|
||||
<?php
|
||||
comicpress_get_sidebar('footer-left');
|
||||
comicpress_get_sidebar('footer');
|
||||
comicpress_get_sidebar('footer-right');
|
||||
?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div id="footer-menubar-wrapper">
|
||||
<?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'depth' => 1, 'fallback_cb' => false, 'container_class' => 'footmenu', 'theme_location' => 'Footer' ) ); ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<?php if (!comicpress_themeinfo('disable_footer_text')) comicpress_copyright_text(); ?>
|
||||
<?php if (comicpress_themeinfo('enable_debug_footer_code')) { ?>
|
||||
<p><?php echo get_num_queries() ?> queries. <?php if (function_exists('memory_get_usage')) { $unit=array('b','kb','mb','gb','tb','pb'); echo @round(memory_get_usage(true)/pow(1024,($i=floor(log(memory_get_usage(true),1024)))),2).' '.$unit[$i]; ?> Memory usage. <?php } timer_stop(1) ?> seconds.</p>
|
||||
<?php } ?>
|
||||
</footer>
|
||||
<?php } ?>
|
||||
</div> <!-- // #page -->
|
||||
</div> <!-- / #page-wrap -->
|
||||
<?php if (get_theme_mod('comicpress-customize-detach-footer', false)) { ?>
|
||||
<footer id="footer">
|
||||
<?php do_action('comicpress-footer'); ?>
|
||||
<div id="footer-sidebar-wrapper">
|
||||
<?php
|
||||
comicpress_get_sidebar('footer-left');
|
||||
comicpress_get_sidebar('footer');
|
||||
comicpress_get_sidebar('footer-right');
|
||||
<?php
|
||||
get_template_part( 'layout', 'foot' );
|
||||
?>
|
||||
<?php
|
||||
if ( ! get_theme_mod( 'comicpress-customize-detach-footer', false ) ) {
|
||||
?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div id="footer-menubar-wrapper">
|
||||
<?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'depth' => 1, 'fallback_cb' => false, 'container_class' => 'footmenu', 'theme_location' => 'Footer' ) ); ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<?php if (!comicpress_themeinfo('disable_footer_text')) comicpress_copyright_text(); ?>
|
||||
<?php if (comicpress_themeinfo('enable_debug_footer_code')) { ?>
|
||||
<p><?php echo get_num_queries() ?> queries. <?php if (function_exists('memory_get_usage')) { $unit=array('b','kb','mb','gb','tb','pb'); echo @round(memory_get_usage(true)/pow(1024,($i=floor(log(memory_get_usage(true),1024)))),2).' '.$unit[$i]; ?> Memory usage. <?php } timer_stop(1) ?> seconds.</p>
|
||||
<?php } ?>
|
||||
</footer>
|
||||
<?php } ?>
|
||||
<?php wp_footer(); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<footer id="footer">
|
||||
|
||||
<?php
|
||||
do_action( 'comicpress-footer' );
|
||||
?>
|
||||
|
||||
<div id="footer-sidebar-wrapper">
|
||||
|
||||
<?php
|
||||
comicpress_get_sidebar( 'footer-left' );
|
||||
comicpress_get_sidebar( 'footer' );
|
||||
comicpress_get_sidebar( 'footer-right' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<div id="footer-menubar-wrapper">
|
||||
|
||||
<?php
|
||||
wp_nav_menu( array(
|
||||
'sort_column' => 'menu_order',
|
||||
'depth' => 1,
|
||||
'fallback_cb' => false,
|
||||
'container_class' => 'footmenu',
|
||||
'theme_location' => 'Footer',
|
||||
) );
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ( ! comicpress_themeinfo( 'disable_footer_text' ) ) comicpress_copyright_text();
|
||||
?>
|
||||
<?php
|
||||
if ( comicpress_themeinfo( 'enable_debug_footer_code' ) ) {
|
||||
?>
|
||||
|
||||
<p>
|
||||
|
||||
<?php
|
||||
echo get_num_queries()
|
||||
?>
|
||||
queries.
|
||||
<?php
|
||||
if ( function_exists( 'memory_get_usage' ) ) {
|
||||
$unit = array(
|
||||
'b',
|
||||
'kb',
|
||||
'mb',
|
||||
'gb',
|
||||
'tb',
|
||||
'pb',
|
||||
);
|
||||
echo @round( memory_get_usage( true ) / pow( 1024, ( $i = floor( log( memory_get_usage( true ), 1024 ) ) ) ), 2 ) . ' ' . $unit[$i];
|
||||
?>
|
||||
Memory usage.
|
||||
<?php
|
||||
}
|
||||
timer_stop( 1 )
|
||||
?>
|
||||
seconds.
|
||||
|
||||
</p>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</footer>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div> <!-- // #page -->
|
||||
|
||||
</div> <!-- / #page-wrap -->
|
||||
|
||||
<?php
|
||||
if ( get_theme_mod( 'comicpress-customize-detach-footer', false ) ) {
|
||||
?>
|
||||
|
||||
<footer id="footer">
|
||||
|
||||
<?php
|
||||
do_action( 'comicpress-footer' );
|
||||
?>
|
||||
|
||||
<div id="footer-sidebar-wrapper">
|
||||
|
||||
<?php
|
||||
comicpress_get_sidebar( 'footer-left' );
|
||||
comicpress_get_sidebar( 'footer' );
|
||||
comicpress_get_sidebar( 'footer-right' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<div id="footer-menubar-wrapper">
|
||||
|
||||
<?php
|
||||
wp_nav_menu( array(
|
||||
'sort_column' => 'menu_order',
|
||||
'depth' => 1,
|
||||
'fallback_cb' => false,
|
||||
'container_class' => 'footmenu',
|
||||
'theme_location' => 'Footer',
|
||||
) );
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ( ! comicpress_themeinfo( 'disable_footer_text' ) ) comicpress_copyright_text();
|
||||
?>
|
||||
<?php
|
||||
if ( comicpress_themeinfo( 'enable_debug_footer_code' ) ) {
|
||||
?>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
echo get_num_queries()
|
||||
?>
|
||||
queries.
|
||||
<?php
|
||||
if ( function_exists( 'memory_get_usage') ) {
|
||||
$unit = array(
|
||||
'b',
|
||||
'kb',
|
||||
'mb',
|
||||
'gb',
|
||||
'tb',
|
||||
'pb',
|
||||
);
|
||||
echo @round( memory_get_usage( true ) / pow( 1024, ( $i = floor( log( memory_get_usage( true ), 1024 ) ) ) ), 2 ) . ' ' . $unit[$i];
|
||||
?>
|
||||
Memory usage.
|
||||
<?php
|
||||
}
|
||||
timer_stop( 1 )
|
||||
?>
|
||||
seconds.
|
||||
</p>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</footer>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
wp_footer();
|
||||
?>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<?php
|
||||
|
||||
if ( ! function_exists( 'comicpress_random_default_avatar') ) {
|
||||
|
||||
function comicpress_random_default_avatar( $id_or_email = '' ) {
|
||||
|
||||
$current_avatar_directory = comicpress_themeinfo( 'avatar_directory' );
|
||||
|
||||
if ( ! empty( $current_avatar_directory ) && ( $current_avatar_directory !== 'none' ) ) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
/*
|
||||
/**
|
||||
* WordPress Breadcrumbs
|
||||
* author: Dimox
|
||||
* version: 2015.09.14
|
||||
* license: MIT
|
||||
*/
|
||||
*/
|
||||
function comicpress_breadcrumbs() {
|
||||
|
||||
/* === OPTIONS === */
|
||||
@@ -37,165 +37,164 @@ function comicpress_breadcrumbs() {
|
||||
$after = '</span>'; // tag after the current crumb
|
||||
/* === END OF OPTIONS === */
|
||||
|
||||
if (!is_home() && !is_front_page() || is_paged()) {
|
||||
if ( ! is_home() && ! is_front_page() || is_paged() ) {
|
||||
|
||||
echo '<div id="breadcrumb-wrapper">';
|
||||
echo '<div class="breadcrumbs">';
|
||||
global $post;
|
||||
$home_link = home_url('/');
|
||||
$link_before = '<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">';
|
||||
$link_after = '</span>';
|
||||
$link_attr = ' itemprop="url"';
|
||||
$link_in_before = '<span itemprop="title">';
|
||||
$link_in_after = '</span>';
|
||||
$link = $link_before . '<a href="%1$s"' . $link_attr . '>' . $link_in_before . '%2$s' . $link_in_after . '</a>' . $link_after;
|
||||
$frontpage_id = get_option('page_on_front');
|
||||
$parent_id = (!empty($post)) ? $post->post_parent : false;
|
||||
$sep = ' ' . $sep_before . $sep . $sep_after . ' ';
|
||||
echo '<div id="breadcrumb-wrapper">';
|
||||
echo '<div class="breadcrumbs">';
|
||||
global $post;
|
||||
$home_link = home_url( '/' );
|
||||
$link_before = '<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">';
|
||||
$link_after = '</span>';
|
||||
$link_attr = ' itemprop="url"';
|
||||
$link_in_before = '<span itemprop="title">';
|
||||
$link_in_after = '</span>';
|
||||
$link = $link_before . '<a href="%1$s"' . $link_attr . '>' . $link_in_before . '%2$s' . $link_in_after . '</a>' . $link_after;
|
||||
$frontpage_id = get_option( 'page_on_front' );
|
||||
$parent_id = ( ! empty( $post ) ) ? $post->post_parent : false;
|
||||
$sep = ' ' . $sep_before . $sep . $sep_after . ' ';
|
||||
|
||||
if (is_home() || is_front_page()) {
|
||||
if ( is_home() || is_front_page() ) {
|
||||
|
||||
if ($show_on_home) echo $wrap_before . '<a href="' . $home_link . '">' . $text['home'] . '</a>' . $wrap_after;
|
||||
if ( $show_on_home ) echo $wrap_before . '<a href="' . $home_link . '">' . $text['home'] . '</a>' . $wrap_after;
|
||||
|
||||
} else {
|
||||
} else {
|
||||
|
||||
echo $wrap_before;
|
||||
if ($show_home_link) echo sprintf($link, $home_link, $text['home']);
|
||||
echo $wrap_before;
|
||||
if ( $show_home_link ) echo sprintf( $link, $home_link, $text['home'] );
|
||||
|
||||
if ( is_category() ) {
|
||||
$cat = get_category(get_query_var('cat'), false);
|
||||
if ($cat->parent != 0) {
|
||||
$cats = get_category_parents($cat->parent, TRUE, $sep);
|
||||
$cats = preg_replace("#^(.+)$sep$#", "$1", $cats);
|
||||
$cats = preg_replace('#<a([^>]+)>([^<]+)<\/a>#', $link_before . '<a$1' . $link_attr .'>' . $link_in_before . '$2' . $link_in_after .'</a>' . $link_after, $cats);
|
||||
if ($show_home_link) echo $sep;
|
||||
echo $cats;
|
||||
}
|
||||
if ( get_query_var('paged') ) {
|
||||
$cat = $cat->cat_ID;
|
||||
echo $sep . sprintf($link, get_category_link($cat), get_cat_name($cat)) . $sep . $before . sprintf($text['page'], get_query_var('paged')) . $after;
|
||||
} else {
|
||||
if ($show_current) echo $sep . $before . sprintf($text['category'], single_cat_title('', false)) . $after;
|
||||
}
|
||||
|
||||
} elseif ( is_search() ) {
|
||||
if (have_posts()) {
|
||||
if ($show_home_link && $show_current) echo $sep;
|
||||
if ($show_current) echo $before . sprintf($text['search'], get_search_query()) . $after;
|
||||
} else {
|
||||
if ($show_home_link) echo $sep;
|
||||
echo $before . sprintf($text['search'], get_search_query()) . $after;
|
||||
}
|
||||
|
||||
} elseif ( is_day() ) {
|
||||
if ($show_home_link) echo $sep;
|
||||
echo sprintf($link, get_year_link(get_the_time('Y')), get_the_time('Y')) . $sep;
|
||||
echo sprintf($link, get_month_link(get_the_time('Y'), get_the_time('m')), get_the_time('F'));
|
||||
if ($show_current) echo $sep . $before . get_the_time('d') . $after;
|
||||
|
||||
} elseif ( is_month() ) {
|
||||
if ($show_home_link) echo $sep;
|
||||
echo sprintf($link, get_year_link(get_the_time('Y')), get_the_time('Y'));
|
||||
if ($show_current) echo $sep . $before . get_the_time('F') . $after;
|
||||
|
||||
} elseif ( is_year() ) {
|
||||
if ($show_home_link && $show_current) echo $sep;
|
||||
if ($show_current) echo $before . get_the_time('Y') . $after;
|
||||
|
||||
} elseif ( is_single() && !is_attachment() ) {
|
||||
if ($show_home_link) echo $sep;
|
||||
if ( get_post_type() != 'post' ) {
|
||||
$post_type = get_post_type_object(get_post_type());
|
||||
$slug = $post_type->rewrite;
|
||||
printf($link, $home_link . '/' . $slug['slug'] . '/', $post_type->labels->singular_name);
|
||||
if ($show_current) echo $sep . $before . get_the_title() . $after;
|
||||
} else {
|
||||
$cat = get_the_category(); $cat = $cat[0];
|
||||
$cats = get_category_parents($cat, TRUE, $sep);
|
||||
if (!$show_current || get_query_var('cpage')) $cats = preg_replace("#^(.+)$sep$#", "$1", $cats);
|
||||
$cats = preg_replace('#<a([^>]+)>([^<]+)<\/a>#', $link_before . '<a$1' . $link_attr .'>' . $link_in_before . '$2' . $link_in_after .'</a>' . $link_after, $cats);
|
||||
echo $cats;
|
||||
if ( get_query_var('cpage') ) {
|
||||
echo $sep . sprintf($link, get_permalink(), get_the_title()) . $sep . $before . sprintf($text['cpage'], get_query_var('cpage')) . $after;
|
||||
if ( is_category() ) {
|
||||
$cat = get_category( get_query_var( 'cat' ), false );
|
||||
if ( $cat->parent != 0 ) {
|
||||
$cats = get_category_parents( $cat->parent, TRUE, $sep );
|
||||
$cats = preg_replace( "#^(.+)$sep$#", "$1", $cats );
|
||||
$cats = preg_replace( '#<a([^>]+)>([^<]+)<\/a>#', $link_before . '<a$1' . $link_attr .'>' . $link_in_before . '$2' . $link_in_after .'</a>' . $link_after, $cats );
|
||||
if ( $show_home_link ) echo $sep;
|
||||
echo $cats;
|
||||
}
|
||||
if ( get_query_var( 'paged' ) ) {
|
||||
$cat = $cat->cat_ID;
|
||||
echo $sep . sprintf( $link, get_category_link( $cat ), get_cat_name( $cat ) ) . $sep . $before . sprintf( $text['page'], get_query_var( 'paged' ) ) . $after;
|
||||
} else {
|
||||
if ($show_current) echo $before . get_the_title() . $after;
|
||||
if ( $show_current ) echo $sep . $before . sprintf( $text['category'], single_cat_title( '', false ) ) . $after;
|
||||
}
|
||||
}
|
||||
|
||||
// custom post type
|
||||
} elseif ( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() ) {
|
||||
$post_type = get_post_type_object(get_post_type());
|
||||
if ( get_query_var('paged') ) {
|
||||
echo $sep . sprintf($link, get_post_type_archive_link($post_type->name), $post_type->label) . $sep . $before . sprintf($text['page'], get_query_var('paged')) . $after;
|
||||
} else {
|
||||
if ($show_current) echo $sep . $before . $post_type->label . $after;
|
||||
}
|
||||
} elseif ( is_search() ) {
|
||||
if ( have_posts() ) {
|
||||
if ( $show_home_link && $show_current ) echo $sep;
|
||||
if ( $show_current ) echo $before . sprintf( $text['search'], get_search_query() ) . $after;
|
||||
} else {
|
||||
if ( $show_home_link ) echo $sep;
|
||||
echo $before . sprintf( $text['search'], get_search_query() ) . $after;
|
||||
}
|
||||
|
||||
} elseif ( is_attachment() ) {
|
||||
if ($show_home_link) echo $sep;
|
||||
$parent = get_post($parent_id);
|
||||
$cat = get_the_category($parent->ID); $cat = $cat[0];
|
||||
if ($cat) {
|
||||
$cats = get_category_parents($cat, TRUE, $sep);
|
||||
$cats = preg_replace('#<a([^>]+)>([^<]+)<\/a>#', $link_before . '<a$1' . $link_attr .'>' . $link_in_before . '$2' . $link_in_after .'</a>' . $link_after, $cats);
|
||||
echo $cats;
|
||||
}
|
||||
printf($link, get_permalink($parent), $parent->post_title);
|
||||
if ($show_current) echo $sep . $before . get_the_title() . $after;
|
||||
} elseif ( is_day() ) {
|
||||
if ( $show_home_link ) echo $sep;
|
||||
echo sprintf( $link, get_year_link( get_the_time( 'Y' ) ), get_the_time( 'Y' ) ) . $sep;
|
||||
echo sprintf( $link, get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ), get_the_time( 'F' ) );
|
||||
if ( $show_current ) echo $sep . $before . get_the_time(' d' ) . $after;
|
||||
|
||||
} elseif ( is_page() && !$parent_id ) {
|
||||
if ($show_current) echo $sep . $before . get_the_title() . $after;
|
||||
} elseif ( is_month() ) {
|
||||
if ( $show_home_link ) echo $sep;
|
||||
echo sprintf( $link, get_year_link( get_the_time( 'Y' ) ), get_the_time( 'Y' ) );
|
||||
if ( $show_current ) echo $sep . $before . get_the_time( 'F' ) . $after;
|
||||
|
||||
} elseif ( is_page() && $parent_id ) {
|
||||
if ($show_home_link) echo $sep;
|
||||
if ($parent_id != $frontpage_id) {
|
||||
$breadcrumbs = array();
|
||||
while ($parent_id) {
|
||||
$page = get_page($parent_id);
|
||||
if ($parent_id != $frontpage_id) {
|
||||
$breadcrumbs[] = sprintf($link, get_permalink($page->ID), get_the_title($page->ID));
|
||||
} elseif ( is_year() ) {
|
||||
if ( $show_home_link && $show_current ) echo $sep;
|
||||
if ( $show_current ) echo $before . get_the_time( 'Y' ) . $after;
|
||||
|
||||
} elseif ( is_single() && ! is_attachment() ) {
|
||||
if ( $show_home_link ) echo $sep;
|
||||
if ( get_post_type() != 'post' ) {
|
||||
$post_type = get_post_type_object( get_post_type() );
|
||||
$slug = $post_type->rewrite;
|
||||
printf( $link, $home_link . '/' . $slug['slug'] . '/', $post_type->labels->singular_name );
|
||||
if ($show_current) echo $sep . $before . get_the_title() . $after;
|
||||
} else {
|
||||
$cat = get_the_category(); $cat = $cat[0];
|
||||
$cats = get_category_parents( $cat, TRUE, $sep );
|
||||
if ( ! $show_current || get_query_var( 'cpage' ) ) $cats = preg_replace( "#^(.+)$sep$#", "$1", $cats );
|
||||
$cats = preg_replace( '#<a([^>]+)>([^<]+)<\/a>#', $link_before . '<a$1' . $link_attr .'>' . $link_in_before . '$2' . $link_in_after .'</a>' . $link_after, $cats );
|
||||
echo $cats;
|
||||
if ( get_query_var( 'cpage' ) ) {
|
||||
echo $sep . sprintf( $link, get_permalink(), get_the_title()) . $sep . $before . sprintf( $text['cpage'], get_query_var( 'cpage' ) ) . $after;
|
||||
} else {
|
||||
if ($show_current) echo $before . get_the_title() . $after;
|
||||
}
|
||||
$parent_id = $page->post_parent;
|
||||
}
|
||||
|
||||
// Custom post type.
|
||||
} elseif ( ! is_single() && ! is_page() && get_post_type() != 'post' && ! is_404() ) {
|
||||
$post_type = get_post_type_object( get_post_type() );
|
||||
if ( get_query_var( 'paged' ) ) {
|
||||
echo $sep . sprintf( $link, get_post_type_archive_link( $post_type->name), $post_type->label ) . $sep . $before . sprintf( $text['page'], get_query_var( 'paged' ) ) . $after;
|
||||
} else {
|
||||
if ( $show_current ) echo $sep . $before . $post_type->label . $after;
|
||||
}
|
||||
|
||||
} elseif ( is_attachment() ) {
|
||||
if ( $show_home_link ) echo $sep;
|
||||
$parent = get_post( $parent_id );
|
||||
$cat = get_the_category( $parent->ID ); $cat = $cat[0];
|
||||
if ( $cat ) {
|
||||
$cats = get_category_parents( $cat, TRUE, $sep );
|
||||
$cats = preg_replace( '#<a([^>]+)>([^<]+)<\/a>#', $link_before . '<a$1' . $link_attr .'>' . $link_in_before . '$2' . $link_in_after .'</a>' . $link_after, $cats );
|
||||
echo $cats;
|
||||
}
|
||||
printf( $link, get_permalink( $parent ), $parent->post_title );
|
||||
if ( $show_current ) echo $sep . $before . get_the_title() . $after;
|
||||
|
||||
} elseif ( is_page() && ! $parent_id ) {
|
||||
if ( $show_current ) echo $sep . $before . get_the_title() . $after;
|
||||
|
||||
} elseif ( is_page() && $parent_id ) {
|
||||
if ( $show_home_link ) echo $sep;
|
||||
if ( $parent_id != $frontpage_id ) {
|
||||
$breadcrumbs = array();
|
||||
while ( $parent_id ) {
|
||||
$page = get_page( $parent_id );
|
||||
if ($parent_id != $frontpage_id ) {
|
||||
$breadcrumbs[] = sprintf( $link, get_permalink( $page->ID ), get_the_title( $page->ID ) );
|
||||
}
|
||||
$parent_id = $page->post_parent;
|
||||
}
|
||||
$breadcrumbs = array_reverse($breadcrumbs);
|
||||
for ($i = 0; $i < count($breadcrumbs); $i++) {
|
||||
for ($i = 0; $i < count( $breadcrumbs ); $i++) {
|
||||
echo $breadcrumbs[$i];
|
||||
if ($i != count($breadcrumbs)-1) echo $sep;
|
||||
if ($i != count( $breadcrumbs )-1) echo $sep;
|
||||
}
|
||||
}
|
||||
if ( $show_current ) echo $sep . $before . get_the_title() . $after;
|
||||
|
||||
} elseif ( is_tag() ) {
|
||||
if ( get_query_var( 'paged' ) ) {
|
||||
$tag_id = get_queried_object_id();
|
||||
$tag = get_tag( $tag_id );
|
||||
echo $sep . sprintf( $link, get_tag_link( $tag_id), $tag->name) . $sep . $before . sprintf( $text['page'], get_query_var( 'paged' ) ) . $after;
|
||||
} else {
|
||||
if ( $show_current ) echo $sep . $before . sprintf( $text['tag'], single_tag_title('', false ) ) . $after;
|
||||
}
|
||||
|
||||
} elseif ( is_author() ) {
|
||||
global $author;
|
||||
$author = get_userdata( $author );
|
||||
if ( get_query_var('paged') ) {
|
||||
if ( $show_home_link ) echo $sep;
|
||||
echo sprintf( $link, get_author_posts_url( $author->ID ), $author->display_name) . $sep . $before . sprintf( $text['page'], get_query_var( 'paged' ) ) . $after;
|
||||
} else {
|
||||
if ( $show_home_link && $show_current ) echo $sep;
|
||||
if ( $show_current ) echo $before . sprintf( $text['author'], $author->display_name ) . $after;
|
||||
}
|
||||
|
||||
} elseif ( is_404() ) {
|
||||
if ( $show_home_link && $show_current ) echo $sep;
|
||||
if ( $show_current ) echo $before . $text['404'] . $after;
|
||||
|
||||
} elseif ( has_post_format() && !is_singular() ) {
|
||||
if ( $show_home_link ) echo $sep;
|
||||
echo get_post_format_string( get_post_format() );
|
||||
}
|
||||
if ($show_current) echo $sep . $before . get_the_title() . $after;
|
||||
|
||||
} elseif ( is_tag() ) {
|
||||
if ( get_query_var('paged') ) {
|
||||
$tag_id = get_queried_object_id();
|
||||
$tag = get_tag($tag_id);
|
||||
echo $sep . sprintf($link, get_tag_link($tag_id), $tag->name) . $sep . $before . sprintf($text['page'], get_query_var('paged')) . $after;
|
||||
} else {
|
||||
if ($show_current) echo $sep . $before . sprintf($text['tag'], single_tag_title('', false)) . $after;
|
||||
}
|
||||
|
||||
} elseif ( is_author() ) {
|
||||
global $author;
|
||||
$author = get_userdata($author);
|
||||
if ( get_query_var('paged') ) {
|
||||
if ($show_home_link) echo $sep;
|
||||
echo sprintf($link, get_author_posts_url($author->ID), $author->display_name) . $sep . $before . sprintf($text['page'], get_query_var('paged')) . $after;
|
||||
} else {
|
||||
if ($show_home_link && $show_current) echo $sep;
|
||||
if ($show_current) echo $before . sprintf($text['author'], $author->display_name) . $after;
|
||||
}
|
||||
|
||||
} elseif ( is_404() ) {
|
||||
if ($show_home_link && $show_current) echo $sep;
|
||||
if ($show_current) echo $before . $text['404'] . $after;
|
||||
|
||||
} elseif ( has_post_format() && !is_singular() ) {
|
||||
if ($show_home_link) echo $sep;
|
||||
echo get_post_format_string( get_post_format() );
|
||||
echo $wrap_after;
|
||||
}
|
||||
|
||||
echo $wrap_after;
|
||||
echo '</div></div>';
|
||||
}
|
||||
echo '</div></div>';
|
||||
}
|
||||
} // end of dimox_breadcrumbs()
|
||||
} // end of dimox_breadcrumbs()
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
add_filter( 'body_class', 'comicpress_body_class' );
|
||||
|
||||
function comicpress_body_class( $classes = array() ) {
|
||||
|
||||
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone, $post, $wp_query, $comicpress_is_signup;
|
||||
|
||||
if ( is_user_logged_in() ) {
|
||||
@@ -88,6 +89,7 @@ function comicpress_body_class( $classes = array() ) {
|
||||
add_filter( 'post_class', 'comicpress_post_class' );
|
||||
|
||||
function comicpress_post_class( $classes = '' ) {
|
||||
|
||||
global $post;
|
||||
static $post_alt;
|
||||
|
||||
@@ -133,6 +135,7 @@ function comicpress_post_class( $classes = '' ) {
|
||||
add_filter( 'comment_class', 'comicpress_comment_class' );
|
||||
|
||||
function comicpress_comment_class( $classes = '' ) {
|
||||
|
||||
global $current_user;
|
||||
|
||||
/* http://microid.org */
|
||||
@@ -146,4 +149,3 @@ function comicpress_comment_class( $classes = '' ) {
|
||||
if ( $current_user->user_email == $email ) $classes[] = 'ucomment';
|
||||
return $classes;
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* @filter
|
||||
*/
|
||||
function comicpress_avatar() {
|
||||
|
||||
global $comment;
|
||||
|
||||
$url = get_comment_author_url();
|
||||
@@ -33,10 +34,10 @@ function comicpress_avatar() {
|
||||
if ( ! empty( $current_avatar_directory ) && ( $current_avatar_directory !== 'none' ) ) {
|
||||
$avatar_str = get_avatar( $id_or_email, 64, comicpress_random_default_avatar( $id_or_email ), esc_html( get_comment_author() ) );
|
||||
} else $avatar_str = get_avatar( $id_or_email, 64 );
|
||||
$return_str = str_replace('photo', 'photo instant nocorner itxtalt', $avatar_str);
|
||||
$return_str = str_replace('alt=', 'title="'.esc_html(get_comment_author()).'" alt=', $return_str);
|
||||
$return_str = str_replace( 'photo', 'photo instant nocorner itxtalt', $avatar_str );
|
||||
$return_str = str_replace( 'alt=', 'title="'.esc_html(get_comment_author()).'" alt=', $return_str );
|
||||
echo $return_str;
|
||||
if( $url == true && $url != 'http://' )
|
||||
if ( $url == true && $url != 'http://' )
|
||||
echo '</a>';
|
||||
echo '</div>';
|
||||
}
|
||||
@@ -52,10 +53,11 @@ function comicpress_avatar() {
|
||||
* @since 0.2.2
|
||||
*/
|
||||
function comicpress_comment_author() {
|
||||
|
||||
global $comment;
|
||||
|
||||
$author = get_comment_author();
|
||||
$url = get_comment_author_url();
|
||||
$url = get_comment_author_url();
|
||||
|
||||
/*
|
||||
* Registered members w/o URL defaults to 'http://'
|
||||
@@ -84,11 +86,11 @@ function comicpress_comment_author() {
|
||||
* Also properly cites trackbacks/pingbacks
|
||||
*/
|
||||
if( $url ) :
|
||||
$output = '<cite title="' . $url . '">';
|
||||
$output = '<cite title="' . $url . '">';
|
||||
$output .= '<a href="' . $url . '" title="' . esc_html( $author, 1 ) . '" class="external nofollow">' . $author . '</a>';
|
||||
$output .= '</cite>';
|
||||
else :
|
||||
$output = '<cite>';
|
||||
$output = '<cite>';
|
||||
$output .= $author;
|
||||
$output .= '</cite>';
|
||||
endif;
|
||||
@@ -104,13 +106,15 @@ function comicpress_comment_author() {
|
||||
* @since 0.2.3
|
||||
*
|
||||
* @param $comment The comment variable
|
||||
* @param $args Array of arguments passed from wp_list_comments
|
||||
* @param $depth What level the particular comment is
|
||||
* @param $args Array of arguments passed from wp_list_comments
|
||||
* @param $depth What level the particular comment is
|
||||
*/
|
||||
function comicpress_comments_callback( $comment, $args, $depth ) {
|
||||
|
||||
$GLOBALS['comment'] = $comment;
|
||||
$GLOBALS['comment_depth'] = $depth;
|
||||
?>
|
||||
|
||||
<li id="comment-<?php comment_ID(); ?>" <?php comment_class(); ?>>
|
||||
|
||||
<?php comicpress_avatar(); // Avatar filter ?>
|
||||
@@ -118,12 +122,15 @@ function comicpress_comments_callback( $comment, $args, $depth ) {
|
||||
<div class="comment-content">
|
||||
|
||||
<div class="comment-author vcard">
|
||||
|
||||
<?php comicpress_comment_author(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comment-meta-data">
|
||||
|
||||
<span class="comment-time" title="<?php comment_date( 'l, F jS Y, g:ia' ); ?>">
|
||||
|
||||
<?php
|
||||
printf(
|
||||
/* translators: 1: Date 2: Time in comments */
|
||||
@@ -132,10 +139,14 @@ function comicpress_comments_callback( $comment, $args, $depth ) {
|
||||
get_comment_time()
|
||||
);
|
||||
?>
|
||||
|
||||
</span>
|
||||
|
||||
<span class="comment-permalink">
|
||||
<span class="separator">|</span> <a href="#comment-<?php echo str_replace( '&', '&', get_comment_ID() ); ?>" title="<?php _e( 'Permalink to comment', 'comicpress' ); ?>"><?php _e( '#', 'comicpress' ); ?></a>
|
||||
<span class="separator">|</span>
|
||||
<a href="#comment-<?php echo str_replace( '&', '&', get_comment_ID() ); ?>" title="<?php _e( 'Permalink to comment', 'comicpress' ); ?>">
|
||||
<?php _e( '#', 'comicpress' ); ?>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<?php
|
||||
@@ -156,9 +167,13 @@ function comicpress_comments_callback( $comment, $args, $depth ) {
|
||||
|
||||
if ( $comment->comment_approved == '0' ) :
|
||||
?>
|
||||
|
||||
<div class="comment-moderated">
|
||||
|
||||
<?php _e( 'Your comment is awaiting moderation.', 'comicpress' ); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
@@ -168,14 +183,19 @@ function comicpress_comments_callback( $comment, $args, $depth ) {
|
||||
<?php
|
||||
if ( get_comment_type() == 'comment' ) {
|
||||
?>
|
||||
|
||||
<div class="comment-text">
|
||||
|
||||
<?php comment_text(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php
|
||||
@@ -190,12 +210,19 @@ function comicpress_comments_callback( $comment, $args, $depth ) {
|
||||
* @since 0.2.3
|
||||
*/
|
||||
function comicpress_comments_end_callback() {
|
||||
|
||||
echo '</li>';
|
||||
}
|
||||
|
||||
function list_pings( $comment, $args, $depth ) {
|
||||
|
||||
$GLOBALS['comment'] = $comment;
|
||||
?>
|
||||
<li id="comment-<?php comment_ID(); ?>"><?php comicpress_comment_author(); ?></li>
|
||||
<li id="comment-<?php comment_ID(); ?>">
|
||||
|
||||
<?php comicpress_comment_author(); ?>
|
||||
|
||||
</li>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<?php
|
||||
|
||||
if ( ! function_exists( 'comicpress_copyright_text' ) ) {
|
||||
|
||||
function comicpress_copyright_text() {
|
||||
|
||||
$output = "<p class=\"copyright-info\">\r\n";
|
||||
$output .= comicpress_copyright_info();
|
||||
$output .= "<span class=\"footer-pipe\">|</span> ";
|
||||
@@ -23,7 +25,9 @@ if ( ! function_exists( 'comicpress_copyright_text' ) ) {
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_hosted_on' ) ) {
|
||||
|
||||
function comicpress_hosted_on() {
|
||||
|
||||
if ( is_multisite() ) {
|
||||
$current_site = get_current_site();
|
||||
if ( ! isset( $current_site->site_name ) ) {
|
||||
@@ -39,7 +43,9 @@ if ( ! function_exists( 'comicpress_hosted_on' ) ) {
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_copyright_info' ) ) {
|
||||
|
||||
function comicpress_copyright_info() {
|
||||
|
||||
$copyright_name = comicpress_themeinfo( 'copyright_name' );
|
||||
if ( empty( $copyright_name ) ) $copyright_name = get_bloginfo( 'name' );
|
||||
$copyright_url = comicpress_themeinfo( 'copyright_url' );
|
||||
@@ -50,7 +56,9 @@ if ( ! function_exists( 'comicpress_copyright_info' ) ) {
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_copyright_dates' ) ) {
|
||||
|
||||
function comicpress_copyright_dates() {
|
||||
|
||||
global $wpdb;
|
||||
$copyright_dates = $wpdb->get_results("
|
||||
SELECT
|
||||
@@ -61,7 +69,7 @@ if ( ! function_exists( 'comicpress_copyright_dates' ) ) {
|
||||
WHERE
|
||||
post_status = 'publish'
|
||||
");
|
||||
$output = '';
|
||||
$output = '';
|
||||
if ( $copyright_dates ) {
|
||||
$copyright = $copyright_dates[0]->firstdate;
|
||||
if ( $copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate ) {
|
||||
@@ -72,4 +80,3 @@ if ( ! function_exists( 'comicpress_copyright_dates' ) ) {
|
||||
return apply_filters( 'comicpress_copyright_dates', $output );
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
$custom_header_args = array(
|
||||
'default-text-color' => 'B00',
|
||||
'flex-width' => true,
|
||||
'width' => get_theme_mod('comicpress-customize-range-site-width', '980'),
|
||||
'width' => get_theme_mod( 'comicpress-customize-range-site-width', '980' ),
|
||||
'flex-height' => true,
|
||||
'height' => '110',
|
||||
'header-text' => false,
|
||||
@@ -15,10 +15,11 @@ $custom_header_args = array(
|
||||
add_theme_support( 'custom-header', $custom_header_args );
|
||||
|
||||
function comicpress_admin_header_style() {
|
||||
|
||||
?>
|
||||
<style type="text/css">
|
||||
#headimg { width: <?php echo get_custom_header()->width; ?>px; height: <?php echo get_custom_header()->height; ?>px; background: url(<?php header_image(); ?>) top center no-repeat; }
|
||||
<?php if (!display_header_text()) { ?>
|
||||
<?php if ( ! display_header_text() ) { ?>
|
||||
#headimg h1, #headimg .description { display: none; }
|
||||
<?php } ?>
|
||||
</style>
|
||||
@@ -26,12 +27,13 @@ function comicpress_admin_header_style() {
|
||||
}
|
||||
|
||||
function comicpress_header_style() {
|
||||
if (get_header_image()) {
|
||||
|
||||
if ( get_header_image() ) {
|
||||
$textcolor = get_header_textcolor()
|
||||
?>
|
||||
<style type="text/css">
|
||||
#header { width: <?php echo get_custom_header()->width; ?>px; height: <?php echo get_custom_header()->height; ?>px; background: url('<?php header_image(); ?>') top center no-repeat; overflow: hidden; }
|
||||
<?php if (get_theme_mod('comicpress-customize-checkbox-header-hotspot', false)) { ?>
|
||||
<?php if ( get_theme_mod( 'comicpress-customize-checkbox-header-hotspot', false ) ) { ?>
|
||||
#header h1 { padding: 0; }
|
||||
#header h1 a { display: block; width: <?php echo get_custom_header()->width; ?>px; height: <?php echo get_custom_header()->height; ?>px; text-indent: -9999px; }
|
||||
.header-info, .header-info h1 a { padding: 0; }
|
||||
|
||||
@@ -4,6 +4,7 @@ if ( isset( $_GET['latestblogpost'] ) )
|
||||
add_action( 'template_redirect', 'comicpress_latest_blog_post_jump' );
|
||||
|
||||
function comicpress_latest_blog_post_jump() {
|
||||
|
||||
$catnum = 0;
|
||||
if ( isset( $_GET['latestblogpost'] ) ) $catnum = (int) esc_attr( $_GET['latestblogpost'] );
|
||||
if ( ! empty( $catnum ) ) {
|
||||
@@ -37,7 +38,9 @@ function comicpress_latest_blog_post_jump() {
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_display_post_title' ) ) {
|
||||
|
||||
function comicpress_display_post_title() {
|
||||
|
||||
global $post, $wp_query;
|
||||
$get_post_title = '';
|
||||
if ( ( $post->post_type == 'page' ) && is_front_page() ) return; // Don't display the title on static home pages.
|
||||
@@ -58,7 +61,9 @@ if ( ! function_exists( 'comicpress_display_post_title' ) ) {
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_display_post_thumbnail' ) ) {
|
||||
|
||||
function comicpress_display_post_thumbnail( $size = 'thumbnail' ) {
|
||||
|
||||
global $post, $wp_query;
|
||||
if ( $post->post_type == 'post' ) {
|
||||
$post_thumbnail = '';
|
||||
@@ -78,7 +83,9 @@ if ( ! function_exists( 'comicpress_display_post_thumbnail' ) ) {
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_display_author_gravatar' ) ) {
|
||||
|
||||
function comicpress_display_author_gravatar() {
|
||||
|
||||
global $post, $wp_query, $is_IE;
|
||||
if ( is_page() ) return;
|
||||
if ( comicpress_themeinfo( 'enable_post_author_gravatar' ) ) {
|
||||
@@ -91,7 +98,9 @@ if ( ! function_exists( 'comicpress_display_author_gravatar' ) ) {
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_display_post_calendar' ) ) {
|
||||
|
||||
function comicpress_display_post_calendar() {
|
||||
|
||||
global $post, $wp_query;
|
||||
if ( is_page() ) return;
|
||||
if ( comicpress_themeinfo( 'enable_post_calendar' ) ) {
|
||||
@@ -102,7 +111,9 @@ if ( ! function_exists( 'comicpress_display_post_calendar' ) ) {
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_display_post_author' ) ) {
|
||||
|
||||
function comicpress_display_post_author() {
|
||||
|
||||
global $post, $authordata;
|
||||
if ( ! comicpress_themeinfo( 'disable_author_info_in_posts') ) {
|
||||
$post_author = '<span class="post-author">'.__( 'by', 'comicpress' ) . ' <a href="' . get_author_posts_url( $authordata->ID, $authordata->user_nicename ) . '" rel="author">' . get_the_author().'</a></span>' . "\r\n";
|
||||
@@ -112,7 +123,9 @@ if ( ! function_exists( 'comicpress_display_post_author' ) ) {
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_display_post_date' ) ) {
|
||||
|
||||
function comicpress_display_post_date() {
|
||||
|
||||
global $post;
|
||||
if ( ! comicpress_themeinfo( 'disable_date_info_in_posts' ) ) {
|
||||
$post_date = "<span class=\"posted-on\">".__( 'on', 'comicpress' ) . ' ' . "</span><span class=\"post-date\">" . get_the_date( get_option( 'date_format' ) ) . "</span>\r\n";
|
||||
@@ -122,7 +135,9 @@ if ( ! function_exists( 'comicpress_display_post_date' ) ) {
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_display_post_time' ) ) {
|
||||
|
||||
function comicpress_display_post_time() {
|
||||
|
||||
global $post;
|
||||
if ( ! comicpress_themeinfo( 'disable_date_info_in_posts') && ! comicpress_themeinfo( 'disable_posted_at_time_in_posts' ) ) {
|
||||
$post_time = "<span class=\"posted-at\">" . __( 'at', 'comicpress' ) . ' ' . "</span><span class=\"post-time\">" . get_the_time( get_option( 'time_format' ) ) . "</span>\r\n";
|
||||
@@ -132,7 +147,9 @@ if ( ! function_exists( 'comicpress_display_post_time' ) ) {
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_display_modified_date_time' ) ) {
|
||||
|
||||
function comicpress_display_modified_date_time() {
|
||||
|
||||
global $post;
|
||||
if ( ! comicpress_themeinfo( 'disable_date_info_in_posts' ) && comicpress_themeinfo( 'enable_last_modified_in_posts' ) ) {
|
||||
$u_time = get_the_time( 'U' );
|
||||
@@ -147,7 +164,9 @@ if ( ! function_exists( 'comicpress_display_modified_date_time' ) ) {
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_display_post_category' ) ) {
|
||||
|
||||
function comicpress_display_post_category() {
|
||||
|
||||
global $post;
|
||||
$post_category = '';
|
||||
if ( ! comicpress_is_bbpress() && ! comicpress_themeinfo( 'disable_categories_in_posts' ) && ! is_attachment() && ( $post->post_type == 'post' ) ) {
|
||||
@@ -158,7 +177,9 @@ if ( ! function_exists( 'comicpress_display_post_category' ) ) {
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_display_post_tags' ) ) {
|
||||
|
||||
function comicpress_display_post_tags() {
|
||||
|
||||
global $post;
|
||||
if ( ! comicpress_themeinfo( 'disable_tags_in_posts' ) ) {
|
||||
$post_tags = "<div class=\"post-tags\">" . get_the_tag_list( __( '└ Tags: ', 'comicpress' ), ', ', '<br />' ) . "</div>\r\n";
|
||||
@@ -168,22 +189,30 @@ if ( ! function_exists( 'comicpress_display_post_tags' ) ) {
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_display_comment_link' ) ) {
|
||||
|
||||
function comicpress_display_comment_link() {
|
||||
|
||||
global $post;
|
||||
if ( $post->comment_status == 'open' && ! is_singular() ) {
|
||||
?>
|
||||
|
||||
<div class="comment-link">
|
||||
|
||||
<?php
|
||||
comments_popup_link( '<span class="comment-balloon comment-balloon-empty"> </span>' . __( 'Comment ', 'comicpress' ), '<span class="comment-balloon">1</span> ' . __( 'Comment', 'comicpress' ), '<span class="comment-balloon">%</span> ' . __( 'Comments', 'comicpress' ) );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_display_blog_navigation' ) ) {
|
||||
|
||||
function comicpress_display_blog_navigation() {
|
||||
|
||||
global $post, $wp_query;
|
||||
if ( comicpress_themeinfo( 'enable_comments_on_homepage' ) && ( comicpress_themeinfo( 'home_post_count' ) == '1' ) ) {
|
||||
$temp_single = $wp_query -> is_single;
|
||||
@@ -191,13 +220,18 @@ if ( ! function_exists( 'comicpress_display_blog_navigation' ) ) {
|
||||
}
|
||||
if ( is_single() && ! is_page() && ! is_archive() && ! is_search() && ( $post->post_type == 'post' ) ) {
|
||||
?>
|
||||
|
||||
<div class="blognav">
|
||||
|
||||
<?php
|
||||
previous_post_link( '<span class="blognav-prev">%link</span>', __( '‹ Prev', 'comicpress' ), false );
|
||||
next_post_link( '<span class="blognav-next">%link</span>', __( 'Next ›', 'comicpress' ), false );
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ( comicpress_themeinfo( 'enable_comments_on_homepage' ) && ( comicpress_themeinfo( 'home_post_count' ) == '1') ) {
|
||||
@@ -207,7 +241,9 @@ if ( ! function_exists( 'comicpress_display_blog_navigation' ) ) {
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_display_the_content' ) ) {
|
||||
|
||||
function comicpress_display_the_content() {
|
||||
|
||||
global $post, $wp_query;
|
||||
if ( ( is_archive() || is_search() ) && ( comicpress_themeinfo( 'excerpt_or_content_in_archive' ) == 'excerpt' ) && ! comicpress_is_bbpress() ) {
|
||||
do_action( 'comicpress-display-the-content-before' );
|
||||
@@ -225,28 +261,44 @@ if ( ! function_exists( 'comicpress_display_the_content' ) ) {
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'comicpress_display_post' ) ) {
|
||||
|
||||
function comicpress_display_post() {
|
||||
|
||||
global $post, $wp_query;
|
||||
if ( ! comicpress_is_bbpress() ) comicpress_display_blog_navigation();
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
|
||||
<?php comicpress_display_post_thumbnail(); ?>
|
||||
|
||||
<div class="post-head">
|
||||
|
||||
<?php do_action( 'comicpress-post-head' ); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="post-content">
|
||||
|
||||
<div class="post-info">
|
||||
|
||||
<?php
|
||||
if ( ! comicpress_is_bbpress() ) comicpress_display_author_gravatar();
|
||||
if ( ! comicpress_is_bbpress() ) comicpress_display_post_calendar();
|
||||
if ( is_sticky() ) {
|
||||
?>
|
||||
<div class="sticky-image">Featured Post</div>
|
||||
|
||||
<div class="sticky-image">
|
||||
Featured Post
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ( function_exists( 'comicpress_show_mood_in_post' ) ) comicpress_show_mood_in_post();
|
||||
?>
|
||||
|
||||
<div class="post-text">
|
||||
|
||||
<?php
|
||||
comicpress_display_post_title();
|
||||
if ( ! is_page() ) {
|
||||
@@ -255,58 +307,80 @@ if ( ! function_exists( 'comicpress_display_post' ) ) {
|
||||
comicpress_display_post_time();
|
||||
comicpress_display_modified_date_time();
|
||||
if ( $post->post_type == 'post' ) {
|
||||
edit_post_link( __( 'Edit', 'comicpress' ), ' <span class="post-edit">', '</span>');
|
||||
edit_post_link( __( 'Edit', 'comicpress' ), ' <span class="post-edit">', '</span>' );
|
||||
}
|
||||
comicpress_display_post_category();
|
||||
/* Integrate the WP-Plugin: WP-PostRatings */
|
||||
if ( function_exists( 'the_ratings' ) && $post->post_type == 'post' ) { the_ratings();
|
||||
if ( function_exists( 'the_ratings' ) && $post->post_type == 'post' ) {
|
||||
the_ratings();
|
||||
}
|
||||
do_action( 'comicpress-post-info' );
|
||||
do_action( 'comic-post-info' );
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="entry">
|
||||
|
||||
<?php comicpress_display_the_content(); ?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php do_action( 'comic-transcript' ); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ',
|
||||
'after' => '</div>',
|
||||
'next_or_number' => 'number',
|
||||
)
|
||||
);
|
||||
) );
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php
|
||||
if ( ! is_page() ) {
|
||||
?>
|
||||
|
||||
<div class="post-extras">
|
||||
|
||||
<?php
|
||||
comicpress_display_post_tags();
|
||||
do_action( 'comicpress-post-extras' );
|
||||
comicpress_display_comment_link();
|
||||
comicpress_display_post_tags();
|
||||
do_action( 'comicpress-post-extras' );
|
||||
comicpress_display_comment_link();
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} else edit_post_link( __( 'Edit this page.', 'comicpress' ), '', '');
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="post-foot">
|
||||
|
||||
<?php
|
||||
do_action('comic-post-foot');
|
||||
do_action('comicpress-post-foot');
|
||||
do_action( 'comic-post-foot' );
|
||||
do_action( 'comicpress-post-foot' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
do_action( 'comic-post-extras' );
|
||||
comments_template( '', true );
|
||||
do_action( 'comic-post-extras' );
|
||||
comments_template( '', true );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
add_action( 'wp_head', 'opengraph_make_thumbnail_for_youtube' );
|
||||
|
||||
function opengraph_make_thumbnail_for_youtube() {
|
||||
|
||||
global $post;
|
||||
if ( $post ) {
|
||||
$pattern = '/(?:youtube\.com\/(?:[^\/]+\/[^\/]+\/|(?:v|e(?:mbed)?)\/|[^#]*[?&]v=)|youtu\.be\/)([^"&?\/ ]{11})/i';
|
||||
|
||||
@@ -21,6 +21,7 @@ add_action( 'save_post', 'comicpress_handle_edit_post_mood_save', 5, 1 );
|
||||
add_action( 'add_meta_boxes', 'comicpress_add_moods_into_posts' );
|
||||
|
||||
function comicpress_add_moods_into_posts() {
|
||||
|
||||
global $post;
|
||||
if ( ! empty( $post ) && ( $post->post_type == 'comic' || $post->post_type == 'post' ) ) {
|
||||
add_meta_box( 'comicpress_showmood_edit_post', __( 'Moods', 'comicpress' ), 'comicpress_showmood_edit_post', 'post', 'normal', 'low' );
|
||||
@@ -29,24 +30,29 @@ function comicpress_add_moods_into_posts() {
|
||||
|
||||
|
||||
function comicpress_show_mood_in_post() {
|
||||
|
||||
global $post;
|
||||
$moods_directory = comicpress_themeinfo( 'moods_directory' );
|
||||
if ( !empty( $moods_directory ) && $moods_directory != 'none' ) {
|
||||
$mood_file = get_post_meta( get_the_ID(), "mood", true );
|
||||
if ( ! empty( $mood_file ) && $mood_file != '') {
|
||||
if ( ! empty( $moods_directory ) && $moods_directory != 'none' ) {
|
||||
$mood_file = get_post_meta( get_the_ID(), 'mood', true );
|
||||
if ( ! empty( $mood_file ) && $mood_file != '' ) {
|
||||
$mood = explode( ".", $mood_file );
|
||||
$mood = reset( $mood );
|
||||
if ( ! empty( $mood_file ) && file_exists( get_stylesheet_directory() . '/images/moods/' . $moods_directory . '/' . $mood_file ) ) {
|
||||
?>
|
||||
|
||||
<div class="post-mood post-<?php echo $mood; ?>">
|
||||
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/moods/<?php echo $moods_directory; ?>/<?php echo $mood_file; ?>" alt="<?php echo $mood; ?>" title="<?php echo $mood; ?>" />
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} elseif ( !empty( $mood_file ) && file_exists( get_template_directory() . '/images/moods/' .$moods_directory . '/' . $mood_file) ) {
|
||||
} elseif ( ! empty( $mood_file ) && file_exists( get_template_directory() . '/images/moods/' . $moods_directory . '/' . $mood_file ) ) {
|
||||
?>
|
||||
|
||||
<div class="post-mood post-<?php echo $mood; ?>">
|
||||
<img src="<?php echo get_template_directory_uri(); ?>/images/moods/<?php echo $moods_directory; ?>/<?php echo $mood_file; ?>" alt="<?php echo $mood; ?>" title="<?php echo $mood; ?>" />
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,29 +3,37 @@
|
||||
|
||||
function comicpress_page_editor_options( $post ) {
|
||||
?>
|
||||
|
||||
<div class="inside" style="overflow: hidden">
|
||||
|
||||
<?php
|
||||
wp_nonce_field( 'comicpress_post_options-'.$post->ID, 'comicpress-update-page-options' );
|
||||
$disable_sidebars = get_post_meta( $post->ID, 'disable-sidebars', true );
|
||||
wp_nonce_field( 'comicpress_post_options-' . $post->ID, 'comicpress-update-page-options' );
|
||||
$disable_sidebars = get_post_meta( $post->ID, 'disable-sidebars', true );
|
||||
?>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<input id="comicpress_sidebar_remove" name="comicpress_sidebar_remove" type="checkbox" value="1"<?php echo $disable_sidebars ? ' checked="checked"' : ''; ?> /> Disable Sidebars
|
||||
<input id="comicpress_sidebar_remove" name="comicpress_sidebar_remove" type="checkbox" value="1"<?php echo $disable_sidebars ? ' checked="checked"' : ''; ?> />
|
||||
Disable Sidebars
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
add_action( 'add_meta_boxes', 'comicpress_add_page_editor_meta_box' );
|
||||
|
||||
function comicpress_add_page_editor_meta_box() {
|
||||
|
||||
add_meta_box( 'comicpress-page-options', __( 'Page Options', 'comicpress' ), 'comicpress_page_editor_options', 'page', 'side', 'high' );
|
||||
}
|
||||
|
||||
function comicpress_save_page_editor_options( $post_id ) {
|
||||
if ( isset( $_POST['comicpress-update-page-options'] ) && ! wp_verify_nonce( $_POST['comicpress-update-page-options'], 'comicpress_post_options-' . $post_id ) ) {
|
||||
|
||||
if ( isset( $_POST['comicpress-update-page-options'] ) && ! wp_verify_nonce( $_POST['comicpress-update-page-options'], 'comicpress_post_options-' . $post_id ) ) {
|
||||
return $post_id;
|
||||
}
|
||||
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
|
||||
|
||||
@@ -1,20 +1,35 @@
|
||||
<?php
|
||||
|
||||
function comicpress_pagination() {
|
||||
|
||||
global $post, $wp_query;
|
||||
if ( function_exists( 'comicpress_wp_pagenavi' ) ) {
|
||||
comicpress_wp_pagenavi( '<div id="wp-paginav">', '<div class="clear"></div></div>' );
|
||||
} else {
|
||||
?>
|
||||
|
||||
<div id="pagenav">
|
||||
<div class="pagenav-right">
|
||||
<?php previous_posts_link( __( 'Newer Entries ↑', 'comicpress' ) ) ?>
|
||||
</div>
|
||||
<div class="pagenav-left">
|
||||
<?php next_posts_link( __( '↓ Previous Entries', 'comicpress' ) ) ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="pagenav-right">
|
||||
|
||||
<?php
|
||||
previous_posts_link( __( 'Newer Entries ↑', 'comicpress' ) );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="pagenav-left">
|
||||
|
||||
<?php
|
||||
next_posts_link( __( '↓ Previous Entries', 'comicpress' ) );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* This contact elements are scheduled to be removed from WordPress at some point.
|
||||
*/
|
||||
function comicpress_remove_unwanted_contactmethods( $contactmethods ) {
|
||||
|
||||
if ( isset( $contactmethods['aim'] ) ) unset( $contactmethods['aim'] );
|
||||
if ( isset( $contactmethods['googleplus'] ) ) unset( $contactmethods['googleplus'] );
|
||||
if ( isset( $contactmethods['jabber'] ) ) unset( $contactmethods['jabber'] );
|
||||
@@ -33,6 +34,7 @@ add_filter( 'user_contactmethods', 'comicpress_remove_unwanted_contactmethods' ,
|
||||
* When activated, this must be integrated into author.php in table 'user-contacts'.
|
||||
*/
|
||||
function add_new_contactmethods( $methods ) {
|
||||
|
||||
// Default contact methods.
|
||||
$methods['twitter'] = 'Twitter (url)';
|
||||
$methods['facebook'] = 'Facebook (url)';
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* @param object $use_this_post If provided, after saving the current post, set up this post for template tag use.
|
||||
*/
|
||||
function Protect ( $use_this_post = null ) {
|
||||
|
||||
global $post, $wp_query, $__post, $__wp_query;
|
||||
if ( ! empty( $post ) ) {
|
||||
$__post = $post;
|
||||
@@ -22,6 +23,7 @@ function Protect ( $use_this_post = null ) {
|
||||
* Temporarily restore the global $post variable and set it up for use.
|
||||
*/
|
||||
function Restore() {
|
||||
|
||||
global $post, $__post;
|
||||
$post = $__post;
|
||||
setup_postdata( $post );
|
||||
@@ -31,8 +33,9 @@ function Restore() {
|
||||
* Restore global $post and $wp_query.
|
||||
*/
|
||||
function Unprotect() {
|
||||
|
||||
global $post, $wp_query, $__post, $__wp_query;
|
||||
if ( ! empty( $__post) ) {
|
||||
if ( ! empty( $__post ) ) {
|
||||
$post = $__post;
|
||||
}
|
||||
if ( ! empty( $__wp_query ) ) {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
// add_filter( 'pre_get_posts' , 'comicpress_include_custom_post_types_in_rss' );
|
||||
|
||||
function comicpress_include_custom_post_types_in_rss( $query ) {
|
||||
|
||||
if ( $query->is_feed && ! isset( $query->post_type ) && empty( $query->post_type ) ) {
|
||||
$args = array(
|
||||
'public' => true,
|
||||
|
||||
@@ -26,18 +26,19 @@ Author URI: http://lesterchan.net
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
if (comicpress_themeinfo('enable_numbered_pagination')) {
|
||||
if ( comicpress_themeinfo( 'enable_numbered_pagination' ) ) {
|
||||
|
||||
### Function: Page Navigation: Boxed Style Paging
|
||||
function comicpress_wp_pagenavi($before = '', $after = '') {
|
||||
function comicpress_wp_pagenavi( $before = '', $after = '' ) {
|
||||
|
||||
global $wpdb, $wp_query;
|
||||
$pagenavi_options = comicpress_pagenavi_init();
|
||||
if (!is_single()) {
|
||||
$request = $wp_query->request;
|
||||
$posts_per_page = intval(get_query_var('posts_per_page'));
|
||||
$paged = intval(get_query_var('paged'));
|
||||
$numposts = $wp_query->found_posts;
|
||||
$max_page = $wp_query->max_num_pages;
|
||||
if ( ! is_single() ) {
|
||||
$request = $wp_query->request;
|
||||
$posts_per_page = intval( get_query_var( 'posts_per_page' ) );
|
||||
$paged = intval( get_query_var( 'paged' ) );
|
||||
$numposts = $wp_query->found_posts;
|
||||
$max_page = $wp_query->max_num_pages;
|
||||
/*
|
||||
$numposts = 0;
|
||||
if(strpos(get_query_var('tag'), " ")) {
|
||||
@@ -52,88 +53,88 @@ if (comicpress_themeinfo('enable_numbered_pagination')) {
|
||||
}
|
||||
$max_page = ceil($numposts/$posts_per_page);
|
||||
*/
|
||||
if(empty($paged) || $paged == 0) {
|
||||
if ( empty( $paged ) || $paged == 0 ) {
|
||||
$paged = 1;
|
||||
}
|
||||
$pages_to_show = intval($pagenavi_options['num_pages']);
|
||||
$pages_to_show = intval( $pagenavi_options['num_pages'] );
|
||||
$pages_to_show_minus_1 = $pages_to_show-1;
|
||||
$half_page_start = floor($pages_to_show_minus_1/2);
|
||||
$half_page_end = ceil($pages_to_show_minus_1/2);
|
||||
$start_page = $paged - $half_page_start;
|
||||
if($start_page <= 0) {
|
||||
$half_page_start = floor( $pages_to_show_minus_1/2 );
|
||||
$half_page_end = ceil( $pages_to_show_minus_1/2 );
|
||||
$start_page = $paged - $half_page_start;
|
||||
if ( $start_page <= 0 ) {
|
||||
$start_page = 1;
|
||||
}
|
||||
$end_page = $paged + $half_page_end;
|
||||
if(($end_page - $start_page) != $pages_to_show_minus_1) {
|
||||
if ( ( $end_page - $start_page ) != $pages_to_show_minus_1 ) {
|
||||
$end_page = $start_page + $pages_to_show_minus_1;
|
||||
}
|
||||
if($end_page > $max_page) {
|
||||
if ( $end_page > $max_page ) {
|
||||
$start_page = $max_page - $pages_to_show_minus_1;
|
||||
$end_page = $max_page;
|
||||
$end_page = $max_page;
|
||||
}
|
||||
if($start_page <= 0) {
|
||||
if ( $start_page <= 0 ) {
|
||||
$start_page = 1;
|
||||
}
|
||||
if($max_page > 1 || intval($pagenavi_options['always_show']) == 1) {
|
||||
$pages_text = str_replace("%CURRENT_PAGE%", number_format_i18n($paged), $pagenavi_options['pages_text']);
|
||||
$pages_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pages_text);
|
||||
echo $before.'<div id="paginav"><ul>'."\n";
|
||||
switch(intval($pagenavi_options['style'])) {
|
||||
if ( $max_page > 1 || intval( $pagenavi_options['always_show'] ) == 1 ) {
|
||||
$pages_text = str_replace( "%CURRENT_PAGE%", number_format_i18n( $paged ), $pagenavi_options['pages_text'] );
|
||||
$pages_text = str_replace( "%TOTAL_PAGES%", number_format_i18n( $max_page ), $pages_text );
|
||||
echo $before . '<div id="paginav"><ul>' . "\n";
|
||||
switch ( intval( $pagenavi_options['style'] ) ) {
|
||||
case 1:
|
||||
if(!empty($pages_text)) {
|
||||
if ( ! empty( $pages_text ) ) {
|
||||
echo '<li class="paginav-pages">'.$pages_text.'</li>';
|
||||
}
|
||||
if ($start_page >= 2 && $pages_to_show < $max_page) {
|
||||
$first_page_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pagenavi_options['first_text']);
|
||||
echo '<li><a href="'.esc_url(get_pagenum_link()).'" title="'.$first_page_text.'">'.$first_page_text.'</a></li>';
|
||||
if ( $start_page >= 2 && $pages_to_show < $max_page ) {
|
||||
$first_page_text = str_replace( "%TOTAL_PAGES%", number_format_i18n( $max_page ), $pagenavi_options['first_text'] );
|
||||
echo '<li><a href="' . esc_url( get_pagenum_link() ) . '" title="' . $first_page_text.'">' . $first_page_text . '</a></li>';
|
||||
/* if(!empty($pagenavi_options['dotleft_text'])) {
|
||||
echo '<li class="paginav-extend">'.$pagenavi_options['dotleft_text'].'</li>';
|
||||
} */
|
||||
}
|
||||
$prev_post_link = get_previous_posts_link( $pagenavi_options['prev_text'] );
|
||||
|
||||
if (!empty($prev_post_link)) {
|
||||
if ( ! empty( $prev_post_link ) ) {
|
||||
echo "<li class=\"paginav-previous\">\r\n";
|
||||
echo $prev_post_link . "\r\n";
|
||||
echo "</li>\r\n";
|
||||
}
|
||||
for($i = $start_page; $i <= $end_page; $i++) {
|
||||
if($i == $paged) {
|
||||
$current_page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['current_text']);
|
||||
echo '<li class="paginav-current">'.$current_page_text.'</li>';
|
||||
for ( $i = $start_page; $i <= $end_page; $i++ ) {
|
||||
if ( $i == $paged ) {
|
||||
$current_page_text = str_replace( "%PAGE_NUMBER%", number_format_i18n( $i ), $pagenavi_options['current_text'] );
|
||||
echo '<li class="paginav-current">' . $current_page_text . '</li>';
|
||||
} else {
|
||||
$page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['page_text']);
|
||||
echo '<li><a href="'.esc_url(get_pagenum_link($i)).'" title="'.$page_text.'">'.$page_text.'</a></li>';
|
||||
$page_text = str_replace( "%PAGE_NUMBER%", number_format_i18n( $i ), $pagenavi_options['page_text'] );
|
||||
echo '<li><a href="' . esc_url( get_pagenum_link( $i ) ).'" title="' . $page_text.'">' . $page_text . '</a></li>';
|
||||
}
|
||||
}
|
||||
$next_post_link = get_next_posts_link($pagenavi_options['next_text'], $max_page);
|
||||
if (!empty($next_post_link)) {
|
||||
$next_post_link = get_next_posts_link( $pagenavi_options['next_text'], $max_page );
|
||||
if ( ! empty( $next_post_link ) ) {
|
||||
echo "<li class=\"paginav-next\">\r\n";
|
||||
echo $next_post_link ."\r\n";
|
||||
echo $next_post_link . "\r\n";
|
||||
echo "</li>\r\n";
|
||||
}
|
||||
if ($end_page < $max_page) {
|
||||
if ( $end_page < $max_page ) {
|
||||
/* if(!empty($pagenavi_options['dotright_text'])) {
|
||||
echo '<li class="paginav-extend">'.$pagenavi_options['dotright_text'].'</li>';
|
||||
} */
|
||||
$last_page_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pagenavi_options['last_text']);
|
||||
echo '<li><a href="'.esc_url(get_pagenum_link($max_page)).'" title="'.$last_page_text.'">'.$last_page_text.'</a></li>';
|
||||
$last_page_text = str_replace( "%TOTAL_PAGES%", number_format_i18n( $max_page ), $pagenavi_options['last_text'] );
|
||||
echo '<li><a href="' . esc_url( get_pagenum_link( $max_page ) ) . '" title="' . $last_page_text . '">' . $last_page_text . '</a></li>';
|
||||
}
|
||||
break;
|
||||
case 2;
|
||||
echo '<form action="'.htmlspecialchars($_SERVER['PHP_SELF']).'" method="get">'."\n";
|
||||
echo '<form action="' . htmlspecialchars( $_SERVER['PHP_SELF'] ) . '" method="get">' . "\n";
|
||||
echo '<select size="1" onchange="document.location.href = this.options[this.selectedIndex].value;">'."\n";
|
||||
for($i = 1; $i <= $max_page; $i++) {
|
||||
for($i = 1; $i <= $max_page; $i++ ) {
|
||||
$page_num = $i;
|
||||
if($page_num == 1) {
|
||||
if ( $page_num == 1 ) {
|
||||
$page_num = 0;
|
||||
}
|
||||
if($i == $paged) {
|
||||
$current_page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['current_text']);
|
||||
echo '<option value="'.esc_url(get_pagenum_link($page_num)).'" selected="selected" class="current">'.$current_page_text."</option>\n";
|
||||
if ( $i == $paged ) {
|
||||
$current_page_text = str_replace( "%PAGE_NUMBER%", number_format_i18n( $i ), $pagenavi_options['current_text'] );
|
||||
echo '<option value="' . esc_url( get_pagenum_link( $page_num ) ) . '" selected="selected" class="current">' . $current_page_text . "</option>\n";
|
||||
} else {
|
||||
$page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['page_text']);
|
||||
echo '<option value="'.esc_url(get_pagenum_link($page_num)).'">'.$page_text."</option>\n";
|
||||
$page_text = str_replace( "%PAGE_NUMBER%", number_format_i18n( $i ), $pagenavi_options['page_text'] );
|
||||
echo '<option value="' . esc_url( get_pagenum_link( $page_num ) ) . '">' . $page_text . "</option>\n";
|
||||
}
|
||||
}
|
||||
echo "</select>\n";
|
||||
@@ -153,7 +154,8 @@ if (comicpress_themeinfo('enable_numbered_pagination')) {
|
||||
}
|
||||
|
||||
function comicpress_pagenavi_init() {
|
||||
// Add Options
|
||||
|
||||
// Add Options.
|
||||
$pagenavi_options = array();
|
||||
$pagenavi_options['pages_text'] = __( 'Page %CURRENT_PAGE% of %TOTAL_PAGES%', 'comicpress' );
|
||||
$pagenavi_options['current_text'] = '%PAGE_NUMBER%';
|
||||
@@ -171,4 +173,4 @@ if (comicpress_themeinfo('enable_numbered_pagination')) {
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
71
header.php
71
header.php
@@ -1,25 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />
|
||||
<link rel="stylesheet" href="<?php echo get_stylesheet_uri(); ?>" type="text/css" media="screen" />
|
||||
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
|
||||
<meta name="ComicPress" content="<?php echo comicpress_themeinfo( 'version' ); ?>" />
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />
|
||||
<link rel="stylesheet" href="<?php echo get_stylesheet_uri(); ?>" type="text/css" media="screen" />
|
||||
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
|
||||
<meta name="ComicPress" content="<?php echo comicpress_themeinfo( 'version' ); ?>" />
|
||||
|
||||
<body <?php body_class(); ?>>
|
||||
<?php comicpress_get_sidebar( 'above-header' ); ?>
|
||||
<div id="page-wrap">
|
||||
<div id="page">
|
||||
<header id="header">
|
||||
<div class="header-info">
|
||||
<h1><a href="<?php echo home_url(); ?>"><?php bloginfo( 'name' ); ?></a></h1>
|
||||
<div class="description"><?php bloginfo( 'description' ); ?></div>
|
||||
</div>
|
||||
<?php comicpress_get_sidebar( 'header' ); ?>
|
||||
<div class="clear"></div>
|
||||
</header>
|
||||
<?php
|
||||
wp_head();
|
||||
?>
|
||||
|
||||
</head>
|
||||
|
||||
<body <?php body_class(); ?>>
|
||||
|
||||
<?php
|
||||
comicpress_get_sidebar( 'above-header' );
|
||||
?>
|
||||
|
||||
<div id="page-wrap">
|
||||
|
||||
<div id="page">
|
||||
|
||||
<header id="header">
|
||||
|
||||
<div class="header-info">
|
||||
|
||||
<h1>
|
||||
<a href="<?php echo home_url(); ?>">
|
||||
|
||||
<?php
|
||||
bloginfo( 'name' );
|
||||
?>
|
||||
|
||||
</a>
|
||||
</h1>
|
||||
|
||||
<div class="description">
|
||||
|
||||
<?php
|
||||
bloginfo( 'description' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
comicpress_get_sidebar( 'header' );
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</header>
|
||||
|
||||
<?php
|
||||
if ( ! comicpress_themeinfo( 'disable_default_menubar' ) && function_exists( 'comicpress_menubar' ) ) comicpress_menubar();
|
||||
|
||||
@@ -5,7 +5,9 @@ if ( ! comicpress_is_signup() && ! comicpress_sidebars_disabled() ) {
|
||||
if ( comicpress_is_layout( '3clgn' ) ) comicpress_get_sidebar( 'right' );
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ( ! comicpress_is_signup() && ! comicpress_sidebars_disabled() ) {
|
||||
if ( comicpress_is_layout( '3cl,3cr' ) ) comicpress_get_sidebar( 'left' );
|
||||
@@ -13,5 +15,7 @@ if ( ! comicpress_is_signup() && ! comicpress_sidebars_disabled() ) {
|
||||
}
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
<div id="content-wrapper">
|
||||
|
||||
<?php
|
||||
do_action( 'comicpress-content-area' );
|
||||
if ( ! get_theme_mod( 'comicpress-customize-comic-in-column', false ) ) do_action( 'comic-area' );
|
||||
?>
|
||||
|
||||
<div id="subcontent-wrapper">
|
||||
|
||||
<?php
|
||||
if ( ! comicpress_is_signup() && ! comicpress_sidebars_disabled() ) {
|
||||
if ( comicpress_is_layout( '2cl,3c,3cl,3clgn' ) ) comicpress_get_sidebar( 'left' );
|
||||
@@ -16,6 +18,7 @@
|
||||
?>
|
||||
|
||||
<div id="content-column">
|
||||
|
||||
<?php
|
||||
if ( get_theme_mod( 'comicpress-customize-comic-in-column', false ) ) do_action( 'comic-area' );
|
||||
if ( ! comicpress_is_signup() && !comicpress_sidebars_disabled()) {
|
||||
@@ -24,6 +27,7 @@
|
||||
?>
|
||||
|
||||
<div id="content" class="narrowcolumn">
|
||||
|
||||
<?php
|
||||
do_action( 'comicpress-narrowcolumn-area' );
|
||||
if ( ! comicpress_sidebars_disabled() ) {
|
||||
|
||||
103
options.php
103
options.php
@@ -3,6 +3,7 @@
|
||||
add_action( 'admin_menu', 'comicpress_options_setup' );
|
||||
|
||||
function comicpress_options_setup() {
|
||||
|
||||
$options_title = __( 'Options', 'comicpress' );
|
||||
$admin_title = __( 'ComicPress Options', 'comicpress' );
|
||||
$pagehook = add_theme_page( $admin_title, $admin_title, 'edit_theme_options', 'comicpress-options', 'comicpress_admin_options' );
|
||||
@@ -12,30 +13,42 @@ function comicpress_options_setup() {
|
||||
}
|
||||
|
||||
function comicpress_admin_print_scripts() {
|
||||
|
||||
wp_enqueue_script( 'utils' );
|
||||
wp_enqueue_script( 'jquery' );
|
||||
}
|
||||
|
||||
function comicpress_admin_print_styles() {
|
||||
|
||||
wp_admin_css( 'css/global' );
|
||||
wp_admin_css( 'css/colors' );
|
||||
wp_admin_css( 'css/ie' );
|
||||
wp_enqueue_style( 'comicpress-options-style', get_template_directory_uri() . '/options/options.css' );
|
||||
}
|
||||
|
||||
function comicpress_admin_page_head() { ?>
|
||||
function comicpress_admin_page_head() {
|
||||
?>
|
||||
<!--[if lt ie 8]> <style> div.show { position: static; margin-top: 1px; } #eadmin div.off { height: 22px; } </style> <![endif]-->
|
||||
<?php
|
||||
}
|
||||
|
||||
function comicpress_admin_options() {
|
||||
?>
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
|
||||
<div id="eadmin-headericon" style="background: url('<?php echo get_template_directory_uri(); ?>/images/comicpress-rascal.png') no-repeat;"></div>
|
||||
<h2><?php _e( 'ComicPress Options', 'comicpress' ); ?></h2>
|
||||
<?php _e( 'ComicPress is a modular theme that has an abundance of hooks and actions placed in it for additional usability. Ref: Comic Easel', 'comicpress' ); ?><br />
|
||||
<?php _e( 'While ComicPress is an excellent stand-alone theme, it can be enhanced in usability with the associated plugins that have been built to utilize its functionality.', 'comicpress' ); ?><br />
|
||||
|
||||
<h2>
|
||||
<?php _e( 'ComicPress Options', 'comicpress' ); ?>
|
||||
</h2>
|
||||
<?php _e( 'ComicPress is a modular theme that has an abundance of hooks and actions placed in it for additional usability. Ref: Comic Easel', 'comicpress' ); ?>
|
||||
<br />
|
||||
<?php _e( 'While ComicPress is an excellent stand-alone theme, it can be enhanced in usability with the associated plugins that have been built to utilize its functionality.', 'comicpress' ); ?>
|
||||
<br />
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php
|
||||
if ( isset( $_GET['tab'] ) ) {
|
||||
$tab = wp_filter_nohtml_kses( $_GET['tab'] );
|
||||
@@ -48,11 +61,17 @@ function comicpress_admin_options() {
|
||||
global $comicpress_themeinfo;
|
||||
$comicpress_themeinfo = '';
|
||||
?>
|
||||
|
||||
<div id="message" class="updated">
|
||||
|
||||
<p>
|
||||
<strong><?php _e( 'ComicPress Settings RESET!', 'comicpress' ); ?></strong>
|
||||
<strong>
|
||||
<?php _e( 'ComicPress Settings RESET!', 'comicpress' ); ?>
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'comicpress_reset_customize' ) {
|
||||
@@ -61,11 +80,17 @@ function comicpress_admin_options() {
|
||||
global $comicpress_themeinfo;
|
||||
$comicpress_themeinfo = '';
|
||||
?>
|
||||
|
||||
<div id="message" class="updated">
|
||||
|
||||
<p>
|
||||
<strong><?php _e( 'ComicPress Customizer Colors RESET!', 'comicpress' ); ?></strong>
|
||||
<strong>
|
||||
<?php _e( 'ComicPress Customizer Colors RESET!', 'comicpress' ); ?>
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ( empty( $comicpress_options ) ) {
|
||||
@@ -121,7 +146,7 @@ function comicpress_admin_options() {
|
||||
'menubar_social_myspace',
|
||||
'menubar_social_email',
|
||||
) as $key ) {
|
||||
if ( isset( $_REQUEST[$key] ) && !empty( $_REQUEST[$key] ) ) {
|
||||
if ( isset( $_REQUEST[$key] ) && ! empty( $_REQUEST[$key] ) ) {
|
||||
$comicpress_options[$key] = esc_url( $_REQUEST[$key] );
|
||||
} else {
|
||||
// Set to empty if it's not set.
|
||||
@@ -154,7 +179,7 @@ function comicpress_admin_options() {
|
||||
'content_width', // Posts & Pages.
|
||||
'content_width_disabled_sidebars', // Posts & Pages.
|
||||
) as $key ) {
|
||||
if ( isset($_REQUEST[$key] ) )
|
||||
if ( isset( $_REQUEST[$key] ) )
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses( $_REQUEST[$key] );
|
||||
}
|
||||
$tab = 'postspages';
|
||||
@@ -216,20 +241,28 @@ function comicpress_admin_options() {
|
||||
?>
|
||||
<div id="message" class="updated">
|
||||
<p>
|
||||
<strong><?php _e( 'ComicPress Settings SAVED!', 'comicpress' ); ?></strong>
|
||||
<strong>
|
||||
<?php _e( 'ComicPress Settings SAVED!', 'comicpress' ); ?>
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function hidemessage() { document.getElementById('message').style.display = 'none'; }
|
||||
</script>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
$version = comicpress_themeinfo( 'version' );
|
||||
$comicpress_options = comicpress_load_options();
|
||||
?>
|
||||
|
||||
<div id="poststuff" class="metabox-holder">
|
||||
|
||||
<div id="eadmin">
|
||||
|
||||
<?php
|
||||
$tab_info = array(
|
||||
'splash' => __( 'Introduction', 'comicpress' ),
|
||||
@@ -244,22 +277,31 @@ function comicpress_admin_options() {
|
||||
$tab = 'splash'; }
|
||||
foreach ( $tab_info as $tab_id => $label ) {
|
||||
?>
|
||||
|
||||
<div id="comicpress-tab-<?php echo $tab_id; ?>" class="comicpress-tab <?php echo ( $tab == $tab_id ) ? 'on' : 'off'; ?>">
|
||||
|
||||
<span>
|
||||
<?php echo $label; ?>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="comicpress-options-pages">
|
||||
|
||||
<?php
|
||||
foreach ( glob( get_template_directory() . '/options/*.php' ) as $file ) { include( $file ); }
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var showPage = function(which) {
|
||||
@@ -283,14 +325,46 @@ function comicpress_admin_options() {
|
||||
showPage('<?php echo esc_js( $tab ); ?>');
|
||||
}(jQuery));
|
||||
</script>
|
||||
|
||||
</div>
|
||||
<div class="eadmin-footer">
|
||||
|
||||
<div class="eadmin-footer">
|
||||
|
||||
<div id="comicpress-version-title">
|
||||
<a href="http://frumph.net/">ComicPress <?php echo comicpress_themeinfo( 'version' ); ?></a>
|
||||
|
||||
<a href="http://frumph.net/">
|
||||
ComicPress
|
||||
<?php
|
||||
echo comicpress_themeinfo( 'version' );
|
||||
?>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<?php _e( 'Developed and maintained by', 'comicpress' ); ?> <a href="http://frumph.net/" target="_blank" rel="noopener noreferrer">Philip M. Hofer</a> <small>(<a href="http://frumph.net/" target="_blank" rel="noopener noreferrer">Frumph</a>)</small>, <?php _e( 'Originally created by', 'comicpress' ); ?> <a href="http://mindfaucet.com/" target="_blank" rel="noopener noreferrer">Tyler Martin</a><br />
|
||||
<?php _e( 'If you like the ComicPress theme, please donate. It will help in developing new features and versions.', 'comicpress' ); ?>
|
||||
|
||||
<?php
|
||||
_e( 'Developed and maintained by', 'comicpress' );
|
||||
?>
|
||||
<a href="http://frumph.net/" target="_blank" rel="noopener noreferrer">
|
||||
Philip M. Hofer
|
||||
</a>
|
||||
<small>
|
||||
(<a href="http://frumph.net/" target="_blank" rel="noopener noreferrer">Frumph</a>)
|
||||
</small>
|
||||
,
|
||||
<?php
|
||||
_e( 'Originally created by', 'comicpress' );
|
||||
?>
|
||||
<a href="http://mindfaucet.com/" target="_blank" rel="noopener noreferrer">
|
||||
Tyler Martin
|
||||
</a>
|
||||
<br />
|
||||
|
||||
<?php
|
||||
_e( 'If you like the ComicPress theme, please donate. It will help in developing new features and versions.', 'comicpress' );
|
||||
?>
|
||||
|
||||
<table style="margin:0 auto;">
|
||||
<tr>
|
||||
<td style="width:200px;">
|
||||
@@ -317,6 +391,7 @@ function comicpress_admin_options() {
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
61
search.php
61
search.php
@@ -6,50 +6,71 @@ $count = 'No';
|
||||
if ( have_posts() ) :
|
||||
$count = $wp_query->found_posts;
|
||||
?>
|
||||
|
||||
<h2 class="page-title">
|
||||
|
||||
<?php
|
||||
_e( 'Search for ‘', 'comicpress' );
|
||||
the_search_query();
|
||||
_e( '’', 'comicpress'
|
||||
);
|
||||
?>
|
||||
|
||||
</h2>
|
||||
|
||||
<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 <?php post_class(); ?>>
|
||||
|
||||
<div class="post-head"></div>
|
||||
<div class="entry">
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="post-foot"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
while ( have_posts() ) :
|
||||
@@ -59,15 +80,22 @@ if ( have_posts() ) :
|
||||
endwhile;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php
|
||||
comicpress_pagination();
|
||||
else :
|
||||
?>
|
||||
|
||||
<div class="post post-search uentry type-page">
|
||||
|
||||
<div class="post-head"></div>
|
||||
|
||||
<div class="post-content">
|
||||
|
||||
<div class="entry">
|
||||
|
||||
<h3>
|
||||
<?php _e( 'No results found.', 'comicpress' ); ?>
|
||||
</h3>
|
||||
@@ -77,10 +105,15 @@ if ( have_posts() ) :
|
||||
<p>
|
||||
<?php get_search_form(); ?>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="post-foot"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user