mirror of
https://github.com/Frumph/comicpress.git
synced 2026-01-31 02:05:17 +01:00
Reduce WP Coding Standards Messages Part 4
no changes in functions, fixed transalatable strings
This commit is contained in:
48
archive.php
48
archive.php
@@ -61,14 +61,17 @@ if ( $count > 0 ) {
|
||||
$title_string = __( 'Archive is unable to be found.', 'comicpress' );
|
||||
}
|
||||
} else $title_string = __( 'No Archive Found.', 'comicpress' );
|
||||
if ( have_posts() ) { ?>
|
||||
if ( have_posts() ) {
|
||||
?>
|
||||
<h2 class="page-title"><?php echo $title_string; ?></h2>
|
||||
<?php if ( isset( $wp_query->query_vars['chapters'] ) || ( $wp_query->query_vars['post_type'] == 'comic' ) ) { ?>
|
||||
<?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 */
|
||||
_n( '%d comic.', '%d comics.', $count, 'comicpress' ),
|
||||
_n( '%d comic', '%d comics', 'comicpress' ),
|
||||
$count
|
||||
);
|
||||
?>
|
||||
@@ -80,17 +83,17 @@ if ( have_posts() ) { ?>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: Number of found results */
|
||||
_n( '%d result.', '%d results.', $count, 'comicpress' ),
|
||||
_n( '%d result', '%d results', 'comicpress' ),
|
||||
$count
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?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() ) ) {
|
||||
?>
|
||||
<?php
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
?>
|
||||
@@ -101,12 +104,14 @@ if ( have_posts() ) { ?>
|
||||
<div class="archivecomicframe">
|
||||
<?php
|
||||
$thumbnail = ceo_display_comic_thumbnail( 'thumbnail', $post );
|
||||
$thumbnail = ( ! $thumbnail ) ? __( 'No Thumbnail or Featured Image Found', 'comicpress' ) : $thumbnail; ?>
|
||||
$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 />
|
||||
</div>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<?php } elseif ( comicpress_themeinfo( 'display_archive_as_links' ) || comicpress_is_bbpress() ) { ?>
|
||||
<?php
|
||||
endwhile;
|
||||
} elseif ( comicpress_themeinfo( 'display_archive_as_links' ) || comicpress_is_bbpress() ) { ?>
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="entry">
|
||||
@@ -124,12 +129,15 @@ if ( have_posts() ) { ?>
|
||||
<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; ?>
|
||||
<?php
|
||||
endwhile;
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php } else {
|
||||
<?php
|
||||
} else {
|
||||
while (have_posts() ) : the_post();
|
||||
$post_format = ( $post->post_type !== 'post' ) ? $post->post_type : get_post_format();
|
||||
get_template_part( 'content', $post_format );
|
||||
@@ -137,9 +145,10 @@ if ( have_posts() ) { ?>
|
||||
}
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
<?php comicpress_pagination(); ?>
|
||||
|
||||
<?php } else { ?>
|
||||
<?php
|
||||
comicpress_pagination();
|
||||
} else {
|
||||
?>
|
||||
<h2 class="page-title">
|
||||
<?php echo $title_string; ?>
|
||||
</h2>
|
||||
@@ -147,12 +156,13 @@ if ( have_posts() ) { ?>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: Number of found results */
|
||||
_n( '%d result.', '%d results.', $count, 'comicpress' ),
|
||||
_n( '%d result', '%d results', 'comicpress' ),
|
||||
$count
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<?php } ?>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
<?php
|
||||
}
|
||||
get_footer();
|
||||
?>
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (!function_exists('comicpress_random_default_avatar')) {
|
||||
function comicpress_random_default_avatar($id_or_email = '') {
|
||||
$current_avatar_directory = comicpress_themeinfo('avatar_directory');
|
||||
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')) {
|
||||
if (is_dir(get_stylesheet_directory() . '/images/avatars/' . $current_avatar_directory)) {
|
||||
$count = count($results = glob(get_stylesheet_directory() . '/images/avatars/'.$current_avatar_directory.'/*'));
|
||||
if ( ! empty( $current_avatar_directory ) && ( $current_avatar_directory !== 'none' ) ) {
|
||||
if ( is_dir( get_stylesheet_directory() . '/images/avatars/' . $current_avatar_directory) ) {
|
||||
$count = count( $results = glob( get_stylesheet_directory() . '/images/avatars/' . $current_avatar_directory . '/*') );
|
||||
$blogurl = get_stylesheet_directory_uri();
|
||||
} else {
|
||||
$count = count($results = glob(get_template_directory() . '/images/avatars/'.$current_avatar_directory.'/*'));
|
||||
$count = count( $results = glob( get_template_directory() . '/images/avatars/' . $current_avatar_directory . '/*') );
|
||||
$blogurl = get_template_directory_uri();
|
||||
}
|
||||
if ($count) {
|
||||
if ( $count ) {
|
||||
$default = '';
|
||||
|
||||
$checknum = hexdec(substr(md5($id_or_email),0,5)) % $count;
|
||||
if ($count > 0) {
|
||||
$default = basename($results[(int)$checknum]);
|
||||
$checknum = hexdec( substr( md5( $id_or_email ), 0, 5 ) ) % $count;
|
||||
if ( $count > 0 ) {
|
||||
$default = basename( $results[ (int) $checknum] );
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return $blogurl.'/images/avatars/'.$current_avatar_directory.'/'.$default;
|
||||
return $blogurl . '/images/avatars/' . $current_avatar_directory . '/' . $default;
|
||||
}
|
||||
}
|
||||
return get_option('avatar_default');
|
||||
return get_option( 'avatar_default' );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,38 +5,39 @@
|
||||
* Author URI: http://frumph.net/
|
||||
* Version: 1.0.8
|
||||
*
|
||||
* @package Comicpress
|
||||
*/
|
||||
|
||||
add_filter('body_class','comicpress_body_class');
|
||||
add_filter( 'body_class', 'comicpress_body_class' );
|
||||
|
||||
function comicpress_body_class($classes = array()) {
|
||||
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()) {
|
||||
if ( is_user_logged_in() ) {
|
||||
$current_user = wp_get_current_user();
|
||||
$user_login = $current_user->user_login;
|
||||
if (!empty($user_login)) $classes[] = 'user-'.strtolower($user_login);
|
||||
$user_login = $current_user->user_login;
|
||||
if ( ! empty( $user_login ) ) $classes[] = 'user-' . strtolower( $user_login );
|
||||
} else {
|
||||
$classes[] = 'user-guest';
|
||||
}
|
||||
|
||||
if (comicpress_is_signup()) $classes[] = 'signup';
|
||||
if ( comicpress_is_signup() ) $classes[] = 'signup';
|
||||
|
||||
if($is_lynx) $classes[] = 'lynx';
|
||||
elseif($is_gecko) $classes[] = 'gecko';
|
||||
elseif($is_opera) $classes[] = 'opera';
|
||||
elseif($is_NS4) $classes[] = 'ns4';
|
||||
elseif($is_safari) $classes[] = 'safari';
|
||||
elseif($is_chrome) $classes[] = 'chrome';
|
||||
elseif($is_IE) $classes[] = 'ie';
|
||||
else $classes[] = 'unknown';
|
||||
if($is_iphone) $classes[] = 'iphone';
|
||||
if (wp_is_mobile()) $classes[] = 'is-mobile';
|
||||
if ( $is_lynx ) $classes[] = 'lynx';
|
||||
elseif ( $is_gecko ) $classes[] = 'gecko';
|
||||
elseif ( $is_opera ) $classes[] = 'opera';
|
||||
elseif ( $is_NS4 ) $classes[] = 'ns4';
|
||||
elseif ( $is_safari ) $classes[] = 'safari';
|
||||
elseif ( $is_chrome ) $classes[] = 'chrome';
|
||||
elseif ( $is_IE ) $classes[] = 'ie';
|
||||
else $classes[] = 'unknown';
|
||||
if ( $is_iphone ) $classes[] = 'iphone';
|
||||
if ( wp_is_mobile() ) $classes[] = 'is-mobile';
|
||||
|
||||
|
||||
// Hijacked from the hybrid theme, http://themehybrid.com/
|
||||
if (is_single()) {
|
||||
foreach ( (array)get_the_category( $wp_query->post->ID ) as $cat ) :
|
||||
// Hijacked from the hybrid theme, http://themehybrid.com/ .
|
||||
if ( is_single() ) {
|
||||
foreach ( (array) get_the_category( $wp_query->post->ID ) as $cat ) :
|
||||
$classes[] = 'single-category-' . sanitize_html_class( $cat->slug, $cat->term_id );
|
||||
endforeach;
|
||||
$classes[] = 'single-author-' . get_the_author_meta( 'user_nicename', $wp_query->post->post_author );
|
||||
@@ -51,21 +52,21 @@ function comicpress_body_class($classes = array()) {
|
||||
$classes[] = 'sticky-post';
|
||||
}
|
||||
|
||||
// NOT hijacked from anything, doi! people should do this.
|
||||
$timestamp = current_time('timestamp');
|
||||
$rightnow = (int)date('Gi',$timestamp);
|
||||
$ampm = date('a', $timestamp);
|
||||
// NOT hijacked from anything, doi! people should do this.
|
||||
$timestamp = current_time( 'timestamp' );
|
||||
$rightnow = (int) date( 'Gi',$timestamp );
|
||||
$ampm = date( 'a', $timestamp );
|
||||
$classes[] = $ampm;
|
||||
// $classes[] = 'time-'.$rightnow;
|
||||
if ($rightnow > 559 && (int)$rightnow < 1800) $classes[] = 'day';
|
||||
if ($rightnow < 600 || (int)$rightnow > 1759) $classes[] = 'night';
|
||||
// $classes[] = 'time-'.$rightnow;
|
||||
if ( $rightnow > 559 && (int) $rightnow < 1800 ) $classes[] = 'day';
|
||||
if ( $rightnow < 600 || (int )$rightnow > 1759 ) $classes[] = 'night';
|
||||
|
||||
if ($rightnow > 2329 || $rightnow < 30) $classes[] = 'midnight';
|
||||
if ($rightnow > 459 && $rightnow < 1130) $classes[] = 'morning';
|
||||
if ($rightnow > 1129 && $rightnow < 1230) $classes[] = 'noon';
|
||||
if ($rightnow > 1759 && $rightnow < 2330) $classes[] = 'evening';
|
||||
if ( $rightnow > 2329 || $rightnow < 30 ) $classes[] = 'midnight';
|
||||
if ( $rightnow > 459 && $rightnow < 1130 ) $classes[] = 'morning';
|
||||
if ( $rightnow > 1129 && $rightnow < 1230 ) $classes[] = 'noon';
|
||||
if ( $rightnow > 1759 && $rightnow < 2330 ) $classes[] = 'evening';
|
||||
|
||||
$classes[] = strtolower(date('D', $timestamp));
|
||||
$classes[] = strtolower( date( 'D', $timestamp ) );
|
||||
|
||||
if ( is_attachment() ) {
|
||||
$classes[] = 'attachment attachment-' . $wp_query->post->ID;
|
||||
@@ -75,23 +76,26 @@ function comicpress_body_class($classes = array()) {
|
||||
endforeach;
|
||||
}
|
||||
|
||||
if (comicpress_sidebars_disabled()) $classes[] = 'wide';
|
||||
if ( comicpress_sidebars_disabled() ) $classes[] = 'wide';
|
||||
|
||||
$layout = get_theme_mod('comicpress-customize-select-layout', '3c');
|
||||
if (empty($layout)) $layout = '3c';
|
||||
$classes[] = 'layout-'.$layout;
|
||||
$layout = get_theme_mod( 'comicpress-customize-select-layout', '3c' );
|
||||
if ( empty( $layout ) ) $layout = '3c';
|
||||
$classes[] = 'layout-' . $layout;
|
||||
|
||||
return $classes;
|
||||
}
|
||||
|
||||
add_filter('post_class','comicpress_post_class');
|
||||
add_filter( 'post_class', 'comicpress_post_class' );
|
||||
|
||||
function comicpress_post_class($classes = '') {
|
||||
function comicpress_post_class( $classes = '' ) {
|
||||
global $post;
|
||||
static $post_alt;
|
||||
|
||||
$args = array(
|
||||
'entry_tax' => array( 'category', 'post_tag' )
|
||||
'entry_tax' => array(
|
||||
'category',
|
||||
'post_tag',
|
||||
)
|
||||
);
|
||||
|
||||
/* Microformats. */
|
||||
@@ -102,22 +106,21 @@ function comicpress_post_class($classes = '') {
|
||||
|
||||
if ( $post_alt % 2 )
|
||||
$classes[] = 'odd';
|
||||
else
|
||||
$classes[] = 'even';
|
||||
else $classes[] = 'even';
|
||||
|
||||
/* Sticky class (only on home/blog page). */
|
||||
if( is_sticky() && is_home() )
|
||||
$classes[] = 'sticky';
|
||||
|
||||
/* Author class. */
|
||||
if ( !is_attachment() )
|
||||
if ( ! is_attachment() )
|
||||
$classes[] = 'post-author-' . sanitize_html_class( get_the_author_meta( 'user_nicename' ), get_the_author_meta( 'ID' ) );
|
||||
|
||||
/* User-created classes. */
|
||||
if ( !empty( $class ) ) :
|
||||
if ( !is_array( $class ) )
|
||||
if ( ! empty( $class ) ) :
|
||||
if ( ! is_array( $class ) )
|
||||
$class = preg_split( '#\s+#', $class );
|
||||
$classes = array_merge( $classes, $class );
|
||||
$classes = array_merge( $classes, $class );
|
||||
endif;
|
||||
|
||||
/* Password-protected posts. */
|
||||
@@ -127,22 +130,20 @@ function comicpress_post_class($classes = '') {
|
||||
return $classes;
|
||||
}
|
||||
|
||||
add_filter('comment_class','comicpress_comment_class');
|
||||
add_filter( 'comment_class', 'comicpress_comment_class' );
|
||||
|
||||
function comicpress_comment_class($classes = '') {
|
||||
function comicpress_comment_class( $classes = '' ) {
|
||||
global $current_user;
|
||||
/*
|
||||
* http://microid.org
|
||||
*/
|
||||
|
||||
/* http://microid.org */
|
||||
|
||||
$email = get_comment_author_email();
|
||||
$url = get_comment_author_url();
|
||||
if(!empty($email) && !empty($url)) {
|
||||
$microid = 'microid-mailto+http:sha1:' . sha1(sha1('mailto:'.$email).sha1($url));
|
||||
if ( ! empty( $email ) && ! empty( $url ) ) {
|
||||
$microid = 'microid-mailto+http:sha1:' . sha1( sha1( 'mailto:' . $email) . sha1( $url ) );
|
||||
$classes[] = $microid;
|
||||
}
|
||||
if ($current_user->user_email == $email) $classes[] = 'ucomment';
|
||||
if ( $current_user->user_email == $email ) $classes[] = 'ucomment';
|
||||
return $classes;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Better display of avatars in comments
|
||||
* Should only be used in comment sections (may update in future)
|
||||
* Checks for false empty commenter URLs 'http://' w/registered users
|
||||
* Adds the class 'photo' to the image
|
||||
* Adds a call to 'images/trackback.jpg' for trackbacks
|
||||
* Adds a call to 'images/pingback.jpg' for pingbacks
|
||||
*
|
||||
* Filters should only return a string for an image URL for the avatar with class $avatar
|
||||
* They should not get the avatar as this is done after the filter
|
||||
*
|
||||
* @since 0.2
|
||||
* @filter
|
||||
*/
|
||||
* Better display of avatars in comments
|
||||
* Should only be used in comment sections (may update in future)
|
||||
* Checks for false empty commenter URLs 'http://' w/registered users
|
||||
* Adds the class 'photo' to the image
|
||||
* Adds a call to 'images/trackback.jpg' for trackbacks
|
||||
* Adds a call to 'images/pingback.jpg' for pingbacks
|
||||
*
|
||||
* Filters should only return a string for an image URL for the avatar with class $avatar
|
||||
* They should not get the avatar as this is done after the filter
|
||||
*
|
||||
* @since 0.2
|
||||
* @filter
|
||||
*/
|
||||
function comicpress_avatar() {
|
||||
global $comment;
|
||||
|
||||
@@ -21,23 +21,22 @@ function comicpress_avatar() {
|
||||
|
||||
$comment_type = get_comment_type();
|
||||
|
||||
if ($comment_type != 'pingback' && $comment_type != 'trackback') {
|
||||
if ( $comment_type != 'pingback' && $comment_type != 'trackback' ) {
|
||||
|
||||
echo '<div class="comment-avatar">';
|
||||
if($url == true && $url != 'http://')
|
||||
echo '<a href="' . $url . '" rel="external nofollow" title="' . esc_html(get_comment_author()) . '">';
|
||||
if ( $url == true && $url != 'http://' )
|
||||
echo '<a href="' . $url . '" rel="external nofollow" title="' . esc_html( get_comment_author() ) . '">';
|
||||
$id_or_email = get_comment_author_email();
|
||||
if (empty($id_or_email)) $id_or_email = get_comment_author();
|
||||
if ( empty( $id_or_email ) ) $id_or_email = get_comment_author();
|
||||
|
||||
$current_avatar_directory = comicpress_themeinfo('avatar_directory');
|
||||
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);
|
||||
$current_avatar_directory = comicpress_themeinfo( 'avatar_directory' );
|
||||
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);
|
||||
echo $return_str;
|
||||
if($url == true && $url != 'http://')
|
||||
if( $url == true && $url != 'http://' )
|
||||
echo '</a>';
|
||||
echo '</div>';
|
||||
}
|
||||
@@ -45,13 +44,13 @@ function comicpress_avatar() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Properly displays comment author name/link
|
||||
* bbPress and other external systems sometimes don't set a display name for registrations
|
||||
* WP has problems if no display name is set
|
||||
* WP gives registered users URL of 'http://' if none is set
|
||||
*
|
||||
* @since 0.2.2
|
||||
*/
|
||||
* Properly displays comment author name/link
|
||||
* bbPress and other external systems sometimes don't set a display name for registrations
|
||||
* WP has problems if no display name is set
|
||||
* WP gives registered users URL of 'http://' if none is set
|
||||
*
|
||||
* @since 0.2.2
|
||||
*/
|
||||
function comicpress_comment_author() {
|
||||
global $comment;
|
||||
|
||||
@@ -61,7 +60,7 @@ function comicpress_comment_author() {
|
||||
/*
|
||||
* Registered members w/o URL defaults to 'http://'
|
||||
*/
|
||||
if($url == 'http://')
|
||||
if ( $url == 'http://' )
|
||||
$url = false;
|
||||
|
||||
/*
|
||||
@@ -69,25 +68,24 @@ function comicpress_comment_author() {
|
||||
* Bug with bbPress 0.9 series and WP 2.5 (no later testing)
|
||||
* 'Anonymous' should be localized according to WP, not the theme
|
||||
*/
|
||||
if(is_object($comment) && ($comment->user_id > 0) && !$author) :
|
||||
$user = get_userdata($comment->user_id);
|
||||
if($user->display_name)
|
||||
$author = $user->display_name;
|
||||
elseif($user->user_nickname)
|
||||
$author = $user->nickname;
|
||||
elseif($user->user_nicename)
|
||||
$author = $user->user_nicename;
|
||||
else
|
||||
$author = $user->user_login;
|
||||
if ( is_object( $comment ) && ( $comment->user_id > 0 ) && ! $author ) :
|
||||
$user = get_userdata( $comment->user_id );
|
||||
if ( $user->display_name )
|
||||
$author = $user->display_name;
|
||||
elseif ( $user->user_nickname )
|
||||
$author = $user->nickname;
|
||||
elseif ( $user->user_nicename )
|
||||
$author = $user->user_nicename;
|
||||
else $author = $user->user_login;
|
||||
endif;
|
||||
|
||||
/*
|
||||
* Display link and cite if URL is set
|
||||
* Also properly cites trackbacks/pingbacks
|
||||
*/
|
||||
if($url) :
|
||||
if( $url ) :
|
||||
$output = '<cite title="' . $url . '">';
|
||||
$output .= '<a href="' . $url . '" title="' . esc_html($author, 1) . '" class="external nofollow">' . $author . '</a>';
|
||||
$output .= '<a href="' . $url . '" title="' . esc_html( $author, 1 ) . '" class="external nofollow">' . $author . '</a>';
|
||||
$output .= '</cite>';
|
||||
else :
|
||||
$output = '<cite>';
|
||||
@@ -99,18 +97,18 @@ function comicpress_comment_author() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays individual comments
|
||||
* Uses the callback parameter for wp_list_comments
|
||||
* Overwrites the default display of comments
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
function comicpress_comments_callback($comment, $args, $depth) {
|
||||
$GLOBALS['comment'] = $comment;
|
||||
* Displays individual comments
|
||||
* Uses the callback parameter for wp_list_comments
|
||||
* Overwrites the default display of comments
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
function comicpress_comments_callback( $comment, $args, $depth ) {
|
||||
$GLOBALS['comment'] = $comment;
|
||||
$GLOBALS['comment_depth'] = $depth;
|
||||
?>
|
||||
<li id="comment-<?php comment_ID(); ?>" <?php comment_class(); ?>>
|
||||
@@ -125,61 +123,79 @@ function comicpress_comments_callback($comment, $args, $depth) {
|
||||
|
||||
<div class="comment-meta-data">
|
||||
|
||||
<span class="comment-time" title="<?php comment_date('l, F jS Y, g:ia'); ?>">
|
||||
<span class="comment-time" title="<?php comment_date( 'l, F jS Y, g:ia' ); ?>">
|
||||
<?php
|
||||
/* translators: 1: Date 2: Time in comments */
|
||||
printf(__( '%1$s, %2$s', 'comicpress' ), get_comment_date(), get_comment_time()); ?>
|
||||
printf(
|
||||
/* translators: 1: Date 2: Time in comments */
|
||||
__( '%1$s, %2$s', 'comicpress' ),
|
||||
get_comment_date(),
|
||||
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 if((get_option('thread_comments')) && ($args['type'] == 'all' || get_comment_type() == 'comment')) :
|
||||
$max_depth = get_option('thread_comments_depth');
|
||||
echo comment_reply_link(array(
|
||||
<?php
|
||||
if ( (get_option( 'thread_comments' ) ) && ($args['type'] == 'all' || get_comment_type() == 'comment' ) ) :
|
||||
$max_depth = get_option( 'thread_comments_depth' );
|
||||
echo comment_reply_link( array(
|
||||
'reply_text' => __( 'Reply', 'comicpress' ),
|
||||
'login_text' => __( 'Login to Reply', 'comicpress' ),
|
||||
'depth' => $depth,
|
||||
'max_depth' => $max_depth,
|
||||
'before' => '<span class="comment-reply-link"><span class="separator">|</span> ',
|
||||
'after' => '</span>'
|
||||
));
|
||||
endif; ?>
|
||||
'depth' => $depth,
|
||||
'max_depth' => $max_depth,
|
||||
'before' => '<span class="comment-reply-link"><span class="separator">|</span> ',
|
||||
'after' => '</span>',
|
||||
)
|
||||
);
|
||||
endif;
|
||||
|
||||
<?php edit_comment_link('<span class="comment-edit">'.__( 'Edit', 'comicpress' ).'</span>',' <span class="separator">|</span> ',''); ?>
|
||||
edit_comment_link( '<span class="comment-edit">' . __( 'Edit', 'comicpress' ) . '</span>',' <span class="separator">|</span> ','' );
|
||||
|
||||
<?php if ($comment->comment_approved == '0') : ?>
|
||||
<div class="comment-moderated"><?php _e( 'Your comment is awaiting moderation.', 'comicpress' ); ?></div>
|
||||
<?php endif; ?>
|
||||
if ( $comment->comment_approved == '0' ) :
|
||||
?>
|
||||
<div class="comment-moderated">
|
||||
<?php _e( 'Your comment is awaiting moderation.', 'comicpress' ); ?>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if (get_comment_type() == 'comment') { ?>
|
||||
<?php
|
||||
if ( get_comment_type() == 'comment' ) {
|
||||
?>
|
||||
<div class="comment-text">
|
||||
<?php comment_text(); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php }
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Ends the display of individual comments
|
||||
* Uses the callback parameter for wp_list_comments
|
||||
* Needs to be used in conjunction with comicpress_comments_callback
|
||||
* Not needed but used just in case something is changed
|
||||
*
|
||||
* @since 0.2.3
|
||||
*/
|
||||
* Ends the display of individual comments
|
||||
* Uses the callback parameter for wp_list_comments
|
||||
* Needs to be used in conjunction with comicpress_comments_callback
|
||||
* Not needed but used just in case something is changed
|
||||
*
|
||||
* @since 0.2.3
|
||||
*/
|
||||
function comicpress_comments_end_callback() {
|
||||
echo '</li>';
|
||||
}
|
||||
|
||||
function list_pings($comment, $args, $depth) {
|
||||
$GLOBALS['comment'] = $comment; ?>
|
||||
function list_pings( $comment, $args, $depth ) {
|
||||
$GLOBALS['comment'] = $comment;
|
||||
?>
|
||||
<li id="comment-<?php comment_ID(); ?>"><?php comicpress_comment_author(); ?></li>
|
||||
<?php }
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
<?php
|
||||
|
||||
if (!function_exists('comicpress_copyright_text')) {
|
||||
if ( ! function_exists( 'comicpress_copyright_text' ) ) {
|
||||
function comicpress_copyright_text() {
|
||||
$output = "<p class=\"copyright-info\">\r\n";
|
||||
$output = "<p class=\"copyright-info\">\r\n";
|
||||
$output .= comicpress_copyright_info();
|
||||
$output .= "<span class=\"footer-pipe\">|</span> ";
|
||||
$output .= __( 'Powered by', 'comicpress' ) . " <a href=\"http://wordpress.org/\">WordPress</a> " . __( 'with', 'comicpress' ) . " <a href=\"http://frumph.net\">ComicPress</a>\r\n";
|
||||
$output .= comicpress_hosted_on();
|
||||
$output .= "<span class=\"footer-subscribe\">";
|
||||
$output .= "<span class=\"footer-pipe\">|</span> ";
|
||||
$output .= __( 'Subscribe:', 'comicpress' ) . "<a href=\"" . get_bloginfo('rss2_url') ."\">" . __( 'RSS', 'comicpress' ) . "</a>\r\n";
|
||||
$output .= "<span class=\"footer-pipe\">|</span> ";
|
||||
$output .= __( 'Subscribe:', 'comicpress' ) . "<a href=\"" . get_bloginfo('rss2_url') . "\">" . __( 'RSS', 'comicpress' ) . "</a>\r\n";
|
||||
$output .= "</span>\r\n";
|
||||
if (!comicpress_themeinfo('disable_scroll_to_top')) {
|
||||
if ( ! comicpress_themeinfo( 'disable_scroll_to_top' ) ) {
|
||||
$output .= "<span class=\"footer-uptotop\">";
|
||||
$output .= "<span class=\"footer-pipe\">|</span> ";
|
||||
$output .= "<a href=\"\" onclick=\"scrollup(); return false;\">" . __( 'Back to Top ↑', 'comicpress' ) . "</a>";
|
||||
$output .="</span>\r\n";
|
||||
$output .= "<span class=\"footer-pipe\">|</span> ";
|
||||
$output .= "<a href=\"\" onclick=\"scrollup(); return false;\">" . __( 'Back to Top ↑', 'comicpress' ) . "</a>";
|
||||
$output .= "</span>\r\n";
|
||||
}
|
||||
$output .= "</p>\r\n";
|
||||
echo apply_filters('comicpress_copyright_text', $output);
|
||||
echo apply_filters( 'comicpress_copyright_text', $output );
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('comicpress_hosted_on')) {
|
||||
if ( ! function_exists( 'comicpress_hosted_on' ) ) {
|
||||
function comicpress_hosted_on() {
|
||||
if (is_multisite()) {
|
||||
if ( is_multisite() ) {
|
||||
$current_site = get_current_site();
|
||||
if (!isset($current_site->site_name)) {
|
||||
if ( ! isset( $current_site->site_name ) ) {
|
||||
$site_name = ucfirst( $current_site->domain );
|
||||
} else {
|
||||
$site_name = $current_site->site_name;
|
||||
}
|
||||
$output = "<span class=\"copyright-pipe\">|</span> ";
|
||||
$output .= __( 'Hosted on', 'comicpress' ) . ' <a href="http://' . $current_site->domain. $current_site->path. '">'. $site_name. '</a> ';
|
||||
return apply_filters('comicpress_hosted_on', $output);
|
||||
$output .= __( 'Hosted on', 'comicpress' ) . ' <a href="http://' . $current_site->domain. $current_site->path . '">'. $site_name . '</a> ';
|
||||
return apply_filters( 'comicpress_hosted_on', $output );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('comicpress_copyright_info')) {
|
||||
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');
|
||||
if (empty($copyright_url)) $copyright_url = home_url();
|
||||
$copyright = __( '©', 'comicpress' ). comicpress_copyright_dates() . ' ' . apply_filters('comicpress_copyright_info_name', '<a href="'.$copyright_url.'">' . $copyright_name . '</a>') . ' ';
|
||||
return apply_filters('comicpress_copyright_info', $copyright);
|
||||
$copyright_name = comicpress_themeinfo( 'copyright_name' );
|
||||
if ( empty( $copyright_name ) ) $copyright_name = get_bloginfo( 'name' );
|
||||
$copyright_url = comicpress_themeinfo( 'copyright_url' );
|
||||
if ( empty( $copyright_url ) ) $copyright_url = home_url();
|
||||
$copyright = __( '©', 'comicpress' ) . comicpress_copyright_dates() . ' ' . apply_filters( 'comicpress_copyright_info_name', '<a href="'.$copyright_url.'">' . $copyright_name . '</a>' ) . ' ';
|
||||
return apply_filters( 'comicpress_copyright_info', $copyright );
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('comicpress_copyright_dates')) {
|
||||
if ( ! function_exists( 'comicpress_copyright_dates' ) ) {
|
||||
function comicpress_copyright_dates() {
|
||||
global $wpdb;
|
||||
$copyright_dates = $wpdb->get_results("
|
||||
@@ -62,15 +62,14 @@ if (!function_exists('comicpress_copyright_dates')) {
|
||||
post_status = 'publish'
|
||||
");
|
||||
$output = '';
|
||||
if ($copyright_dates) {
|
||||
if ( $copyright_dates ) {
|
||||
$copyright = $copyright_dates[0]->firstdate;
|
||||
if($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate) {
|
||||
if ( $copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate ) {
|
||||
$copyright .= '-' . $copyright_dates[0]->lastdate;
|
||||
}
|
||||
$output = $copyright;
|
||||
}
|
||||
return apply_filters('comicpress_copyright_dates', $output);
|
||||
return apply_filters( 'comicpress_copyright_dates', $output );
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
<?php
|
||||
|
||||
if ( isset( $_GET['latestblogpost'] ) )
|
||||
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)) {
|
||||
if ( isset( $_GET['latestblogpost'] ) ) $catnum = (int) esc_attr( $_GET['latestblogpost'] );
|
||||
if ( ! empty( $catnum ) ) {
|
||||
$args = array(
|
||||
'numberposts' => 1,
|
||||
'post_type' => 'post',
|
||||
'orderby' => 'post_date',
|
||||
'order' => 'DESC',
|
||||
'post_status' => 'publish',
|
||||
'category__in' => array($catnum)
|
||||
);
|
||||
'numberposts' => 1,
|
||||
'post_type' => 'post',
|
||||
'orderby' => 'post_date',
|
||||
'order' => 'DESC',
|
||||
'post_status' => 'publish',
|
||||
'category__in' => array($catnum),
|
||||
);
|
||||
$qposts = get_posts( $args );
|
||||
} else {
|
||||
$args = array(
|
||||
'numberposts' => 1,
|
||||
'post_type' => 'post',
|
||||
'orderby' => 'post_date',
|
||||
'order' => 'DESC',
|
||||
'post_status' => 'publish'
|
||||
);
|
||||
'numberposts' => 1,
|
||||
'post_type' => 'post',
|
||||
'orderby' => 'post_date',
|
||||
'order' => 'DESC',
|
||||
'post_status' => 'publish',
|
||||
);
|
||||
$qposts = get_posts( $args );
|
||||
}
|
||||
if (is_array($qposts)) {
|
||||
$qposts = reset($qposts);
|
||||
if ( is_array( $qposts ) ) {
|
||||
$qposts = reset( $qposts );
|
||||
wp_redirect( get_permalink( $qposts->ID ) );
|
||||
} else {
|
||||
wp_redirect( home_url() );
|
||||
@@ -36,241 +36,270 @@ function comicpress_latest_blog_post_jump() {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!function_exists('comicpress_display_post_title')) {
|
||||
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
|
||||
if ((comicpress_themeinfo('disable_page_titles') && is_page()) || (comicpress_themeinfo('disable_post_titles') && !is_page()) || (is_page('chat') || is_page('forum'))) return;
|
||||
if (is_page()) {
|
||||
if ( ( $post->post_type == 'page' ) && is_front_page() ) return; // Don't display the title on static home pages.
|
||||
if ( ( comicpress_themeinfo( 'disable_page_titles' ) && is_page() ) || ( comicpress_themeinfo( 'disable_post_titles' ) && ! is_page() ) || (is_page( 'chat' ) || is_page( 'forum' ) ) ) return;
|
||||
if ( is_page() ) {
|
||||
$post_title = "<h2 class=\"page-title\">";
|
||||
} else {
|
||||
$post_title = "<h2 class=\"post-title\">";
|
||||
}
|
||||
if ((is_page_template('blog.php') || is_home() || is_front_page() || is_archive() || is_search()) && ($post->post_type != 'page')) $post_title .= "<a href=\"".get_permalink()."\">";
|
||||
if ( ( is_page_template( 'blog.php' ) || is_home() || is_front_page() || is_archive() || is_search() ) && ( $post->post_type != 'page') ) $post_title .= "<a href=\"".get_permalink()."\">";
|
||||
$get_post_title .= get_the_title();
|
||||
if (!$get_post_title) $get_post_title = '( No Title )';
|
||||
if ( ! $get_post_title ) $get_post_title = '( No Title )';
|
||||
$post_title .= $get_post_title;
|
||||
if ((is_page_template('blog.php') || is_home() || is_front_page() || is_archive() || is_search()) && ($post->post_type != 'page')) $post_title .= "</a>";
|
||||
if ( ( is_page_template('blog.php') || is_home() || is_front_page() || is_archive() || is_search() ) && ( $post->post_type != 'page') ) $post_title .= "</a>";
|
||||
$post_title .= "</h2>\r\n";
|
||||
echo apply_filters('comicpress_display_post_title',$post_title);
|
||||
echo apply_filters( 'comicpress_display_post_title ', $post_title );
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('comicpress_display_post_thumbnail')) {
|
||||
function comicpress_display_post_thumbnail($size = 'thumbnail') {
|
||||
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 = '';
|
||||
$link = get_post_meta( $post->ID, 'link', true );
|
||||
if (empty($link)) $link = get_permalink();
|
||||
if ( $post->post_type == 'post' ) {
|
||||
$post_thumbnail = '';
|
||||
$link = get_post_meta( $post->ID, 'link', true );
|
||||
if ( empty( $link ) ) $link = get_permalink();
|
||||
if ( has_post_thumbnail() ) {
|
||||
if (is_home()) {
|
||||
$post_thumbnail = '<div class="post-image"><center><a href="'.$link.'" rel="featured-image" title="Link to '.get_the_title().'">'.get_the_post_thumbnail($post->ID, $size).'</a></center></div>'."\r\n";
|
||||
if ( is_home() ) {
|
||||
$post_thumbnail = '<div class="post-image"><center><a href="'.$link.'" rel="featured-image" title="Link to ' . get_the_title() . '">' . get_the_post_thumbnail( $post->ID, $size ) . '</a></center></div>'."\r\n";
|
||||
} else
|
||||
$post_thumbnail = '<div class="post-image"><center>'.get_the_post_thumbnail($post->ID, $size).'</center></div>'."\r\n";
|
||||
$post_thumbnail = '<div class="post-image"><center>' . get_the_post_thumbnail( $post->ID, $size ) . '</center></div>'."\r\n";
|
||||
} else {
|
||||
$url_image = get_post_meta($post->ID, 'featured-image', true);
|
||||
if (!empty($url_image)) $post_thumbnail = '<div class="post-image"><center><a href="'.$link.'" rel="featured-image" title="Link to "'.get_the_title().'"><img src="'.$url_image.'" title="'.get_the_title().'" alt="'.get_the_title().'"></a></center></div>'."\r\n";
|
||||
if ( ! empty( $url_image ) ) $post_thumbnail = '<div class="post-image"><center><a href="' . $link . '" rel="featured-image" title="Link to "' . get_the_title() . '"><img src="' . $url_image . '" title="' . get_the_title() .'" alt="' . get_the_title() . '"></a></center></div>' . "\r\n";
|
||||
}
|
||||
echo apply_filters('comicpress_display_post_thumbnail', $post_thumbnail);
|
||||
echo apply_filters( 'comicpress_display_post_thumbnail', $post_thumbnail );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('comicpress_display_author_gravatar')) {
|
||||
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')) {
|
||||
$author_get_gravatar = get_avatar(get_the_author_meta('email'), 82, comicpress_random_default_avatar(get_the_author_meta('email'),get_the_author_meta('display_name')));
|
||||
if (!$is_IE) $author_get_gravatar = str_replace('photo', 'photo instant nocorner itxtalt', $author_get_gravatar);
|
||||
$author_gravatar = "<div class=\"post-author-gravatar\">".$author_get_gravatar."</div>\r\n";
|
||||
echo apply_filters('comicpress_display_author_gravatar', $author_gravatar);
|
||||
if ( is_page() ) return;
|
||||
if ( comicpress_themeinfo( 'enable_post_author_gravatar' ) ) {
|
||||
$author_get_gravatar = get_avatar(get_the_author_meta( 'email '), 82, comicpress_random_default_avatar( get_the_author_meta(' email' ), get_the_author_meta( 'display_name' ) ) );
|
||||
if ( ! $is_IE ) $author_get_gravatar = str_replace( 'photo', 'photo instant nocorner itxtalt', $author_get_gravatar );
|
||||
$author_gravatar = "<div class=\"post-author-gravatar\">" . $author_get_gravatar . "</div>\r\n";
|
||||
echo apply_filters( 'comicpress_display_author_gravatar', $author_gravatar );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('comicpress_display_post_calendar')) {
|
||||
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')) {
|
||||
$post_calendar = "<div class=\"post-calendar-date\"><div class=\"calendar-date\"><span>".get_the_time('M')."</span>".get_the_time('d')."</div></div>\r\n";
|
||||
echo apply_filters('comicpress_display_post_calendar', $post_calendar);
|
||||
if ( is_page() ) return;
|
||||
if ( comicpress_themeinfo( 'enable_post_calendar') ) {
|
||||
$post_calendar = "<div class=\"post-calendar-date\"><div class=\"calendar-date\"><span>" . get_the_time(' M' ) . "</span>" . get_the_time( 'd' ) . "</div></div>\r\n";
|
||||
echo apply_filters( 'comicpress_display_post_calendar', $post_calendar );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('comicpress_display_post_author')) {
|
||||
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";
|
||||
echo apply_filters('comicpress_display_post_author',$post_author);
|
||||
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";
|
||||
echo apply_filters( 'comicpress_display_post_author', $post_author );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('comicpress_display_post_date')) {
|
||||
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";
|
||||
echo apply_filters('comicpress_display_post_date',$post_date);
|
||||
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";
|
||||
echo apply_filters( 'comicpress_display_post_date', $post_date );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('comicpress_display_post_time')) {
|
||||
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";
|
||||
echo apply_filters('comicpress_display_post_time',$post_time);
|
||||
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";
|
||||
echo apply_filters( 'comicpress_display_post_time', $post_time );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('comicpress_display_modified_date_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');
|
||||
$u_modified_time = get_the_modified_time('U');
|
||||
if ($u_modified_time != $u_time) {
|
||||
$post_date_time = '<span class="posted-last-modified"> '.__( 'and modified on', 'comicpress' ).' '.get_the_modified_date(get_option('date_format')).'. ';
|
||||
if (!comicpress_themeinfo('disable_posted_at_time_in_posts')) $post_date_time .= '<span class="posted-last-modified-time"> '.__( 'at', 'comicpress' ).' '.get_the_modified_time(get_option('time_format')).'</span>'."\r\n";
|
||||
echo apply_filters('comicpress_display_modified_date_time', $post_date_time);
|
||||
if ( ! comicpress_themeinfo( 'disable_date_info_in_posts' ) && comicpress_themeinfo( 'enable_last_modified_in_posts' ) ) {
|
||||
$u_time = get_the_time( 'U' );
|
||||
$u_modified_time = get_the_modified_time( 'U' );
|
||||
if ( $u_modified_time != $u_time ) {
|
||||
$post_date_time = '<span class="posted-last-modified"> ' . __( 'and modified on', 'comicpress' ) . ' ' . get_the_modified_date( get_option( 'date_format' ) ) . '. ';
|
||||
if ( ! comicpress_themeinfo( 'disable_posted_at_time_in_posts' ) ) $post_date_time .= '<span class="posted-last-modified-time"> ' . __( 'at', 'comicpress' ).' ' . get_the_modified_time( get_option( 'time_format' ) ) . '</span>'."\r\n";
|
||||
echo apply_filters( 'comicpress_display_modified_date_time', $post_date_time );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('comicpress_display_post_category')) {
|
||||
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')) {
|
||||
$post_category = "<div class=\"post-cat\">". __( 'Posted In:', 'comicpress' ).' '.get_the_category_list(', ')."</div>\r\n";
|
||||
if ( ! comicpress_is_bbpress() && ! comicpress_themeinfo( 'disable_categories_in_posts' ) && !is_attachment() && ( $post->post_type == 'post' ) ) {
|
||||
$post_category = "<div class=\"post-cat\">" . __( 'Posted In:', 'comicpress' ) . ' ' . get_the_category_list( ', ' ) . "</div>\r\n";
|
||||
}
|
||||
echo apply_filters('comicpress_display_post_category', $post_category);
|
||||
echo apply_filters( 'comicpress_display_post_category', $post_category );
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('comicpress_display_post_tags')) {
|
||||
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";
|
||||
echo apply_filters('comicpress_display_post_tags', $post_tags);
|
||||
if ( ! comicpress_themeinfo( 'disable_tags_in_posts' ) ) {
|
||||
$post_tags = "<div class=\"post-tags\">" . get_the_tag_list( __( '└ Tags: ', 'comicpress' ), ', ', '<br />' ) . "</div>\r\n";
|
||||
echo apply_filters( 'comicpress_display_post_tags', $post_tags );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('comicpress_display_comment_link')) {
|
||||
if ( ! function_exists( 'comicpress_display_comment_link' ) ) {
|
||||
function comicpress_display_comment_link() {
|
||||
global $post;
|
||||
if ($post->comment_status == 'open' && !is_singular()) { ?>
|
||||
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' )); ?>
|
||||
<?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')) {
|
||||
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')) {
|
||||
if ( comicpress_themeinfo( 'enable_comments_on_homepage' ) && ( comicpress_themeinfo( 'home_post_count' ) == '1' ) ) {
|
||||
$temp_single = $wp_query -> is_single;
|
||||
$wp_query -> is_single = true;
|
||||
}
|
||||
if (is_single() && !is_page() && !is_archive() && !is_search() && ($post->post_type == 'post')) { ?>
|
||||
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); ?>
|
||||
<?php next_post_link('<span class="blognav-next">%link</span>',__( 'Next ›', 'comicpress' ), false); ?>
|
||||
<?php previous_post_link( '<span class="blognav-prev">%link</span>',__( '‹ Prev', 'comicpress' ), false ); ?>
|
||||
<?php 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')) {
|
||||
<?php
|
||||
}
|
||||
if ( comicpress_themeinfo( 'enable_comments_on_homepage' ) && ( comicpress_themeinfo( 'home_post_count' ) == '1') ) {
|
||||
$wp_query -> is_single = $temp_single;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('comicpress_display_the_content')) {
|
||||
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');
|
||||
if ( ( is_archive() || is_search() ) && ( comicpress_themeinfo( 'excerpt_or_content_in_archive' ) == 'excerpt' ) && ! comicpress_is_bbpress() ) {
|
||||
do_action( 'comicpress-display-the-content-before' );
|
||||
the_excerpt();
|
||||
do_action('comicpress-display-the-content-after');
|
||||
do_action( 'comicpress-display-the-content-after' );
|
||||
} else {
|
||||
if (!is_single()) { global $more; $more = 0; }
|
||||
do_action('comicpress-display-the-content-before');
|
||||
the_content(__( '↓ Read the rest of this entry...', 'comicpress' ));
|
||||
do_action('comicpress-display-the-content-after');
|
||||
if ( ! is_single() ) {
|
||||
global $more; $more = 0;
|
||||
}
|
||||
do_action( 'comicpress-display-the-content-before' );
|
||||
the_content( __( '↓ Read the rest of this entry...', 'comicpress' ) );
|
||||
do_action( 'comicpress-display-the-content-after' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('comicpress_display_post')) {
|
||||
if ( ! function_exists( 'comicpress_display_post' ) ) {
|
||||
function comicpress_display_post() {
|
||||
global $post, $wp_query;
|
||||
if (!comicpress_is_bbpress()) comicpress_display_blog_navigation(); ?>
|
||||
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-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><?php }
|
||||
if (function_exists('comicpress_show_mood_in_post')) comicpress_show_mood_in_post();
|
||||
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>
|
||||
<?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()) {
|
||||
if ( ! is_page() ) {
|
||||
comicpress_display_post_author();
|
||||
comicpress_display_post_date(); comicpress_display_post_time(); comicpress_display_modified_date_time();
|
||||
if ($post->post_type == 'post') { edit_post_link(__( 'Edit', 'comicpress' ), ' <span class="post-edit">', '</span>'); }
|
||||
comicpress_display_post_date();
|
||||
comicpress_display_post_time();
|
||||
comicpress_display_modified_date_time();
|
||||
if ( $post->post_type == 'post' ) {
|
||||
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(); }
|
||||
do_action('comicpress-post-info');
|
||||
do_action('comic-post-info');
|
||||
} ?>
|
||||
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'); ?>
|
||||
<?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')); ?>
|
||||
<?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()) { ?>
|
||||
<?php
|
||||
if ( ! is_page() ) {
|
||||
?>
|
||||
<div class="post-extras">
|
||||
<?php
|
||||
<?php
|
||||
comicpress_display_post_tags();
|
||||
do_action('comicpress-post-extras');
|
||||
do_action( 'comicpress-post-extras' );
|
||||
comicpress_display_comment_link();
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<?php } else
|
||||
edit_post_link(__( 'Edit this page.', 'comicpress' ), '', ''); ?>
|
||||
<?php
|
||||
} else edit_post_link( __( 'Edit this page.', 'comicpress' ), '', '');
|
||||
?>
|
||||
</div>
|
||||
<div class="post-foot"><?php do_action('comic-post-foot'); ?><?php do_action('comicpress-post-foot'); ?></div>
|
||||
<div class="post-foot">
|
||||
<?php do_action('comic-post-foot'); ?><?php do_action('comicpress-post-foot'); ?></div>
|
||||
</div>
|
||||
<?php
|
||||
do_action('comic-post-extras');
|
||||
comments_template('', true);
|
||||
do_action( 'comic-post-extras' );
|
||||
comments_template( '', true );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
add_action('wp_head', 'opengraph_make_thumbnail_for_youtube');
|
||||
add_action( 'wp_head', 'opengraph_make_thumbnail_for_youtube' );
|
||||
|
||||
function opengraph_make_thumbnail_for_youtube() {
|
||||
global $post;
|
||||
if ($post) {
|
||||
if ( $post ) {
|
||||
$pattern = '/(?:youtube\.com\/(?:[^\/]+\/[^\/]+\/|(?:v|e(?:mbed)?)\/|[^#]*[?&]v=)|youtu\.be\/)([^"&?\/ ]{11})/i';
|
||||
preg_match($pattern, $post->post_content, $matches);
|
||||
$found_id = (isset($matches[1])) ? $matches[1] : false;
|
||||
if ($found_id) echo '<meta property="og:image" content="http://img.youtube.com/vi/'.$found_id.'/1.jpg" />'."\r\n";
|
||||
preg_match( $pattern, $post->post_content, $matches );
|
||||
$found_id = ( isset( $matches[1] ) ) ? $matches[1] : false;
|
||||
if ( $found_id ) echo '<meta property="og:image" content="http://img.youtube.com/vi/' . $found_id . '/1.jpg" />' . "\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,44 +13,51 @@
|
||||
*
|
||||
* Edit a post and it you will see the possible moods you can use, select one.
|
||||
*
|
||||
* @package ComicPress
|
||||
*
|
||||
*/
|
||||
|
||||
add_action('save_post', 'comicpress_handle_edit_post_mood_save' ,5, 1);
|
||||
add_action('add_meta_boxes', 'comicpress_add_moods_into_posts');
|
||||
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');
|
||||
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' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function comicpress_show_mood_in_post() {
|
||||
global $post;
|
||||
$moods_directory = comicpress_themeinfo('moods_directory');
|
||||
if (!empty($moods_directory) && $moods_directory != 'none') {
|
||||
$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 != '') {
|
||||
$mood = explode(".", $mood_file);
|
||||
$mood = reset($mood);
|
||||
if ( !empty($mood_file) && file_exists(get_stylesheet_directory() . '/images/moods/'.$moods_directory.'/'.$mood_file) ) { ?>
|
||||
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) ) { ?>
|
||||
<?php
|
||||
} 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 }
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function comicpress_showmood_edit_post() {
|
||||
global $post;
|
||||
$moods_directory = comicpress_themeinfo('moods_directory');
|
||||
if (!empty($moods_directory) && $moods_directory != 'none') { ?>
|
||||
$moods_directory = comicpress_themeinfo( 'moods_directory' );
|
||||
if ( ! empty( $moods_directory ) && $moods_directory != 'none' ) {
|
||||
?>
|
||||
<div class="inside" style="overflow: hidden">
|
||||
<?php _e( 'Available Moods, you can set which mood images to use in the comicpress Options.', 'comicpress' ); ?>
|
||||
<br />
|
||||
@@ -59,25 +66,26 @@ function comicpress_showmood_edit_post() {
|
||||
|
||||
$currentmood = get_post_meta( $post->ID, "mood", true );
|
||||
|
||||
if (empty($currentmood) || $currentmood == '' || $currentmood == null) {
|
||||
if ( empty( $currentmood ) || $currentmood == '' || $currentmood == null ) {
|
||||
$mood = __( 'none', 'comicpress' );
|
||||
} else {
|
||||
$mood = explode(".", $currentmood);
|
||||
$mood = reset($mood);
|
||||
$mood = explode( ".", $currentmood );
|
||||
$mood = reset( $mood );
|
||||
}
|
||||
|
||||
$count = 0;
|
||||
$count = count($results = glob(get_stylesheet_directory() . '/images/moods/'.$moods_directory.'/*'));
|
||||
if (!$count) {
|
||||
$count = count($results = glob(get_template_directory() . '/images/moods/'.$moods_directory.'/*'));
|
||||
$count = count( $results = glob( get_stylesheet_directory() . '/images/moods/' . $moods_directory . '/*') );
|
||||
if ( ! $count ) {
|
||||
$count = count( $results = glob(get_template_directory() . '/images/moods/' . $moods_directory . '/*') );
|
||||
$moods_uri = get_template_directory_uri();
|
||||
} else {
|
||||
$moods_uri = get_stylesheet_directory_uri();
|
||||
}
|
||||
echo $count . ' ' . __( 'Moods are available.', 'comicpress' ) . '<br />'
|
||||
. __( 'Using Moods from directory:', 'comicpress' ) . ' '. $moods_directory . '<br />'
|
||||
. __( 'Current Mood:', 'comicpress' ) .' '. $mood . ' <br /><br />';
|
||||
if (!empty($results)) { ?>
|
||||
. __( 'Using Moods from directory:', 'comicpress' ) . ' ' . $moods_directory . '<br />'
|
||||
. __( 'Current Mood:', 'comicpress' ) . ' ' . $mood . ' <br /><br />';
|
||||
if ( ! empty( $results ) ) {
|
||||
?>
|
||||
<div style="float:left; margin-top: 70px; text-align: center; width: 68px; overflow: hidden;">
|
||||
<label for="postmood-none" style="cursor:pointer;">
|
||||
none
|
||||
@@ -85,33 +93,37 @@ function comicpress_showmood_edit_post() {
|
||||
<br />
|
||||
<input name="postmood" style="margin-top: 3px;" id="postmood-anger" type="radio" value="none" <?php if ( $mood == 'none' ) { echo " checked"; } ?> />
|
||||
</div>
|
||||
<?php foreach ($results as $file) {
|
||||
$newmood_file = basename($file);
|
||||
$newmood = explode(".", $newmood_file);
|
||||
$newmood = $newmood[0]; ?>
|
||||
<?php
|
||||
foreach ( $results as $file ) {
|
||||
$newmood_file = basename( $file );
|
||||
$newmood = explode( ".", $newmood_file );
|
||||
$newmood = $newmood[0];
|
||||
?>
|
||||
<div style="float:left; margin-top: 10px; text-align: center; width: 68px; overflow: hidden;">
|
||||
<label for="postmood-<?php echo $newmood; ?>" style="cursor:pointer;">
|
||||
<img src="<?php echo $moods_uri; ?>/images/moods/<?php echo $moods_directory; ?>/<?php echo basename($file); ?>" />
|
||||
<br />
|
||||
<?php echo $newmood; ?>
|
||||
</label>
|
||||
<br />
|
||||
<input name="postmood" style="margin-top: 3px;" id="postmood-<?php echo $newmood; ?>" type="radio" value="<?php echo $newmood_file; ?>"<?php if ( $mood == $newmood ) { echo " checked"; } ?> />
|
||||
<label for="postmood-<?php echo $newmood; ?>" style="cursor:pointer;">
|
||||
<img src="<?php echo $moods_uri; ?>/images/moods/<?php echo $moods_directory; ?>/<?php echo basename($file); ?>" />
|
||||
<br />
|
||||
<?php echo $newmood; ?>
|
||||
</label>
|
||||
<br />
|
||||
<input name="postmood" style="margin-top: 3px;" id="postmood-<?php echo $newmood; ?>" type="radio" value="<?php echo $newmood_file; ?>"<?php if ( $mood == $newmood ) { echo " checked"; } ?> />
|
||||
</div>
|
||||
<?php }
|
||||
} ?>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php }
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function comicpress_handle_edit_post_mood_save($post_id) {
|
||||
$moods_directory = comicpress_themeinfo('moods_directory');
|
||||
if (!empty($moods_directory) && $moods_directory != 'none') {
|
||||
function comicpress_handle_edit_post_mood_save( $post_id ) {
|
||||
$moods_directory = comicpress_themeinfo( 'moods_directory' );
|
||||
if ( ! empty( $moods_directory ) && $moods_directory != 'none' ) {
|
||||
$currentmood = get_post_meta( $post_id, "mood", true );
|
||||
if (isset($_POST['postmood']) && $_POST['postmood'] !== $currentmood) {
|
||||
if ( isset( $_POST['postmood'] ) && $_POST['postmood'] !== $currentmood ) {
|
||||
$postmood = $_POST['postmood'];
|
||||
update_post_meta($post_id, 'mood', $postmood);
|
||||
update_post_meta( $post_id, 'mood', $postmood );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
// page options - extra page options, shown in a meta box in the page editor
|
||||
|
||||
function comicpress_page_editor_options($post) {
|
||||
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);
|
||||
$disable_sidebars = get_post_meta( $post->ID, 'disable-sidebars', true );
|
||||
?>
|
||||
<table>
|
||||
<tr>
|
||||
@@ -16,35 +16,35 @@ function comicpress_page_editor_options($post) {
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
add_action('add_meta_boxes', 'comicpress_add_page_editor_meta_box');
|
||||
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');
|
||||
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 )) {
|
||||
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 ) ) {
|
||||
return $post_id;
|
||||
}
|
||||
if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE )
|
||||
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
|
||||
return $post_id;
|
||||
if ( isset($_POST['post_type']) && ($_POST['post_type'] == 'page') ) {
|
||||
if ( !current_user_can( 'edit_page', $post_id ) )
|
||||
if ( isset( $_POST['post_type'] ) && ( $_POST['post_type'] == 'page' ) ) {
|
||||
if ( ! current_user_can( 'edit_page', $post_id ) )
|
||||
return $post_id;
|
||||
} else {
|
||||
if ( !current_user_can( 'edit_post', $post_id ) )
|
||||
if ( ! current_user_can( 'edit_post', $post_id ) )
|
||||
return $post_id;
|
||||
}
|
||||
|
||||
if (isset($_POST['comicpress_sidebar_remove'])) {
|
||||
update_post_meta($post_id, 'disable-sidebars', '1');
|
||||
if ( isset( $_POST['comicpress_sidebar_remove'] ) ) {
|
||||
update_post_meta( $post_id, 'disable-sidebars', '1' );
|
||||
} else {
|
||||
delete_post_meta($post_id, 'disable-sidebars');
|
||||
delete_post_meta( $post_id, 'disable-sidebars' );
|
||||
}
|
||||
return $post_id;
|
||||
}
|
||||
add_action('save_post', 'comicpress_save_page_editor_options');
|
||||
add_action( 'save_post', 'comicpress_save_page_editor_options' );
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -2,14 +2,20 @@
|
||||
|
||||
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 { ?>
|
||||
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="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 }
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
* http://frumph.net/
|
||||
*
|
||||
* Displays more profile options available to end users.
|
||||
*
|
||||
* @package ComicPress
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -13,14 +15,14 @@
|
||||
* 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']);
|
||||
if (isset($contactmethods['yim'])) unset($contactmethods['yim']);
|
||||
if ( isset( $contactmethods['aim'] ) ) unset( $contactmethods['aim'] );
|
||||
if ( isset( $contactmethods['googleplus'] ) ) unset( $contactmethods['googleplus'] );
|
||||
if ( isset( $contactmethods['jabber'] ) ) unset( $contactmethods['jabber'] );
|
||||
if ( isset( $contactmethods['yim'] ) ) unset( $contactmethods['yim'] );
|
||||
return $contactmethods;
|
||||
}
|
||||
|
||||
add_filter('user_contactmethods','comicpress_remove_unwanted_contactmethods',10,1);
|
||||
add_filter( 'user_contactmethods', 'comicpress_remove_unwanted_contactmethods' ,10 ,1 );
|
||||
|
||||
/**
|
||||
* Add contact methods to the user profil page.
|
||||
@@ -30,24 +32,25 @@ add_filter('user_contactmethods','comicpress_remove_unwanted_contactmethods',10,
|
||||
* Sites that you could be on but not exactly the same reference for an author page.
|
||||
* 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)';
|
||||
function add_new_contactmethods( $methods ){
|
||||
// Default contact methods.
|
||||
$methods['twitter'] = 'Twitter (url)';
|
||||
$methods['facebook'] = 'Facebook (url)';
|
||||
// additional contact methods
|
||||
//$methods['myspace'] = 'MySpace (url)';
|
||||
//$methods['linkedin'] = 'LinkedIn (url)';
|
||||
//$methods['pinterest'] = 'Pinterest (url)';
|
||||
//$methods['stumbleupon'] = 'Stumbleupon (url)';
|
||||
//$methods['tumblr'] = 'Tumblr (url)';
|
||||
//$methods['instagram'] = 'Instagram (url)';
|
||||
//$methods['youtube'] = 'Youtube Profile or Channel (url)';
|
||||
//$methods['vine'] = 'Vine (url)';
|
||||
//$methods['deviantart'] = 'DeviantArt (url)';
|
||||
//$methods['inkoutbreak'] = 'InkOutBreak (url)';
|
||||
//$methods['comicrocket'] = 'ComicRocket (url)';
|
||||
//$methods['kickstarter'] = 'Kickstarter (url)';
|
||||
// Additional contact methods.
|
||||
// $methods['myspace'] = 'MySpace (url)';
|
||||
// $methods['linkedin'] = 'LinkedIn (url)';
|
||||
// $methods['pinterest'] = 'Pinterest (url)';
|
||||
// $methods['stumbleupon'] = 'Stumbleupon (url)';
|
||||
// $methods['tumblr'] = 'Tumblr (url)';
|
||||
// $methods['instagram'] = 'Instagram (url)';
|
||||
// $methods['youtube'] = 'Youtube Profile or Channel (url)';
|
||||
// $methods['vine'] = 'Vine (url)';
|
||||
// $methods['deviantart'] = 'DeviantArt (url)';
|
||||
// $methods['inkoutbreak'] = 'InkOutBreak (url)';
|
||||
// $methods['comicrocket'] = 'ComicRocket (url)';
|
||||
// $methods['kickstarter'] = 'Kickstarter (url)';
|
||||
return $methods;
|
||||
}
|
||||
|
||||
add_filter('user_contactmethods','add_new_contactmethods');
|
||||
add_filter( 'user_contactmethods', 'add_new_contactmethods' );
|
||||
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
* Protect global $post and $wp_query.
|
||||
* @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) {
|
||||
function Protect ($use_this_post = null) {
|
||||
global $post, $wp_query, $__post, $__wp_query;
|
||||
if (!empty($post)) {
|
||||
if ( ! empty( $post) ) {
|
||||
$__post = $post;
|
||||
}
|
||||
if (!empty($wp_query)) {
|
||||
if ( ! empty( $wp_query) ) {
|
||||
$__wp_query = $wp_query;
|
||||
}
|
||||
if (!is_null($use_this_post)) {
|
||||
if ( ! is_null( $use_this_post) ) {
|
||||
$post = $use_this_post;
|
||||
setup_postdata($post);
|
||||
setup_postdata( $post );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ function Protect($use_this_post = null) {
|
||||
function Restore() {
|
||||
global $post, $__post;
|
||||
$post = $__post;
|
||||
setup_postdata($post);
|
||||
setup_postdata( $post );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -32,14 +32,12 @@ function Restore() {
|
||||
*/
|
||||
function Unprotect() {
|
||||
global $post, $wp_query, $__post, $__wp_query;
|
||||
if (!empty($__post)) {
|
||||
if ( ! empty( $__post) ) {
|
||||
$post = $__post;
|
||||
}
|
||||
if (!empty($__wp_query)) {
|
||||
if ( ! empty( $__wp_query) ) {
|
||||
$wp_query = $__wp_query;
|
||||
}
|
||||
|
||||
$__post = $__wp_query = null;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -3,24 +3,23 @@
|
||||
* Syndication
|
||||
* Author: Philip M. Hofer (Frumph)
|
||||
*
|
||||
* @package ComicPress
|
||||
*/
|
||||
|
||||
// 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,
|
||||
'_builtin' => false
|
||||
);
|
||||
$output = 'names';
|
||||
$operator = 'and';
|
||||
if ( $query->is_feed && ! isset( $query->post_type ) && empty( $query->post_type ) ) {
|
||||
$args = array(
|
||||
'public' => true,
|
||||
'_builtin' => false,
|
||||
);
|
||||
$output = 'names';
|
||||
$operator = 'and';
|
||||
$post_types = get_post_types( $args , $output , $operator );
|
||||
// remove 'pages' from the RSS
|
||||
$post_types = array_merge( $post_types, array('post') ) ;
|
||||
// Remove 'pages' from the RSS.
|
||||
$post_types = array_merge( $post_types, array( 'post' ) ) ;
|
||||
$query->set( 'post_type' , $post_types );
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
|
||||
?>
|
||||
22
header.php
22
header.php
@@ -1,28 +1,28 @@
|
||||
<!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') ?>" />
|
||||
<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'); ?>" />
|
||||
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
|
||||
<meta name="ComicPress" content="<?php echo comicpress_themeinfo( 'version' ); ?>" />
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
|
||||
<body <?php body_class(); ?>>
|
||||
<?php comicpress_get_sidebar('above-header'); ?>
|
||||
<?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>
|
||||
<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'); ?>
|
||||
<?php comicpress_get_sidebar( 'header' ); ?>
|
||||
<div class="clear"></div>
|
||||
</header>
|
||||
|
||||
<?php
|
||||
if (!comicpress_themeinfo('disable_default_menubar') && function_exists('comicpress_menubar')) comicpress_menubar();
|
||||
if (comicpress_themeinfo('enable_breadcrumbs')) comicpress_breadcrumbs();
|
||||
comicpress_get_sidebar('menubar');
|
||||
get_template_part('layout', 'head');
|
||||
if ( ! comicpress_themeinfo( 'disable_default_menubar' ) && function_exists( 'comicpress_menubar' ) ) comicpress_menubar();
|
||||
if ( comicpress_themeinfo( 'enable_breadcrumbs' ) ) comicpress_breadcrumbs();
|
||||
comicpress_get_sidebar( 'menubar' );
|
||||
get_template_part( 'layout', 'head' );
|
||||
|
||||
44
image.php
44
image.php
@@ -1,6 +1,9 @@
|
||||
<?php get_header(); ?>
|
||||
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
|
||||
<?php
|
||||
get_header();
|
||||
if ( have_posts() ) :
|
||||
while ( have_posts() ) :
|
||||
the_post()
|
||||
?>
|
||||
<div <?php post_class(); ?>>
|
||||
<?php comicpress_display_post_thumbnail(); ?>
|
||||
<div class="post-head"></div>
|
||||
@@ -14,29 +17,29 @@
|
||||
‹
|
||||
</div>
|
||||
<div class="imagenav-link">
|
||||
<?php previous_image_link() ?>
|
||||
<?php previous_image_link(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="imagenav-center">
|
||||
<a href="<?php echo wp_get_attachment_url($post->ID) ?>" target="_blank" title="Click for full size." class="imagetitle"><?php the_title() ?></a><br />
|
||||
<a href="<?php echo get_permalink($post->post_parent) ?>" rel="attachment"><?php _e( '← Back to Gallery', 'comicpress' ); ?></a>
|
||||
<a href="<?php echo wp_get_attachment_url( $post->ID ); ?>" target="_blank" title="Click for full size." class="imagetitle"><?php the_title(); ?></a><br />
|
||||
<a href="<?php echo get_permalink( $post->post_parent ); ?>" rel="attachment"><?php _e( '← Back to Gallery', 'comicpress' ); ?></a>
|
||||
</div>
|
||||
<div class="imagenav-right">
|
||||
<div class="imagenav-bg">
|
||||
<?php next_image_link() ?>
|
||||
<?php next_image_link(); ?>
|
||||
</div>
|
||||
<div class="imagenav-arrow">
|
||||
›
|
||||
</div>
|
||||
<div class="imagenav-link">
|
||||
<?php next_image_link() ?>
|
||||
<?php next_image_link(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="gallery-image">
|
||||
<a href="<?php echo wp_get_attachment_url($post->ID) ?>" target="_blank" title="<?php _e( 'Click for full size.', 'comicpress' ); ?>" ><img src="<?php echo wp_get_attachment_url($post->ID) ?>" alt="<?php the_title() ?>" /></a>
|
||||
<a href="<?php echo wp_get_attachment_url( $post->ID ); ?>" target="_blank" title="<?php _e( 'Click for full size.', 'comicpress' ); ?>" ><img src="<?php echo wp_get_attachment_url( $post->ID ); ?>" alt="<?php the_title(); ?>" /></a>
|
||||
</div>
|
||||
<div class="gallery-caption">
|
||||
<?php the_excerpt(); ?>
|
||||
@@ -49,17 +52,26 @@
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php edit_post_link(__( 'Edit this attachment.', 'comicpress' ), '', ''); ?>
|
||||
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
||||
<?php endwhile; else: ?>
|
||||
<?php
|
||||
edit_post_link(
|
||||
__( 'Edit this attachment.', 'comicpress' ), '', '');
|
||||
if ( 'open' == $post->comment_status ) {
|
||||
comments_template( '', true );
|
||||
}
|
||||
endwhile;
|
||||
else :
|
||||
?>
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post-content">
|
||||
<p><?php _e( 'Sorry, no image matched your criteria.', 'comicpress' ); ?></p>
|
||||
<p>
|
||||
<?php _e( 'Sorry, no image matched your criteria.', 'comicpress' ); ?>
|
||||
</p>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php get_footer() ?>
|
||||
<?php
|
||||
endif;
|
||||
get_footer()
|
||||
?>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<?php if (!comicpress_sidebars_disabled()) comicpress_get_sidebar('under-blog'); ?>
|
||||
<?php if ( ! comicpress_sidebars_disabled() ) comicpress_get_sidebar( 'under-blog' ); ?>
|
||||
</div>
|
||||
<?php
|
||||
if (!comicpress_is_signup() && !comicpress_sidebars_disabled()) {
|
||||
if (comicpress_is_layout('3clgn')) comicpress_get_sidebar('right');
|
||||
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');
|
||||
if (comicpress_is_layout('2cr,3c,3cr,3crgn')) comicpress_get_sidebar('right');
|
||||
if ( ! comicpress_is_signup() && ! comicpress_sidebars_disabled() ) {
|
||||
if ( comicpress_is_layout( '3cl,3cr' ) ) comicpress_get_sidebar( 'left' );
|
||||
if ( comicpress_is_layout( '2cr,3c,3cr,3crgn' ) ) comicpress_get_sidebar( 'right' );
|
||||
}
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
|
||||
@@ -1,31 +1,34 @@
|
||||
<div id="content-wrapper">
|
||||
|
||||
<?php do_action('comicpress-content-area'); ?>
|
||||
<?php if (!get_theme_mod('comicpress-customize-comic-in-column', false)) do_action('comic-area'); ?>
|
||||
<?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');
|
||||
if (comicpress_is_layout('3cl')) comicpress_get_sidebar('right');
|
||||
}
|
||||
if (is_front_page() && !comicpress_sidebars_disabled()) {
|
||||
comicpress_get_sidebar('home-splash');
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if ( ! comicpress_is_signup() && ! comicpress_sidebars_disabled() ) {
|
||||
if ( comicpress_is_layout( '2cl,3c,3cl,3clgn' ) ) comicpress_get_sidebar( 'left' );
|
||||
if ( comicpress_is_layout( '3cl' ) ) comicpress_get_sidebar( 'right' );
|
||||
}
|
||||
if ( is_front_page() && ! comicpress_sidebars_disabled() ) {
|
||||
comicpress_get_sidebar( 'home-splash' );
|
||||
}
|
||||
?>
|
||||
|
||||
<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()) {
|
||||
if (comicpress_is_layout('3crgn')) comicpress_get_sidebar('left');
|
||||
}
|
||||
<?php
|
||||
if ( get_theme_mod( 'comicpress-customize-comic-in-column', false ) ) do_action( 'comic-area' );
|
||||
if ( ! comicpress_is_signup() && !comicpress_sidebars_disabled()) {
|
||||
if ( comicpress_is_layout( '3crgn' ) ) comicpress_get_sidebar( 'left' );
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="content" class="narrowcolumn">
|
||||
<?php do_action('comicpress-narrowcolumn-area'); ?>
|
||||
<?php
|
||||
if (!comicpress_sidebars_disabled()) {
|
||||
if (!is_front_page() && !comicpress_themeinfo('over-blog-sidebar-all-posts')) return;
|
||||
comicpress_get_sidebar('over-blog');
|
||||
}
|
||||
<?php
|
||||
do_action( 'comicpress-narrowcolumn-area' );
|
||||
if ( ! comicpress_sidebars_disabled() ) {
|
||||
if ( ! is_front_page() && ! comicpress_themeinfo( 'over-blog-sidebar-all-posts' ) ) return;
|
||||
comicpress_get_sidebar( 'over-blog' );
|
||||
}
|
||||
do_action( 'comic-blog-area' );
|
||||
?>
|
||||
<?php do_action('comic-blog-area'); ?>
|
||||
|
||||
331
options.php
331
options.php
@@ -1,101 +1,107 @@
|
||||
<?php
|
||||
|
||||
add_action('admin_menu', 'comicpress_options_setup');
|
||||
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');
|
||||
add_action('admin_head-' . $pagehook, 'comicpress_admin_page_head');
|
||||
add_action('admin_print_scripts-' . $pagehook, 'comicpress_admin_print_scripts');
|
||||
add_action('admin_print_styles-' . $pagehook, 'comicpress_admin_print_styles');
|
||||
$admin_title = __( 'ComicPress Options', 'comicpress' );
|
||||
$pagehook = add_theme_page( $admin_title, $admin_title, 'edit_theme_options', 'comicpress-options', 'comicpress_admin_options' );
|
||||
add_action( 'admin_head-' . $pagehook, 'comicpress_admin_page_head' );
|
||||
add_action( 'admin_print_scripts-' . $pagehook, 'comicpress_admin_print_scripts' );
|
||||
add_action( 'admin_print_styles-' . $pagehook, 'comicpress_admin_print_styles' );
|
||||
}
|
||||
|
||||
function comicpress_admin_print_scripts() {
|
||||
wp_enqueue_script('utils');
|
||||
wp_enqueue_script('jquery');
|
||||
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');
|
||||
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() { ?>
|
||||
<!--[if lt ie 8]> <style> div.show { position: static; margin-top: 1px; } #eadmin div.off { height: 22px; } </style> <![endif]-->
|
||||
<?php }
|
||||
<?php
|
||||
}
|
||||
|
||||
function comicpress_admin_options() { ?>
|
||||
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>
|
||||
<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 />
|
||||
<div class="clear"></div>
|
||||
<?php
|
||||
if (isset($_GET['tab'])) { $tab = wp_filter_nohtml_kses($_GET['tab']); } else { $tab = ''; };
|
||||
if ( isset( $_GET['tab'] ) ) {
|
||||
$tab = wp_filter_nohtml_kses( $_GET['tab'] );
|
||||
} else {
|
||||
$tab = '';
|
||||
};
|
||||
|
||||
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'comicpress_reset') {
|
||||
delete_option('cp-options');
|
||||
global $comicpress_themeinfo; $comicpress_themeinfo = '';
|
||||
?>
|
||||
if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'comicpress_reset' ) {
|
||||
delete_option( 'cp-options' );
|
||||
global $comicpress_themeinfo;
|
||||
$comicpress_themeinfo = '';
|
||||
?>
|
||||
<div id="message" class="updated"><p><strong><?php _e( 'ComicPress Settings RESET!', 'comicpress' ); ?></strong></p></div>
|
||||
<?php }
|
||||
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'comicpress_reset_customize') {
|
||||
remove_theme_mod('comicpress-customize');
|
||||
delete_option('theme_mods_comicpress');
|
||||
global $comicpress_themeinfo; $comicpress_themeinfo = '';
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'comicpress_reset_customize' ) {
|
||||
remove_theme_mod( 'comicpress-customize' );
|
||||
delete_option( 'theme_mods_comicpress ' );
|
||||
global $comicpress_themeinfo;
|
||||
$comicpress_themeinfo = '';
|
||||
?>
|
||||
<div id="message" class="updated"><p><strong><?php _e( 'ComicPress Customizer Colors RESET!', 'comicpress' ); ?></strong></p></div>
|
||||
<?php }
|
||||
if (empty($comicpress_options)) {
|
||||
comicpress_themeinfo('reset');
|
||||
<?php
|
||||
}
|
||||
if ( empty( $comicpress_options ) ) {
|
||||
comicpress_themeinfo( 'reset' );
|
||||
}
|
||||
$comicpress_options = comicpress_load_options();
|
||||
if ( isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'update-options') ) {
|
||||
if ( isset( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'update-options') ) {
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_general') {
|
||||
|
||||
foreach (array(
|
||||
'disable_scroll_to_top', // general
|
||||
'enable_post_thumbnail_rss', // general
|
||||
'disable_footer_text', // general
|
||||
'disable_blog_on_homepage', // general
|
||||
'over-blog-sidebar-all-posts' // general
|
||||
) as $key) {
|
||||
if (!isset($_REQUEST[$key])) $_REQUEST[$key] = 0;
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
if ( $_REQUEST['action'] == 'comicpress_save_general' ) {
|
||||
foreach ( array(
|
||||
'disable_scroll_to_top', // General.
|
||||
'enable_post_thumbnail_rss', // General.
|
||||
'disable_footer_text', // General.
|
||||
'disable_blog_on_homepage', // General.
|
||||
'over-blog-sidebar-all-posts', // General.
|
||||
) as $key ) {
|
||||
if ( ! isset( $_REQUEST[$key] ) ) $_REQUEST[$key] = 0;
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
}
|
||||
|
||||
foreach (array(
|
||||
'home_post_count', // general
|
||||
'copyright_name', // general
|
||||
'copyright_url' // general
|
||||
) as $key) {
|
||||
if (isset($_REQUEST[$key]))
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
|
||||
foreach ( array(
|
||||
'home_post_count', // General.
|
||||
'copyright_name', // General.
|
||||
'copyright_url', // General.
|
||||
) as $key) {
|
||||
if ( isset( $_REQUEST[$key] ) )
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses( $_REQUEST[$key] );
|
||||
}
|
||||
$tab = 'general';
|
||||
update_option('cp-options', $comicpress_options);
|
||||
update_option( 'cp-options', $comicpress_options );
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_menubar') {
|
||||
|
||||
foreach (array(
|
||||
'disable_jquery_menu_code',
|
||||
'disable_default_menubar',
|
||||
'enable_search_in_menubar',
|
||||
'enable_rss_in_menubar',
|
||||
'menubar_social_icons',
|
||||
'enable_breadcrumbs'
|
||||
) as $key) {
|
||||
if (!isset($_REQUEST[$key])) $_REQUEST[$key] = 0;
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
if ( $_REQUEST['action'] == 'comicpress_save_menubar' ) {
|
||||
foreach ( array(
|
||||
'disable_jquery_menu_code',
|
||||
'disable_default_menubar',
|
||||
'enable_search_in_menubar',
|
||||
'enable_rss_in_menubar',
|
||||
'menubar_social_icons',
|
||||
'enable_breadcrumbs',
|
||||
) as $key ) {
|
||||
if ( ! isset( $_REQUEST[$key] ) ) $_REQUEST[$key] = 0;
|
||||
$comicpress_options[$key] = (bool) ( $_REQUEST[$key] == 1 ? true : false );
|
||||
}
|
||||
|
||||
foreach (array(
|
||||
foreach ( array(
|
||||
'menubar_social_twitter',
|
||||
'menubar_social_facebook',
|
||||
'menubar_social_linkedin',
|
||||
@@ -105,135 +111,138 @@ function comicpress_admin_options() { ?>
|
||||
'menubar_social_tumblr',
|
||||
'menubar_social_deviantart',
|
||||
'menubar_social_myspace',
|
||||
'menubar_social_email'
|
||||
) as $key) {
|
||||
if (isset($_REQUEST[$key]) && !empty($_REQUEST[$key])) {
|
||||
$comicpress_options[$key] = esc_url($_REQUEST[$key]);
|
||||
} else {
|
||||
// set to empty if it's not set
|
||||
$comicpress_options[$key] = '';
|
||||
}
|
||||
'menubar_social_email',
|
||||
) as $key ) {
|
||||
if ( isset( $_REQUEST[$key] ) && !empty( $_REQUEST[$key] ) ) {
|
||||
$comicpress_options[$key] = esc_url( $_REQUEST[$key] );
|
||||
} else {
|
||||
// Set to empty if it's not set.
|
||||
$comicpress_options[$key] = '';
|
||||
}
|
||||
}
|
||||
$tab = 'menubar';
|
||||
update_option('cp-options', $comicpress_options);
|
||||
update_option( 'cp-options', $comicpress_options );
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_postspages') {
|
||||
|
||||
foreach (array(
|
||||
'enable_avatar_trick', // postspages
|
||||
'disable_page_titles', // postspages
|
||||
'disable_post_titles', // postspages
|
||||
'enable_post_calendar', // postspages
|
||||
'enable_post_author_gravatar', // postspages
|
||||
'disable_categories_in_posts', // postspages
|
||||
'disable_tags_in_posts', // postspages
|
||||
'disable_author_info_in_posts', // postspages
|
||||
'disable_date_info_in_posts', // postspages
|
||||
'enable_last_modified_in_posts', // postspages
|
||||
'disable_posted_at_time_in_posts', // postspages
|
||||
) as $key) {
|
||||
if (!isset($_REQUEST[$key])) $_REQUEST[$key] = 0;
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
if ( $_REQUEST['action'] == 'comicpress_save_postspages' ) {
|
||||
foreach ( array(
|
||||
'enable_avatar_trick', // Posts & Pages.
|
||||
'disable_page_titles', // Posts & Pages.
|
||||
'disable_post_titles', // Posts & Pages.
|
||||
'enable_post_calendar', // Posts & Pages.
|
||||
'enable_post_author_gravatar', // Posts & Pages.
|
||||
'disable_categories_in_posts', // Posts & Pages.
|
||||
'disable_tags_in_posts', // Posts & Pages.
|
||||
'disable_author_info_in_posts', // Posts & Pages.
|
||||
'disable_date_info_in_posts', // Posts & Pages.
|
||||
'enable_last_modified_in_posts', // Posts & Pages.
|
||||
'disable_posted_at_time_in_posts', // Posts & Pages.
|
||||
) as $key) {
|
||||
if ( ! isset( $_REQUEST[$key] ) ) $_REQUEST[$key] = 0;
|
||||
$comicpress_options[$key] = (bool) ( $_REQUEST[$key] == 1 ? true : false );
|
||||
}
|
||||
|
||||
foreach (array(
|
||||
'moods_directory', // postspages
|
||||
'content_width', // postspages
|
||||
'content_width_disabled_sidebars' // postspages
|
||||
) as $key) {
|
||||
if (isset($_REQUEST[$key]))
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
|
||||
foreach ( array(
|
||||
'moods_directory', // Posts & Pages.
|
||||
'content_width', // Posts & Pages.
|
||||
'content_width_disabled_sidebars', // Posts & Pages.
|
||||
) as $key ) {
|
||||
if ( isset($_REQUEST[$key] ) )
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses( $_REQUEST[$key] );
|
||||
}
|
||||
$tab = 'postspages';
|
||||
update_option('cp-options', $comicpress_options);
|
||||
update_option( 'cp-options', $comicpress_options );
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_comments') {
|
||||
|
||||
foreach (array(
|
||||
'disable_comment_note', // comments
|
||||
'disable_comment_javascript', // commments
|
||||
'enable_comments_on_homepage', // comments
|
||||
) as $key) {
|
||||
if (!isset($_REQUEST[$key])) $_REQUEST[$key] = 0;
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
if ( $_REQUEST['action'] == 'comicpress_save_comments' ) {
|
||||
foreach ( array(
|
||||
'disable_comment_note', // Comments.
|
||||
'disable_comment_javascript', // Comments.
|
||||
'enable_comments_on_homepage', // Comments.
|
||||
) as $key ) {
|
||||
if ( ! isset( $_REQUEST[$key] ) ) $_REQUEST[$key] = 0;
|
||||
$comicpress_options[$key] = (bool) ( $_REQUEST[$key] == 1 ? true : false );
|
||||
}
|
||||
|
||||
foreach (array(
|
||||
'avatar_directory' // comments
|
||||
) as $key) {
|
||||
if (isset($_REQUEST[$key]))
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
|
||||
foreach ( array(
|
||||
'avatar_directory' // Comments.
|
||||
) as $key ) {
|
||||
if ( isset( $_REQUEST[$key] ) )
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses( $_REQUEST[$key] );
|
||||
}
|
||||
$tab = 'comments';
|
||||
update_option('cp-options', $comicpress_options);
|
||||
update_option( 'cp-options', $comicpress_options );
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_archivesearch') {
|
||||
|
||||
foreach (array(
|
||||
'display_archive_as_links', // archivesearch
|
||||
'enable_numbered_pagination' // postspages
|
||||
) as $key) {
|
||||
if (!isset($_REQUEST[$key])) $_REQUEST[$key] = 0;
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
if ( $_REQUEST['action'] == 'comicpress_save_archivesearch' ) {
|
||||
foreach ( array(
|
||||
'display_archive_as_links', // Archive & Search.
|
||||
'enable_numbered_pagination', // Posts & Pages.
|
||||
) as $key ) {
|
||||
if ( ! isset( $_REQUEST[$key] ) ) $_REQUEST[$key] = 0;
|
||||
$comicpress_options[$key] = (bool) ( $_REQUEST[$key] == 1 ? true : false );
|
||||
}
|
||||
|
||||
foreach (array(
|
||||
'archive_display_order', // archivesearch
|
||||
'excerpt_or_content_in_archive' // archivesearch
|
||||
) as $key) {
|
||||
if (isset($_REQUEST[$key]))
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
|
||||
foreach ( array(
|
||||
'archive_display_order', // Archive & Search.
|
||||
'excerpt_or_content_in_archive', // Archive & Search.
|
||||
) as $key ) {
|
||||
if ( isset( $_REQUEST[$key] ) )
|
||||
$comicpress_options[$key] = wp_filter_nohtml_kses( $_REQUEST[$key] );
|
||||
}
|
||||
$tab = 'archivesearch';
|
||||
update_option('cp-options', $comicpress_options);
|
||||
update_option( 'cp-options', $comicpress_options );
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'comicpress_save_debug') {
|
||||
foreach (array(
|
||||
if ( $_REQUEST['action'] == 'comicpress_save_debug' ) {
|
||||
foreach ( array(
|
||||
'enable_debug_footer_code',
|
||||
'force_active_connection_close'
|
||||
) as $key) {
|
||||
'force_active_connection_close',
|
||||
) as $key ) {
|
||||
if (!isset($_REQUEST[$key])) $_REQUEST[$key] = 0;
|
||||
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
|
||||
$comicpress_options[$key] = (bool) ( $_REQUEST[$key] == 1 ? true : false );
|
||||
}
|
||||
$tab = 'debug';
|
||||
update_option('cp-options', $comicpress_options);
|
||||
update_option( 'cp-options', $comicpress_options );
|
||||
}
|
||||
|
||||
if ($tab) { ?>
|
||||
<div id="message" class="updated"><p><strong><?php _e( 'ComicPress Settings SAVED!', 'comicpress' ); ?></strong></p></div>
|
||||
<script>function hidemessage() { document.getElementById('message').style.display = 'none'; }</script>
|
||||
<?php }
|
||||
if ( $tab ) {
|
||||
?>
|
||||
<div id="message" class="updated">
|
||||
<p><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');
|
||||
$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' ),
|
||||
'general' => __( 'General', 'comicpress' ),
|
||||
'menubar' => __( 'Menubar', 'comicpress' ),
|
||||
'postspages' => __( 'Posts & Pages', 'comicpress' ),
|
||||
'comments' => __( 'Comments', 'comicpress' ),
|
||||
<?php
|
||||
$tab_info = array(
|
||||
'splash' => __( 'Introduction', 'comicpress' ),
|
||||
'general' => __( 'General', 'comicpress' ),
|
||||
'menubar' => __( 'Menubar', 'comicpress' ),
|
||||
'postspages' => __( 'Posts & Pages', 'comicpress' ),
|
||||
'comments' => __( 'Comments', 'comicpress' ),
|
||||
'archivesearch' => __( 'Archive & Search', 'comicpress' ),
|
||||
'debug' => __( 'Debug', 'comicpress' )
|
||||
);
|
||||
|
||||
if (empty($tab)) { $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 }
|
||||
?>
|
||||
'debug' => __( 'Debug', 'comicpress' ),
|
||||
);
|
||||
if ( empty( $tab ) ) { $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); } ?>
|
||||
<?php
|
||||
foreach ( glob( get_template_directory() . '/options/*.php' ) as $file ) { include( $file ); }
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
@@ -261,7 +270,7 @@ function comicpress_admin_options() { ?>
|
||||
</script>
|
||||
</div>
|
||||
<div class="eadmin-footer">
|
||||
<div id="comicpress-version-title"><a href="http://frumph.net/">ComicPress <?php echo comicpress_themeinfo('version'); ?></a></div>
|
||||
<div id="comicpress-version-title"><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' ); ?>
|
||||
@@ -277,14 +286,14 @@ function comicpress_admin_options() { ?>
|
||||
</td>
|
||||
<td style="width:200px;">
|
||||
<form method="post" id="myForm" name="template" enctype="multipart/form-data" action="">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
<?php wp_nonce_field( 'update-options' ); ?>
|
||||
<input name="comicpress_reset" type="submit" class="button" value="<?php _e( 'Reset All Settings', 'comicpress' ); ?>" />
|
||||
<input type="hidden" name="action" value="comicpress_reset" />
|
||||
</form>
|
||||
</td>
|
||||
<td style="width:200px;">
|
||||
<form method="post" id="myForm" name="template" enctype="multipart/form-data" action="">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
<?php wp_nonce_field( 'update-options' ); ?>
|
||||
<input name="comicpress_reset_customize" type="submit" class="button" value="<?php _e( 'Reset Customizer Colors', 'comicpress' ); ?>" />
|
||||
<input type="hidden" name="action" value="comicpress_reset_customize" />
|
||||
</form>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="comicpress-archivesearch">
|
||||
<form method="post" id="myForm-general" enctype="multipart/form-data" action="?page=comicpress-options">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
<?php wp_nonce_field( 'update-options' ); ?>
|
||||
|
||||
<div class="comicpress-options">
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="display_archive_as_links" name="display_archive_as_links" type="checkbox" value="1" <?php checked(true, $comicpress_options['display_archive_as_links']); ?> />
|
||||
<input id="display_archive_as_links" name="display_archive_as_links" type="checkbox" value="1" <?php checked( true, $comicpress_options['display_archive_as_links'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Enabling this will make the archive pages by date/category/term display as a list of links instead of full posts.', 'comicpress' ); ?>
|
||||
@@ -32,10 +32,10 @@
|
||||
<?php _e( 'Excerpt or Full Content in archive and search?', 'comicpress' ); ?>
|
||||
</label>
|
||||
<select name="excerpt_or_content_in_archive" id="excerpt_or_content_in_archive">
|
||||
<option class="level-0" value="excerpt" <?php selected($comicpress_options['excerpt_or_content_in_archive'], 'excerpt'); ?>>
|
||||
<option class="level-0" value="excerpt" <?php selected ( $comicpress_options['excerpt_or_content_in_archive'], 'excerpt' ); ?>>
|
||||
<?php _e( 'Excerpt', 'comicpress' ); ?>
|
||||
</option>
|
||||
<option class="level-0" value="content" <?php selected($comicpress_options['excerpt_or_content_in_archive'], 'content'); ?>>
|
||||
<option class="level-0" value="content" <?php selected( $comicpress_options['excerpt_or_content_in_archive'], 'content' ); ?>>
|
||||
<?php _e( 'Full Content', 'comicpress' ); ?>
|
||||
</option>
|
||||
</select>
|
||||
@@ -50,10 +50,10 @@
|
||||
<?php _e( 'Archive Display Order', 'comicpress' ); ?>
|
||||
</label>
|
||||
<select name="archive_display_order" id="archive_display_order">
|
||||
<option class="level-0" value="asc" <?php if ($comicpress_options['archive_display_order'] == "asc") { ?>selected="selected"<?php } ?>>
|
||||
<option class="level-0" value="asc" <?php if ( $comicpress_options['archive_display_order'] == "asc" ) { ?>selected="selected"<?php } ?>>
|
||||
<?php _e( 'Oldest to Newest — Ascending', 'comicpress' ); ?>
|
||||
</option>
|
||||
<option class="level-0" value="desc" <?php if ($comicpress_options['archive_display_order'] == "desc") { ?>selected="selected"<?php } ?>>
|
||||
<option class="level-0" value="desc" <?php if ( $comicpress_options['archive_display_order'] == "desc" ) { ?>selected="selected"<?php } ?>>
|
||||
<?php _e( 'Newest to Oldest — Descending', 'comicpress' ); ?>
|
||||
</option>
|
||||
</select>
|
||||
@@ -82,7 +82,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="enable_numbered_pagination" name="enable_numbered_pagination" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_numbered_pagination']); ?> />
|
||||
<input id="enable_numbered_pagination" name="enable_numbered_pagination" type="checkbox" value="1" <?php checked( true, $comicpress_options['enable_numbered_pagination'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Previous Entries and Next Entries buttons are replaced by a bar of numbered pages. Numbered pagination appears on the Home page, the author(s) page, the blog template, and comments/single when there are more then the set number of comments per page. Uses the same styling as the Menubar.', 'comicpress' ); ?>
|
||||
@@ -105,4 +105,4 @@
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="comicpress-comments">
|
||||
<form method="post" id="myForm-general" enctype="multipart/form-data" action="?page=comicpress-options">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
<?php wp_nonce_field( 'update-options' ); ?>
|
||||
|
||||
<div class="comicpress-options">
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="disable_comment_note" name="disable_comment_note" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comment_note']); ?> />
|
||||
<input id="disable_comment_note" name="disable_comment_note" type="checkbox" value="1" <?php checked( true, $comicpress_options['disable_comment_note'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Disabling this will remove the note text that displays with more options for adding to comments (html).', 'comicpress' ); ?>
|
||||
@@ -33,7 +33,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="disable_comment_javascript" name="disable_comment_javascript" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_comment_javascript']); ?> />
|
||||
<input id="disable_comment_javascript" name="disable_comment_javascript" type="checkbox" value="1" <?php checked( true, $comicpress_options['disable_comment_javascript'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Checkmark this if you want the comment form to not use javascript to appear directly under who is being replied to. (increases pageviews/hits)', 'comicpress' ); ?>
|
||||
@@ -46,7 +46,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="enable_comments_on_homepage" name="enable_comments_on_homepage" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_comments_on_homepage']); ?> />
|
||||
<input id="enable_comments_on_homepage" name="enable_comments_on_homepage" type="checkbox" value="1" <?php checked( true, $comicpress_options['enable_comments_on_homepage'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Checkmarking this option will make it so that the post(s) on the home page will also display the comments under them. This will ONLY work if you have it set to only display 1 post on the home page. The post count and this must be set to work.', 'comicpress' ); ?>
|
||||
@@ -54,17 +54,17 @@
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$current_avatar_directory = $comicpress_options['avatar_directory'];
|
||||
if (empty($current_avatar_directory))
|
||||
$current_avatar_directory = 'default';
|
||||
$current_avatar_directory = $comicpress_options['avatar_directory'];
|
||||
if ( empty( $current_avatar_directory ) )
|
||||
$current_avatar_directory = 'default';
|
||||
$avatar_directories = array();
|
||||
$dirs_to_search = array_unique(array(get_template_directory(), get_stylesheet_directory()));
|
||||
foreach ($dirs_to_search as $avdir) {
|
||||
if (is_dir($avdir . '/images/avatars')) {
|
||||
$thisdir = null;
|
||||
$thisdir = array();
|
||||
$thisdir = glob($avdir . '/images/avatars/*');
|
||||
$avatar_directories = array_merge($avatar_directories, $thisdir);
|
||||
$dirs_to_search = array_unique( array( get_template_directory(), get_stylesheet_directory() ) );
|
||||
foreach ( $dirs_to_search as $avdir ) {
|
||||
if ( is_dir( $avdir . '/images/avatars' ) ) {
|
||||
$thisdir = null;
|
||||
$thisdir = array();
|
||||
$thisdir = glob( $avdir . '/images/avatars/*' );
|
||||
$avatar_directories = array_merge( $avatar_directories, $thisdir );
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -75,15 +75,16 @@
|
||||
<?php _e( 'Avatar Directory', 'comicpress' ); ?>
|
||||
</label>
|
||||
<select name="avatar_directory" id="avatar_directory">
|
||||
<option class="level-0" value="none" <?php if ($current_avatar_directory == "none") { ?>selected="selected"<?php } ?>>
|
||||
<option class="level-0" value="none" <?php if ( $current_avatar_directory == "none" ) { ?>selected="selected"<?php } ?>>
|
||||
<?php _e( 'none', 'comicpress' ); ?>
|
||||
</option>
|
||||
<?php
|
||||
foreach ($avatar_directories as $avatar_dirs) {
|
||||
if (is_dir($avatar_dirs)) {
|
||||
$avatar_dir_name = basename($avatar_dirs); ?>
|
||||
<option class="level-0" value="<?php echo $avatar_dir_name; ?>" <?php if ($current_avatar_directory == $avatar_dir_name) { ?>selected="selected"<?php } ?>>
|
||||
<?php echo $avatar_dir_name; ?>
|
||||
foreach ( $avatar_directories as $avatar_dirs ) {
|
||||
if ( is_dir( $avatar_dirs ) ) {
|
||||
$avatar_dir_name = basename( $avatar_dirs );
|
||||
?>
|
||||
<option class="level-0" value="<?php echo $avatar_dir_name; ?>" <?php if ( $current_avatar_directory == $avatar_dir_name ) { ?>selected="selected"<?php } ?>>
|
||||
<?php echo $avatar_dir_name; ?>
|
||||
</option>
|
||||
<?php }
|
||||
}
|
||||
@@ -112,4 +113,4 @@
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="comicpress-debug">
|
||||
<form method="post" id="myForm-debug" enctype="multipart/form-data" action="?page=comicpress-options">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
<?php wp_nonce_field( 'update-options' ); ?>
|
||||
|
||||
<div class="comicpress-options">
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="enable_debug_footer_code" name="enable_debug_footer_code" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_debug_footer_code']); ?> />
|
||||
<input id="enable_debug_footer_code" name="enable_debug_footer_code" type="checkbox" value="1" <?php checked( true, $comicpress_options['enable_debug_footer_code'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'If enabled will show information on how many queries, memory is used as well as how fast the page loads.', 'comicpress' ); ?>
|
||||
@@ -33,7 +33,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="force_active_connection_close" name="force_active_connection_close" type="checkbox" value="1" <?php checked(true, $comicpress_options['force_active_connection_close']); ?> />
|
||||
<input id="force_active_connection_close" name="force_active_connection_close" type="checkbox" value="1" <?php checked( true, $comicpress_options['force_active_connection_close'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'This option forces mysql to close the connection after each page load — not recommended unless you are requested to enable it.', 'comicpress' ); ?>
|
||||
@@ -60,21 +60,23 @@
|
||||
<?php
|
||||
// hidden with <!-- from displaying, but not hidden from view-source
|
||||
$variable_dump = comicpress_themeinfo();
|
||||
if (is_array($variable_dump)) {
|
||||
while (list($key, $value) = each($variable_dump)) { ?>
|
||||
if ( is_array( $variable_dump ) ) {
|
||||
while ( list( $key, $value ) = each( $variable_dump ) ) {
|
||||
?>
|
||||
<tr>
|
||||
<td style= "width: 330px;">
|
||||
<?php var_dump($key); ?>
|
||||
<?php var_dump( $key ); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php var_dump($value); ?>
|
||||
<?php var_dump( $value ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
// -->
|
||||
</table>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="comicpress-general">
|
||||
<form method="post" id="myForm-general" enctype="multipart/form-data" action="?page=comicpress-options">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
<?php wp_nonce_field( 'update-options' ); ?>
|
||||
|
||||
<div class="comicpress-options">
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="disable_blog_on_homepage" name="disable_blog_on_homepage" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_blog_on_homepage']); ?> />
|
||||
<input id="disable_blog_on_homepage" name="disable_blog_on_homepage" type="checkbox" value="1" <?php checked( true, $comicpress_options['disable_blog_on_homepage'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Enabling this option, will DISABLE the blog from appearing on the home page AND any pages set as the blog posts page in the settings ➔ reading.', 'comicpress' ); ?>
|
||||
@@ -46,7 +46,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="over-blog-sidebar-all-posts" name="over-blog-sidebar-all-posts" type="checkbox" value="1" <?php checked(true, $comicpress_options['over-blog-sidebar-all-posts']); ?> />
|
||||
<input id="over-blog-sidebar-all-posts" name="over-blog-sidebar-all-posts" type="checkbox" value="1" <?php checked( true, $comicpress_options['over-blog-sidebar-all-posts'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Sidebar Over-Blog appears on all posts not just the front page/blog loop when enabled.', 'comicpress' ); ?>
|
||||
@@ -55,7 +55,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -72,7 +72,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="disable_footer_text" name="disable_footer_text" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_footer_text']); ?> />
|
||||
<input id="disable_footer_text" name="disable_footer_text" type="checkbox" value="1" <?php checked( true, $comicpress_options['disable_footer_text'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Enable this if you do not want any text in the footer. If you wish to add you own custom content, you may do so via Appearance ➔ Widgets ➔ Footer.', 'comicpress' ); ?>
|
||||
@@ -85,7 +85,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="disable_scroll_to_top" name="disable_scroll_to_top" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_scroll_to_top']); ?> />
|
||||
<input id="disable_scroll_to_top" name="disable_scroll_to_top" type="checkbox" value="1" <?php checked( true, $comicpress_options['disable_scroll_to_top'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'When this link is clicked on long pages it will scroll back to the top.', 'comicpress' ); ?>
|
||||
@@ -96,7 +96,7 @@
|
||||
<label for="copyright_name">
|
||||
<?php _e( '© Copyright Name', 'comicpress' ); ?>
|
||||
</label>
|
||||
<input type="text" size="20" name="copyright_name" id="copyright_name" value="<?php echo stripcslashes($comicpress_options['copyright_name']); ?>" />
|
||||
<input type="text" size="20" name="copyright_name" id="copyright_name" value="<?php echo stripcslashes( $comicpress_options['copyright_name'] ); ?>" />
|
||||
<br />
|
||||
</th>
|
||||
<td colspan="2">
|
||||
@@ -108,7 +108,7 @@
|
||||
<label for="copyright_url">
|
||||
<?php _e( '© Copyright Holder URL', 'comicpress' ); ?>
|
||||
</label>
|
||||
<input type="text" size="30" name="copyright_url" id="copyright_url" value="<?php echo stripcslashes($comicpress_options['copyright_url']); ?>" />
|
||||
<input type="text" size="30" name="copyright_url" id="copyright_url" value="<?php echo stripcslashes( $comicpress_options['copyright_url'] ); ?>" />
|
||||
<br />
|
||||
</th>
|
||||
<td colspan="2">
|
||||
@@ -118,7 +118,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -135,7 +135,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="enable_post_thumbnail_rss" name="enable_post_thumbnail_rss" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_post_thumbnail_rss']); ?> />
|
||||
<input id="enable_post_thumbnail_rss" name="enable_post_thumbnail_rss" type="checkbox" value="1" <?php checked( true, $comicpress_options['enable_post_thumbnail_rss'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'If enabled will show the post thumbnail of the post in the RSS feed.', 'comicpress' ); ?>
|
||||
@@ -144,7 +144,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comicpress-options-save">
|
||||
@@ -158,4 +158,4 @@
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="comicpress-menubar">
|
||||
<form method="post" id="myForm-menubar" enctype="multipart/form-data" action="?page=comicpress-options">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
<?php wp_nonce_field( 'update-options' ); ?>
|
||||
|
||||
<div class="comicpress-options">
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="disable_default_menubar" name="disable_default_menubar" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_default_menubar']); ?> />
|
||||
<input id="disable_default_menubar" name="disable_default_menubar" type="checkbox" value="1" <?php checked (true, $comicpress_options['disable_default_menubar'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Allows you to customize the location of the Menubar via Widgets or, just not have it.', 'comicpress' ); ?>
|
||||
@@ -33,7 +33,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="enable_search_in_menubar" name="enable_search_in_menubar" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_search_in_menubar']); ?> />
|
||||
<input id="enable_search_in_menubar" name="enable_search_in_menubar" type="checkbox" value="1" <?php checked( true, $comicpress_options['enable_search_in_menubar'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Searchforms can be fun when you have something to search for.', 'comicpress' ); ?>
|
||||
@@ -46,7 +46,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="enable_rss_in_menubar" name="enable_rss_in_menubar" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_rss_in_menubar']); ?> />
|
||||
<input id="enable_rss_in_menubar" name="enable_rss_in_menubar" type="checkbox" value="1" <?php checked( true, $comicpress_options['enable_rss_in_menubar'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Adds an RSS link icon to your menubar on the right side.', 'comicpress' ); ?>
|
||||
@@ -59,7 +59,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="disable_jquery_menu_code" name="disable_jquery_menu_code" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_jquery_menu_code']); ?> />
|
||||
<input id="disable_jquery_menu_code" name="disable_jquery_menu_code" type="checkbox" value="1" <?php checked( true, $comicpress_options['disable_jquery_menu_code'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Disable the loading of the menubar jQuery. If you do not want the ddsmoother menu code to load. (Will not do drop downs without it.)', 'comicpress' ); ?>
|
||||
@@ -72,7 +72,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="enable_breadcrumbs" name="enable_breadcrumbs" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_breadcrumbs']); ?> />
|
||||
<input id="enable_breadcrumbs" name="enable_breadcrumbs" type="checkbox" value="1" <?php checked( true, $comicpress_options['enable_breadcrumbs'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'This will create a pathable breathcrumbs beneith the menubar underneith the default menubar location.', 'comicpress' ); ?>
|
||||
@@ -98,7 +98,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="menubar_social_icons" name="menubar_social_icons" type="checkbox" value="1" <?php checked(true, $comicpress_options['menubar_social_icons']); ?> />
|
||||
<input id="menubar_social_icons" name="menubar_social_icons" type="checkbox" value="1" <?php checked( true, $comicpress_options['menubar_social_icons'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Adds additional social icons in the menubar on in the menunav area. Put the entire http:// url in the input box that leads to your account on those sites. Leave field empty if you do not have one and it will not show.', 'comicpress' ); ?>
|
||||
@@ -129,7 +129,7 @@
|
||||
<strong><?php _e( 'LinkedIn', 'comicpress' ); ?></strong>
|
||||
</td>
|
||||
<?php
|
||||
if (!isset($comicpress_options['menubar_social_linkedin']))
|
||||
if ( ! isset( $comicpress_options['menubar_social_linkedin'] ) )
|
||||
$comicpress_options['menubar_social_linkedin'] = '';
|
||||
?>
|
||||
<td>
|
||||
@@ -137,13 +137,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong><?php _e( 'Pinterest', 'comicpress' ); ?></strong>
|
||||
</td>
|
||||
<td>
|
||||
<strong><?php _e( 'Pinterest', 'comicpress' ); ?></strong>
|
||||
</td>
|
||||
<?php
|
||||
if (!isset($comicpress_options['menubar_social_pinterest']))
|
||||
if ( ! isset( $comicpress_options['menubar_social_pinterest'] ) )
|
||||
$comicpress_options['menubar_social_pinterest'] = '';
|
||||
?>
|
||||
?>
|
||||
<td>
|
||||
<input type="text" size="60" name="menubar_social_pinterest" id="menubar_social_pinterest" value="<?php echo $comicpress_options['menubar_social_pinterest']; ?>" />
|
||||
</td>
|
||||
@@ -153,7 +153,7 @@
|
||||
<strong><?php _e( 'YouTube', 'comicpress' ); ?></strong>
|
||||
</td>
|
||||
<?php
|
||||
if (!isset($comicpress_options['menubar_social_youtube']))
|
||||
if ( ! isset( $comicpress_options['menubar_social_youtube'] ) )
|
||||
$comicpress_options['menubar_social_youtube'] = '';
|
||||
?>
|
||||
<td>
|
||||
@@ -165,7 +165,7 @@
|
||||
<strong><?php _e( 'Flickr', 'comicpress' ); ?></strong>
|
||||
</td>
|
||||
<?php
|
||||
if (!isset($comicpress_options['menubar_social_flickr']))
|
||||
if ( ! isset($comicpress_options['menubar_social_flickr'] ) )
|
||||
$comicpress_options['menubar_social_flickr'] = '';
|
||||
?>
|
||||
<td>
|
||||
@@ -177,7 +177,7 @@
|
||||
<strong><?php _e( 'Tumblr', 'comicpress' ); ?></strong>
|
||||
</td>
|
||||
<?php
|
||||
if (!isset($comicpress_options['menubar_social_tumblr']))
|
||||
if ( ! isset( $comicpress_options['menubar_social_tumblr'] ) )
|
||||
$comicpress_options['menubar_social_tumblr'] = '';
|
||||
?>
|
||||
<td>
|
||||
@@ -189,7 +189,7 @@
|
||||
<strong><?php _e( 'DeviantART', 'comicpress' ); ?></strong>
|
||||
</td>
|
||||
<?php
|
||||
if (!isset($comicpress_options['menubar_social_deviantart']))
|
||||
if ( ! isset( $comicpress_options['menubar_social_deviantart'] ) )
|
||||
$comicpress_options['menubar_social_deviantart'] = '';
|
||||
?>
|
||||
<td>
|
||||
@@ -201,7 +201,7 @@
|
||||
<strong><?php _e( 'MySpace', 'comicpress' ); ?></strong>
|
||||
</td>
|
||||
<?php
|
||||
if (!isset($comicpress_options['menubar_social_myspace']))
|
||||
if ( ! isset( $comicpress_options['menubar_social_myspace'] ) )
|
||||
$comicpress_options['menubar_social_myspace'] = '';
|
||||
?>
|
||||
<td>
|
||||
@@ -213,7 +213,7 @@
|
||||
<strong><?php _e( 'Email', 'comicpress' ); ?></strong>
|
||||
</td>
|
||||
<?php
|
||||
if (!isset($comicpress_options['menubar_social_email']))
|
||||
if ( ! isset( $comicpress_options['menubar_social_email'] ) )
|
||||
$comicpress_options['menubar_social_email'] = '';
|
||||
?>
|
||||
<td>
|
||||
@@ -238,4 +238,4 @@
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="comicpress-postspages">
|
||||
<form method="post" id="myForm-general" enctype="multipart/form-data" action="?page=comicpress-options">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
<?php wp_nonce_field( 'update-options' ); ?>
|
||||
|
||||
<div class="comicpress-options">
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="disable_post_titles" name="disable_post_titles" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_post_titles']); ?> />
|
||||
<input id="disable_post_titles" name="disable_post_titles" type="checkbox" value="1" <?php checked( true, $comicpress_options['disable_post_titles'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Post titles will be turned off. If you disable the titles on posts can still add a post-image in the post editor.', 'comicpress' ); ?>
|
||||
@@ -33,7 +33,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="enable_post_calendar" name="enable_post_calendar" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_post_calendar']); ?> />
|
||||
<input id="enable_post_calendar" name="enable_post_calendar" type="checkbox" value="1" <?php checked( true, $comicpress_options['enable_post_calendar'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Enabling this option will display a calendar image on your blog posts. The graphic calendar is an image that has the date of the blog post overlayed on top of it.', 'comicpress' ); ?>
|
||||
@@ -46,7 +46,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="enable_post_author_gravatar" name="enable_post_author_gravatar" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_post_author_gravatar']); ?> />
|
||||
<input id="enable_post_author_gravatar" name="enable_post_author_gravatar" type="checkbox" value="1" <?php checked( true, $comicpress_options['enable_post_author_gravatar'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php printf(
|
||||
@@ -65,7 +65,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="enable_avatar_trick" name="enable_avatar_trick" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_avatar_trick']); ?> />
|
||||
<input id="enable_avatar_trick" name="enable_avatar_trick" type="checkbox" value="1" <?php checked( true, $comicpress_options['enable_avatar_trick'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'With this enabled, the avatar\'s that are displayed will be jquery modified to look like polaroids randomly tilted.', 'comicpress' ); ?>
|
||||
@@ -78,7 +78,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="disable_tags_in_posts" name="disable_tags_in_posts" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_tags_in_posts']); ?> />
|
||||
<input id="disable_tags_in_posts" name="disable_tags_in_posts" type="checkbox" value="1" <?php checked( true, $comicpress_options['disable_tags_in_posts'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Checkmarking this will make it so that tags will not appear in posts.', 'comicpress' ); ?>
|
||||
@@ -91,7 +91,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="disable_categories_in_posts" name="disable_categories_in_posts" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_categories_in_posts']); ?> />
|
||||
<input id="disable_categories_in_posts" name="disable_categories_in_posts" type="checkbox" value="1" <?php checked( true, $comicpress_options['disable_categories_in_posts'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Checkmarking this will make it so that categories will not appear in posts.', 'comicpress' ); ?>
|
||||
@@ -104,7 +104,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="disable_author_info_in_posts" name="disable_author_info_in_posts" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_author_info_in_posts']); ?> />
|
||||
<input id="disable_author_info_in_posts" name="disable_author_info_in_posts" type="checkbox" value="1" <?php checked( true, $comicpress_options['disable_author_info_in_posts'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Checkmarking this will make it so that the by Author information will not appear in posts.', 'comicpress' ); ?>
|
||||
@@ -117,7 +117,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="disable_date_info_in_posts" name="disable_date_info_in_posts" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_date_info_in_posts']); ?> />
|
||||
<input id="disable_date_info_in_posts" name="disable_date_info_in_posts" type="checkbox" value="1" <?php checked( true, $comicpress_options['disable_date_info_in_posts'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Checkmarking this will make it so that posted on date information will not appear in posts.', 'comicpress' ); ?>
|
||||
@@ -130,7 +130,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="disable_posted_at_time_in_posts" name="disable_posted_at_time_in_posts" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_posted_at_time_in_posts']); ?> />
|
||||
<input id="disable_posted_at_time_in_posts" name="disable_posted_at_time_in_posts" type="checkbox" value="1" <?php checked( true, $comicpress_options['disable_posted_at_time_in_posts'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Checkmarking this will make it so that the information about what time the post was made will not show.', 'comicpress' ); ?>
|
||||
@@ -143,7 +143,7 @@
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="enable_last_modified_in_posts" name="enable_last_modified_in_posts" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_last_modified_in_posts']); ?> />
|
||||
<input id="enable_last_modified_in_posts" name="enable_last_modified_in_posts" type="checkbox" value="1" <?php checked( true, $comicpress_options['enable_last_modified_in_posts'] ); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e( 'Checkmarking this will make it so that it will show when the last time that the post was modified in the post date information.', 'comicpress' ); ?>
|
||||
@@ -151,16 +151,16 @@
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$current_directory = comicpress_themeinfo('moods_directory');
|
||||
if (empty($current_directory)) $current_directory = 'default';
|
||||
$dirs_to_search = array_unique(array(get_template_directory(), get_stylesheet_directory()));
|
||||
$current_directory = comicpress_themeinfo( 'moods_directory' );
|
||||
if ( empty( $current_directory ) ) $current_directory = 'default';
|
||||
$dirs_to_search = array_unique( array( get_template_directory(), get_stylesheet_directory() ) );
|
||||
$mood_directories = array();
|
||||
foreach ($dirs_to_search as $moodir) {
|
||||
if (is_dir($moodir . '/images/moods')) {
|
||||
$thisdir = null;
|
||||
$thisdir = array();
|
||||
$thisdir = glob($moodir. '/images/moods/*');
|
||||
$mood_directories = array_merge($mood_directories, $thisdir);
|
||||
foreach ( $dirs_to_search as $moodir ) {
|
||||
if ( is_dir( $moodir . '/images/moods' ) ) {
|
||||
$thisdir = null;
|
||||
$thisdir = array();
|
||||
$thisdir = glob( $moodir . '/images/moods/*' );
|
||||
$mood_directories = array_merge( $mood_directories, $thisdir );
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -168,16 +168,18 @@
|
||||
<tr class="alternate">
|
||||
<th scope="row" colspan="2">
|
||||
<label for="moods_directory">
|
||||
<?php _e( 'Moods Directory','comicpress' ); ?>
|
||||
<?php _e( 'Moods Directory', 'comicpress' ); ?>
|
||||
</label>
|
||||
<select name="moods_directory" id="moods_directory">
|
||||
<option class="level-0" value="none" <?php if ($current_directory == "none") { ?>selected="selected"<?php } ?>><?php _e( 'none', 'comicpress' ); ?></option>
|
||||
<?php
|
||||
foreach ($mood_directories as $mood_dirs) {
|
||||
if (is_dir($mood_dirs)) {
|
||||
$mood_dir_name = basename($mood_dirs); ?>
|
||||
foreach ( $mood_directories as $mood_dirs ) {
|
||||
if ( is_dir( $mood_dirs) ) {
|
||||
$mood_dir_name = basename( $mood_dirs );
|
||||
?>
|
||||
<option class="level-0" value="<?php echo $mood_dir_name; ?>" <?php if ($current_directory == $mood_dir_name) { ?>selected="selected"<?php } ?>><?php echo $mood_dir_name; ?></option>
|
||||
<?php }
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@@ -223,7 +225,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<?php
|
||||
if (!isset($comicpress_options['content_width']))
|
||||
if ( ! isset( $comicpress_options['content_width'] ) )
|
||||
$comicpress_options['content_width'] = 500;
|
||||
?>
|
||||
<th scope="row">
|
||||
@@ -240,7 +242,7 @@
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<?php
|
||||
if (!isset($comicpress_options['content_width_disabled_sidebars']))
|
||||
if ( ! isset( $comicpress_options['content_width_disabled_sidebars'] ) )
|
||||
$comicpress_options['content_width_disabled_sidebars'] = 700;
|
||||
?>
|
||||
<th scope="row">
|
||||
@@ -272,4 +274,4 @@
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div id="comicpress-splash">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
<?php wp_nonce_field( 'update-options' ); ?>
|
||||
|
||||
<div class="comicpress-options">
|
||||
|
||||
@@ -87,4 +87,4 @@
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
11
page.php
11
page.php
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
get_header();
|
||||
|
||||
if (comicpress_sidebars_disabled()) $content_width = comicpress_themeinfo('content_width_disabled_sidebars');
|
||||
if ( comicpress_sidebars_disabled() ) $content_width = comicpress_themeinfo( 'content_width_disabled_sidebars' );
|
||||
|
||||
while (have_posts()) : the_post();
|
||||
get_template_part('content', 'page');
|
||||
comments_template('', true);
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
get_template_part( 'content', 'page' );
|
||||
comments_template( '', true );
|
||||
endwhile;
|
||||
|
||||
get_footer();
|
||||
get_footer();
|
||||
|
||||
21
search.php
21
search.php
@@ -1,13 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Search results Page
|
||||
* by Philip M. Hofer (Frumph)
|
||||
* http://frumph.net/
|
||||
*
|
||||
* Content for the Search results Page
|
||||
*
|
||||
* @package Comicpress
|
||||
*/
|
||||
|
||||
|
||||
get_header();
|
||||
|
||||
@@ -27,7 +18,7 @@ if ( have_posts() ) :
|
||||
<?php
|
||||
printf(
|
||||
/* translators: Number of found results */
|
||||
_n( '%d result.', '%d results.', $count, 'comicpress' ),
|
||||
_n( '%d result', '%d results', 'comicpress' ),
|
||||
$count
|
||||
);
|
||||
?>
|
||||
@@ -52,7 +43,9 @@ if ( have_posts() ) :
|
||||
<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; ?>
|
||||
<?php
|
||||
endwhile;
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
@@ -64,8 +57,8 @@ if ( have_posts() ) :
|
||||
$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();
|
||||
|
||||
@@ -1,18 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Notice for Sidebar left
|
||||
* by Philip M. Hofer (Frumph)
|
||||
* http://frumph.net/
|
||||
*
|
||||
* Content for Notice for Sidebar left
|
||||
*
|
||||
* @package Comicpress
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<div id="sidebar-left">
|
||||
<div class="sidebar">
|
||||
<?php
|
||||
do_action('comicpress-sidebar-left');
|
||||
if ( !dynamic_sidebar('sidebar-left-sidebar') ) { ?>
|
||||
<div class="sidebar-no-widgets">
|
||||
<?php _e( 'There are currently no widgets assigned to the left-sidebar, place some!', 'comicpress' ); ?>
|
||||
<br />
|
||||
<br />
|
||||
<?php _e( 'Once you add widgets to this sidebar, this default information will go away.', 'comicpress' ); ?>
|
||||
<br />
|
||||
<br />
|
||||
<?php _e( 'Widgets can be added by going to your dashboard (wp-admin) ➔ Appearance ➔ Widgets, drag a widget you want to see into one of the appropriate sidebars.', 'comicpress' ); ?>
|
||||
<br />
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="sidebar">
|
||||
<?php
|
||||
do_action( 'comicpress-sidebar-left' );
|
||||
if ( ! dynamic_sidebar( 'sidebar-left-sidebar' ) ) {
|
||||
?>
|
||||
<div class="sidebar-no-widgets">
|
||||
<?php _e( 'There are currently no widgets assigned to the left-sidebar, place some!', 'comicpress' ); ?>
|
||||
<br />
|
||||
<br />
|
||||
<?php _e( 'Once you add widgets to this sidebar, this default information will go away.', 'comicpress' ); ?>
|
||||
<br />
|
||||
<br />
|
||||
<?php _e( 'Widgets can be added by going to your dashboard (wp-admin) ➔ Appearance ➔ Widgets, drag a widget you want to see into one of the appropriate sidebars.', 'comicpress' ); ?>
|
||||
<br />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,18 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Notice for Sidebar rights
|
||||
* by Philip M. Hofer (Frumph)
|
||||
* http://frumph.net/
|
||||
*
|
||||
* Content for Notice for Sidebar rights
|
||||
*
|
||||
* @package Comicpress
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<div id="sidebar-right">
|
||||
<div class="sidebar">
|
||||
<?php
|
||||
do_action('comicpress-sidebar-right');
|
||||
if ( !dynamic_sidebar('sidebar-right-sidebar') ) { ?>
|
||||
<div class="sidebar-no-widgets">
|
||||
<?php _e( 'There are currently no widgets assigned to the right-sidebar, place some!', 'comicpress' ); ?>
|
||||
<br />
|
||||
<br />
|
||||
<?php _e( 'Once you add widgets to this sidebar, this default information will go away.', 'comicpress' ); ?>
|
||||
<br />
|
||||
<br />
|
||||
<?php _e( 'Widgets can be added by going to your dashboard (wp-admin) ➔ Appearance ➔ Widgets, drag a widget you want to see into one of the appropriate sidebars.', 'comicpress' ); ?>
|
||||
<br />
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar">
|
||||
<?php
|
||||
do_action( 'comicpress-sidebar-right' );
|
||||
if ( ! dynamic_sidebar( 'sidebar-right-sidebar' ) ) {
|
||||
?>
|
||||
<div class="sidebar-no-widgets">
|
||||
<?php _e( 'There are currently no widgets assigned to the right-sidebar, place some!', 'comicpress' ); ?>
|
||||
<br />
|
||||
<br />
|
||||
<?php _e( 'Once you add widgets to this sidebar, this default information will go away.', 'comicpress' ); ?>
|
||||
<br />
|
||||
<br />
|
||||
<?php _e( 'Widgets can be added by going to your dashboard (wp-admin) ➔ Appearance ➔ Widgets, drag a widget you want to see into one of the appropriate sidebars.', 'comicpress' ); ?>
|
||||
<br />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<div id="sidebar-shop">
|
||||
<div class="sidebar">
|
||||
<?php
|
||||
do_action('comicpress-sidebar-shop');
|
||||
dynamic_sidebar('sidebar-shop');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar">
|
||||
<?php
|
||||
do_action( 'comicpress-sidebar-shop' );
|
||||
dynamic_sidebar( 'sidebar-shop' );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<div id="sidebar">
|
||||
<div class="sidebar">
|
||||
<?php
|
||||
do_action('sidebar');
|
||||
dynamic_sidebar();
|
||||
do_action( 'sidebar' );
|
||||
dynamic_sidebar();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
27
single.php
27
single.php
@@ -1,26 +1,29 @@
|
||||
<?php
|
||||
get_header();
|
||||
|
||||
if (is_active_sidebar('blog')) get_sidebar('blog');
|
||||
if ( is_active_sidebar( 'blog' ) ) get_sidebar( 'blog' );
|
||||
|
||||
if (have_posts()) {
|
||||
if ( have_posts() ) {
|
||||
|
||||
while (have_posts()) : the_post();
|
||||
if (get_post_type() !== 'post') {
|
||||
get_template_part('content', get_post_type() );
|
||||
comments_template('', true);
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
if ( get_post_type() !== 'post' ) {
|
||||
get_template_part( 'content', get_post_type() );
|
||||
comments_template( '', true );
|
||||
} else {
|
||||
get_template_part('content', get_post_format());
|
||||
comments_template('', true);
|
||||
get_template_part( 'content', get_post_format() );
|
||||
comments_template( '', true );
|
||||
}
|
||||
endwhile;
|
||||
|
||||
} else { ?>
|
||||
} else {
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post-head"></div>
|
||||
<div class="post">
|
||||
<p><?php _e( 'Sorry, post is not found.', 'comicpress' ); ?></p>
|
||||
<p>
|
||||
<?php _e( 'Sorry, post is not found.', 'comicpress' ); ?>
|
||||
</p>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
@@ -28,4 +31,4 @@ if (have_posts()) {
|
||||
<?php
|
||||
}
|
||||
|
||||
get_footer();
|
||||
get_footer();
|
||||
|
||||
@@ -1,54 +1,56 @@
|
||||
<?php
|
||||
get_header();
|
||||
$character = (isset($wp_query->query_vars['characters'])) ? esc_html($wp_query->query_vars['characters']) : '';
|
||||
$character = ( isset( $wp_query->query_vars['characters'] ) ) ? esc_html( $wp_query->query_vars['characters'] ) : '';
|
||||
|
||||
if (!empty($character)) {
|
||||
if ( ! empty( $character) ) {
|
||||
$args = array(
|
||||
'post_type' => 'page',
|
||||
'meta_key' => 'location-overwrite',
|
||||
'meta_value' => $character
|
||||
'post_type' => 'page',
|
||||
'meta_key' => 'location-overwrite',
|
||||
'meta_value' => $character
|
||||
);
|
||||
|
||||
$insertPage = new WP_Query(); $insertPage->query($args);
|
||||
$insertPage = new WP_Query();
|
||||
$insertPage->query( $args );
|
||||
|
||||
if ($insertPage->have_posts()) {
|
||||
while ($insertPage->have_posts()) : $insertPage->the_post();
|
||||
get_template_part('content', 'page');
|
||||
if ( $insertPage->have_posts() ) {
|
||||
while ( $insertPage->have_posts() ) :
|
||||
$insertPage->the_post();
|
||||
get_template_part( 'content', 'page' );
|
||||
endwhile;
|
||||
$args = array(
|
||||
'nopaging' => true,
|
||||
'numberposts' => -1,
|
||||
'posts_per_page' => -1,
|
||||
'post_type' => 'comic',
|
||||
'orderby' => 'post_date',
|
||||
'order' => 'ASC',
|
||||
'post_status' => 'publish',
|
||||
'characters' => $character,
|
||||
);
|
||||
$args = array(
|
||||
'nopaging' => true,
|
||||
'numberposts' => -1,
|
||||
'posts_per_page' => -1,
|
||||
'post_type' => 'comic',
|
||||
'orderby' => 'post_date',
|
||||
'order' => 'ASC',
|
||||
'post_status' => 'publish',
|
||||
'characters' => $character,
|
||||
);
|
||||
$qposts = get_posts( $args );
|
||||
if (!empty($qposts)) {
|
||||
$output = '<div class="character-stats">';
|
||||
$first_seen_object = reset($qposts);
|
||||
$first_seen_title = $first_seen_object->post_title;
|
||||
$first_seen_id = $first_seen_object->ID;
|
||||
$last_seen_object = end($qposts);
|
||||
$last_seen_title = $last_seen_object->post_title;
|
||||
$last_seen_id = $last_seen_object->ID;
|
||||
if ($first_seen_id == $last_seen_id) {
|
||||
$output .= '<i>'.__( 'Only Appearance:', 'comicpress' ).'</i> <a href="'.get_permalink($first_seen_id).'">'.$first_seen_title.'</a><br />';
|
||||
if ( ! empty( $qposts ) ) {
|
||||
$output = '<div class="character-stats">';
|
||||
$first_seen_object = reset( $qposts );
|
||||
$first_seen_title = $first_seen_object->post_title;
|
||||
$first_seen_id = $first_seen_object->ID;
|
||||
$last_seen_object = end( $qposts );
|
||||
$last_seen_title = $last_seen_object->post_title;
|
||||
$last_seen_id = $last_seen_object->ID;
|
||||
if ( $first_seen_id == $last_seen_id ) {
|
||||
$output .= '<i>' . __( 'Only Appearance:', 'comicpress' ) . '</i> <a href="' . get_permalink( $first_seen_id ) . '">' . $first_seen_title . '</a><br />';
|
||||
} else {
|
||||
$output .= '<i>'.__( 'Recent Appearance:', 'comicpress' ).'</i> <a href="'.get_permalink($last_seen_id).'">'.$last_seen_title.'</a><br />';
|
||||
$output .= '<i>'.__( 'First Appearance:', 'comicpress' ).'</i> <a href="'.get_permalink($first_seen_id).'">'.$first_seen_title.'</a><br />';
|
||||
$output .= '<i>' . __( 'Recent Appearance:', 'comicpress' ) . '</i> <a href="' . get_permalink( $last_seen_id ) . '">' . $last_seen_title . '</a><br />';
|
||||
$output .= '<i>' . __( 'First Appearance:', 'comicpress' ) . '</i> <a href="' . get_permalink( $first_seen_id ) . '">' . $first_seen_title . '</a><br />';
|
||||
}
|
||||
$output .= '</div>';
|
||||
echo apply_filters('comicpress-character-stats', $output);
|
||||
echo apply_filters( 'comicpress-character-stats', $output );
|
||||
}
|
||||
|
||||
}
|
||||
wp_reset_query();
|
||||
}
|
||||
|
||||
// this shows what the 'archive' would show, if you don't want the archive underneith the custom page, remove this
|
||||
get_template_part('archive');
|
||||
// this shows what the 'archive' would show, if you don't want the archive underneith the custom page, remove this.
|
||||
get_template_part( 'archive' );
|
||||
|
||||
get_footer();
|
||||
|
||||
@@ -1,47 +1,49 @@
|
||||
<?php
|
||||
get_header();
|
||||
$location = (isset($wp_query->query_vars['locations'])) ? esc_html($wp_query->query_vars['locations']) : '';
|
||||
$location = ( isset( $wp_query->query_vars['locations'] ) ) ? esc_html( $wp_query->query_vars['locations'] ) : '';
|
||||
|
||||
if (!empty($location)) {
|
||||
if ( ! empty( $location ) ) {
|
||||
$args = array(
|
||||
'post_type' => 'page',
|
||||
'meta_key' => 'location-overwrite',
|
||||
'meta_value' => $location
|
||||
'post_type' => 'page',
|
||||
'meta_key' => 'location-overwrite',
|
||||
'meta_value' => $location
|
||||
);
|
||||
|
||||
$insertPage = new WP_Query(); $insertPage->query($args);
|
||||
$insertPage = new WP_Query();
|
||||
$insertPage->query( $args );
|
||||
|
||||
if ($insertPage->have_posts()) {
|
||||
while ($insertPage->have_posts()) : $insertPage->the_post();
|
||||
get_template_part('content', 'page');
|
||||
if ( $insertPage->have_posts() ) {
|
||||
while ( $insertPage->have_posts() ) :
|
||||
$insertPage->the_post();
|
||||
get_template_part( 'content', 'page' );
|
||||
endwhile;
|
||||
}
|
||||
wp_reset_query();
|
||||
|
||||
$args = array(
|
||||
'nopaging' => true,
|
||||
'numberposts' => -1,
|
||||
'posts_per_page' => -1,
|
||||
'post_type' => 'comic',
|
||||
'orderby' => 'post_date',
|
||||
'order' => 'ASC',
|
||||
'post_status' => 'publish',
|
||||
'locations' => $location,
|
||||
);
|
||||
$args = array(
|
||||
'nopaging' => true,
|
||||
'numberposts' => -1,
|
||||
'posts_per_page' => -1,
|
||||
'post_type' => 'comic',
|
||||
'orderby' => 'post_date',
|
||||
'order' => 'ASC',
|
||||
'post_status' => 'publish',
|
||||
'locations' => $location,
|
||||
);
|
||||
$qposts = get_posts( $args );
|
||||
if (!empty($qposts)) {
|
||||
$output = '<div class="location-stats">';
|
||||
$first_seen_object = reset($qposts);
|
||||
$first_seen_title = $first_seen_object->post_title;
|
||||
$first_seen_id = $first_seen_object->ID;
|
||||
$last_seen_object = end($qposts);
|
||||
$last_seen_title = $last_seen_object->post_title;
|
||||
$last_seen_id = $last_seen_object->ID;
|
||||
if ($first_seen_id == $last_seen_id) {
|
||||
$output .= '<i>'.__( 'Only Scene:', 'comicpress' ).'</i> <a href="'.get_permalink($first_seen_id).'">'.$first_seen_title.'</a><br />';
|
||||
if ( ! empty( $qposts ) ) {
|
||||
$output = '<div class="location-stats">';
|
||||
$first_seen_object = reset( $qposts );
|
||||
$first_seen_title = $first_seen_object->post_title;
|
||||
$first_seen_id = $first_seen_object->ID;
|
||||
$last_seen_object = end ($qposts );
|
||||
$last_seen_title = $last_seen_object->post_title;
|
||||
$last_seen_id = $last_seen_object->ID;
|
||||
if ( $first_seen_id == $last_seen_id ) {
|
||||
$output .= '<i>' . __( 'Only Scene:', 'comicpress' ) . '</i> <a href="' . get_permalink( $first_seen_id ) . '">' . $first_seen_title . '</a><br />';
|
||||
} else {
|
||||
$output .= '<i>'.__( 'Recent Scene:', 'comicpress' ).'</i> <a href="'.get_permalink($last_seen_id).'">'.$last_seen_title.'</a><br />';
|
||||
$output .= '<i>'.__( 'First Scene:', 'comicpress' ).'</i> <a href="'.get_permalink($first_seen_id).'">'.$first_seen_title.'</a><br />';
|
||||
$output .= '<i>' . __( 'Recent Scene:', 'comicpress' ) . '</i> <a href="' . get_permalink( $last_seen_id ) . '">' . $last_seen_title . '</a><br />';
|
||||
$output .= '<i>' . __( 'First Scene:', 'comicpress' ) . '</i> <a href="' . get_permalink( $first_seen_id ) . '">' . $first_seen_title . '</a><br />';
|
||||
}
|
||||
$output .= '</div>';
|
||||
echo $output;
|
||||
@@ -50,7 +52,7 @@ if (!empty($location)) {
|
||||
wp_reset_query();
|
||||
}
|
||||
|
||||
// this shows what the 'archive' would show, if you don't want the archive underneith the custom page, remove this
|
||||
get_template_part('archive');
|
||||
// this shows what the 'archive' would show, if you don't want the archive underneith the custom page, remove this.
|
||||
get_template_part( 'archive' );
|
||||
|
||||
get_footer();
|
||||
|
||||
Reference in New Issue
Block a user