Permalink
Browse files

ComicPress 2.9.4 for WordPress 3.4

Signed-off-by: Frumph <philip@frumph.net>
  • Loading branch information...
Frumph committed May 27, 2012
1 parent 5672eae commit c6fbf2f2ef24e87de01493aaf1b2cee8798c49e6
File renamed without changes.
View
@@ -18,7 +18,7 @@
$count = $wp_query->found_posts;
$post = $posts[0]; // Hack. Set $post so that the_date() works
$post_title_type = $title_string = '';
- if ($post->post_type !== 'post') $post_title_type = $post->post_type.'-'; // extra space at the end for visual
+// if ($post->post_type !== 'post') $post_title_type = $post->post_type.'-'; // extra space at the end for visual
if (is_category()) { /* Category */
$title_string = __('Archive for &#8216;','comicpress').$post_title_type.single_cat_title('',false).__('&#8217;', 'comicpress');
} elseif(is_tag()) { /* Tag */
View
@@ -1,6 +1,24 @@
-2.9.3
+2.9.4
+Commented out padding: 10px 0 0 0; in the #header {} css.
+Changed to new code for custom-background and custom-header
+changed css for padding in style.css: #comment, #author, #email, #url, #s-search, .comicpress_control_panel_widget input { padding: 2px 0 3px 0; }
+changed css for padding in .menunav-rss
+changed css for the "current_page_item" in the menubar from a change of color to just being "bold"
+changed css for .menunav search adjusting the width with CSS of the search input box in the menubar. (fixed)
+removed extra wp_link_pages from the page.php file
+Template files were moved from the root into their own directory /templates/ if you have a template associated with a page you will have to re-associate it.
+Adjusted some parts of displaypost.php where it shows for custom post-types or not.
+
+
+
+2.9.3.1
+removed the stray project wonderful ad from the bottom in the footer.php file
+
+2.9.3
Adjusted how the search and archive pages work to reduce memory load & count
fixed the language textdomain lines
+changed how the .txt and .htm files are read in to pass the theme review
+renamed functions/ipn.php to functions/ipn.txt, change it back to functions/ipn.php in order to utilize the IPN from paypal
2.9.2.30.3
View
@@ -1,10 +1,10 @@
<?php
//COMIC CATEGORY -the WordPress ID # of your comic category (default "3")
-$comiccat = "3";
+$comiccat = "4";
//BLOG CATEGORY - the WordPress ID of your blog category (default "4")
-$blogcat = "4";
+$blogcat = "3";
//COMIC FOLDER - the folder your comics files are located in (default "comics")
$comic_folder = "comics";
View
@@ -5,16 +5,16 @@
if (!comicpress_themeinfo('disable_footer_text')) {
echo comicpress_footer_text();
-}
-
-if (comicpress_themeinfo('enable_page_load_info')) { ?>
+} ?>
+<?php if (comicpress_themeinfo('enable_page_load_info')) { ?>
<p><?php echo get_num_queries() ?> queries. <?php if (function_exists('memory_get_usage')) { $unit=array('b','kb','mb','gb','tb','pb'); echo @round(memory_get_usage(true)/pow(1024,($i=floor(log(memory_get_usage(true),1024)))),2).' '.$unit[$i]; ?> Memory usage. <?php } timer_stop(1) ?> seconds.</p>
<?php } else { ?>
<!-- <?php echo get_num_queries() ?> queries. <?php timer_stop(1) ?> seconds. //-->
<?php } ?>
</div><!-- Ends #footer -->
</div><!-- Ends "page/page-wide" -->
</div><!-- Ends "page-wrap" -->
+
<?php if (comicpress_themeinfo('enable_caps')) { ?><div id="page-foot"></div><?php } ?>
<?php wp_footer(); ?>
View
@@ -1,49 +1,49 @@
-<?php
-
+<?php
+
+if ( ! function_exists( 'comicpress_enqueue_comment_reply' ) ) {
+ function comicpress_enqueue_comment_reply() {
+ if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
+ wp_enqueue_script( 'comment-reply' );
+ }
+ }
+}
+add_action( 'wp_enqueue_scripts', 'comicpress_enqueue_comment_reply' );
// Text domain - Languages location
load_theme_textdomain( 'comicpress', get_template_directory() . '/lang' );
-
// the_post_thumbnail('thumbnail/medium/full');
add_theme_support( 'post-thumbnails' );
-
-// Required by the wordpress review theme, it sucks donkey balls but is required.
add_theme_support( 'automatic-feed-links' );
-
-// This theme allows users to set a custom background
-add_custom_background();
+add_editor_style();
if (!isset($content_width)) $content_width = 520;
-global $comiccat, $blogcat,
-$comic_folder, $rss_comic_folder, $mini_comic_folder, $archive_comic_folder,
-$archive_comic_width, $rss_comic_width, $mini_comic_width, $blog_postcount;
+global $comiccat, $blogcat, $comic_folder, $rss_comic_folder, $mini_comic_folder, $archive_comic_folder,$archive_comic_width, $rss_comic_width, $mini_comic_width, $blog_postcount;
if (is_multisite()) {
// This section keeps it compatible with comicpress manager's options
$variables_to_extract = array();
-
- foreach (array(
- 'comiccat' => 'comiccat',
- 'blogcat' => 'blogcat',
- 'comics_path' => 'comic_folder',
- 'comicsrss_path' => 'rss_comic_folder',
- 'comicsarchive_path' => 'archive_comic_folder',
- 'comicsmini_path' => 'mini_comic_folder',
- 'archive_comic_width' => 'archive_comic_width',
- 'rss_comic_width' => 'rss_comic_width',
- 'mini_comic_width' => 'mini_comic_width',
- 'blog_postcount' => 'blog_postcount') as $options => $variable_name) {
+ foreach (array('comiccat' => 'comiccat','blogcat'=> 'blogcat','comics_path' => 'comic_folder','comicsrss_path' => 'rss_comic_folder','comicsarchive_path' => 'archive_comic_folder','comicsmini_path' => 'mini_comic_folder','archive_comic_width' => 'archive_comic_width', 'rss_comic_width' => 'rss_comic_width', 'mini_comic_width' => 'mini_comic_width','blog_postcount' => 'blog_postcount') as $options => $variable_name) {
$variables_to_extract[$variable_name] = get_option("comicpress-${options}");
}
extract($variables_to_extract);
-} else {
+} else {
@require_once( get_template_directory() . '/comicpress-config.php');
}
/* child-functions.php / child-widgets.php - in the child theme */
get_template_part('child', 'functions');
get_template_part('child', 'widgets');
+// This theme allows users to set a custom background
+// the global if has anything in it from the child theme, use it.
+$comicpress_background_array = array();
+if (function_exists('comicpress_child_theme_background_array'))
+ $comicpress_background_array = comicpress_child_theme_background_array();
+// Set defaults if it doesn't exit from the global
+if (!isset($comicpress_background_array)) $comicpress_background_array = array('default-color' => 'fff', 'default-image' => '');
+add_theme_support( 'custom-background', $comicpress_background_array );
+
+
// These autoload
foreach (glob(get_template_directory() . "/functions/*.php") as $funcfile) {
@require_once($funcfile);
@@ -155,7 +155,6 @@ function __comicpress_init() {
// initiate the scripts
if (!is_admin()) {
wp_enqueue_script('jquery');
- if ( comicpress_themeinfo('enable_comment_javascript') ) wp_enqueue_script( 'comment-reply' );
if (!comicpress_themeinfo('disable_jquery_menu_code')) {
wp_enqueue_script('ddsmoothmenu_js', get_template_directory_uri() . '/js/ddsmoothmenu.js', null, null, true);
wp_enqueue_script('menubar_js', get_template_directory_uri() . '/js/menubar.js', null, null, true);
@@ -236,7 +235,7 @@ function comicpress_add_head() {
var image_root = '<?php echo get_template_directory_uri(); ?>/images/';
var permalink = '<?php the_permalink() ?>';
</script>
- <?php }
+<?php }
}
if (!function_exists('is_cp_theme_layout')) {
@@ -522,7 +521,7 @@ function comicpress_themeinfo($whichinfo = null) {
$comicpress_coreinfo = wp_upload_dir();
$comicpress_addinfo = array(
'upload_path' => get_option('upload_path'),
- 'version' => '2.9.3',
+ 'version' => '2.9.4',
'siteurl' => trailingslashit(get_option('siteurl')),
'home' => trailingslashit(home_url()),
'comiccat' => $comiccat,
@@ -660,4 +659,4 @@ function comicpress_disable_sidebars() {
return false;
}
-?>
+?>
@@ -1,69 +1,61 @@
-<?php
-add_filter('comicpress_header_image_width', 'comicpress_change_header_width');
-
-function comicpress_change_header_width($width) {
- $new_width = comicpress_themeinfo('custom_image_header_width');
- if (!empty($new_width) && ((int)$new_width > 0))
- $width = $new_width;
- return $width;
-}
-
-add_filter('comicpress_header_image_height', 'comicpress_change_header_height');
-
-function comicpress_change_header_height($height) {
- $new_height = comicpress_themeinfo('custom_image_header_height');
- if (!empty($new_height) && ((int)$new_height > 0))
- $height = $new_height;
- return $height;
-}
-
-// Custom Image Header Defaults
-define('HEADER_TEXTCOLOR', '');
-define('HEADER_IMAGE', ''); // %s is theme dir
-define('NO_HEADER_TEXT', true);
-
-define( 'HEADER_IMAGE_WIDTH', apply_filters( 'comicpress_header_image_width', '980') );
-define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'comicpress_header_image_height', '100') );
-set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );
-
-add_custom_image_header('comicpress_header_style', 'comicpress_admin_header_style');
+<?php
+
+$custom_header_args = array();
+
+add_theme_support( 'custom-header', array(
+ // Header image default
+ 'default-image' => false,
+ // Header text display default
+ 'header-text' => false,
+ // Header text color default
+ 'default-text-color' => '000',
+ // Header image width (in pixels)
+ 'width' => comicpress_themeinfo('custom_image_header_width'),
+ // Header image height (in pixels)
+ 'height' => comicpress_themeinfo('custom_image_header_height'),
+ // Header image random rotation default
+ 'random-default' => false,
+ // Template header style callback
+ 'wp-head-callback' => 'comicpress_header_style',
+ // Admin header style callback
+ 'admin-head-callback' => 'comicpress_admin_header_style',
+ // Admin preview style callback
+ 'admin-preview-callback' => 'comicpress_admin_header_style'
+ ) );
function comicpress_admin_header_style() { ?>
<style type="text/css">
#headimg {
- width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
- height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
+ width: <?php echo get_custom_header()->width; ?>px;
+ height: <?php echo get_custom_header()->height; ?>px;
background: url(<?php header_image(); ?>) no-repeat center;
}
-
+
#headimg h1, #headimg .description {
display: none;
}
</style>
-
<?php
}
-
+
function comicpress_header_style() {
if (get_header_image()) { ?>
<style type="text/css">
#header {
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
- height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
+ /* height: <?php echo HEADER_IMAGE_HEIGHT; ?>px; */
background: url(<?php header_image(); ?>) top center no-repeat;
overflow: hidden;
}
-
#header h1 { padding: 0; }
#header h1 a {
display: block;
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
- height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
+ height: <?php echo HEADER_IMAGE_HEIGHT-1; ?>px;
text-indent: -9999px;
}
#header .description { display: none; }
</style>
-
<?php }
}
@@ -81,8 +81,9 @@ function comicpress_init_comic_swf() {
// This function will let authors who want to use comicpress as a way to output their books/text in a comic area as a page.
function comicpress_display_comic_text($comic) {
+ $output = '';
if (file_exists(comicpress_themeinfo('basedir') . '/' .$comic)) {
- $output = file_get_contents(comicpress_themeinfo('basedir') . '/' .$comic);
+ $output = implode('', file(comicpress_themeinfo('basedir') . '/' .$comic));
}
return apply_filters('comicpress_display_comic_text', $output);
}
View
@@ -25,7 +25,7 @@ function comicpress_display_post_title($is_comic = false) {
if (!function_exists('comicpress_display_post_thumbnail')) {
function comicpress_display_post_thumbnail($is_comic = false) {
global $post;
- if (function_exists('has_post_thumbnail') && !$is_comic) {
+ if (function_exists('has_post_thumbnail') && !$is_comic && ($post->post_type == 'post')) {
if ( has_post_thumbnail() ) {
$link = get_post_meta( $post->ID, 'link', true );
if (empty($link)) $link = get_permalink();
@@ -63,7 +63,7 @@ function comicpress_display_post_calendar($is_comic = false) {
if (!function_exists('comicpress_display_post_author')) {
function comicpress_display_post_author() {
global $post,$authordata;
- if ($post->post_type == 'post') {
+ if ($post->post_type == 'post' || $post->post_type == 'comic') {
$post_author = '<span class="post-author">'.__('by','comicpress').' <a href="'.get_author_posts_url( $authordata->ID, $authordata->user_nicename ).'">'.get_the_author()."</a></span>\r\n";
echo apply_filters('comicpress_display_post_author',$post_author);
}
@@ -73,7 +73,7 @@ function comicpress_display_post_author() {
if (!function_exists('comicpress_display_post_date')) {
function comicpress_display_post_date() {
global $post;
- if ($post->post_type == 'post') {
+ if ($post->post_type == 'post' || $post->post_type =='comic') {
$post_date = "<span class=\"posted-on\">".__('on&nbsp;','comicpress')."</span><span class=\"post-date\">".get_the_date()."</span>\r\n";
echo apply_filters('comicpress_display_post_date',$post_date);
}
@@ -83,7 +83,7 @@ function comicpress_display_post_date() {
if (!function_exists('comicpress_display_post_time')) {
function comicpress_display_post_time() {
global $post;
- if ($post->post_type == 'post') {
+ if ($post->post_type == 'post' || $post->post_type == 'comic') {
$post_time = "<span class=\"posted-at\">".__('at&nbsp;','comicpress')."</span><span class=\"post-time\">".get_the_time()."</span>\r\n";
echo apply_filters('comicpress_display_post_time',$post_time);
}
@@ -103,8 +103,8 @@ function comicpress_display_post_category($is_comic = false) {
echo apply_filters('comicpress_display_post_category', $post_category);
}
} else {
- $post_category = "<div class=\"post-type-cat\">". __('Posted In: ','comicpress') .$post->post_type."</div>\r\n";
- echo apply_filters('comicpress_display_post_category',$post_category);
+// $post_category = "<div class=\"post-type-cat\">". __('Posted In: ','comicpress') .$post->post_type."</div>\r\n";
+// echo apply_filters('comicpress_display_post_category',$post_category);
}
}
}
@@ -146,7 +146,7 @@ function comicpress_display_related_posts($is_comic = false) {
if (!function_exists('comicpress_display_blog_navigation')) {
function comicpress_display_blog_navigation($is_comic = false) {
global $post, $wp_query;
- if (is_single() && !$is_comic && !is_page() && !is_archive() && !is_search() && !comicpress_themeinfo('split_column_in_two') ) { ?>
+ if (is_single() && !$is_comic && !is_page() && !is_archive() && !is_search() && !comicpress_themeinfo('split_column_in_two') && ($post->post_type == 'post') ) { ?>
<div class="blognav">
<?php previous_post_link('<span class="blognav-prev">%link</span>',__(' &lsaquo; Previous ','comicpress'), TRUE); ?>
<?php next_post_link('<span class="blognav-next">%link</span>',__('Next &rsaquo; ','comicpress'), TRUE); ?>
@@ -224,9 +224,10 @@ function comicpress_display_post() {
if (!is_page()) {
comicpress_display_post_author();
comicpress_display_post_date(); comicpress_display_post_time();
- if (!is_archive() && !is_search()) {edit_post_link(__('Edit','comicpress'), ' <span class="pipe">|</span> <span class="post-edit">', '</span>'); }
+ if (!is_archive() && !is_search() && $post->post_type == 'post') { edit_post_link(__('Edit','comicpress'), ' <span class="pipe">|</span> <span class="post-edit">', '</span>'); }
comicpress_display_post_category($is_comic);
if (function_exists('the_ratings') && $post->post_type == 'post') { the_ratings(); }
+ do_action('comic-post-info');
} ?>
</div>
</div>
@@ -251,6 +252,7 @@ function comicpress_display_post() {
</div>
<?php } ?>
<?php if (is_page()) { edit_post_link(__('Edit this page.','comicpress'), '', ''); } ?>
+ <?php do_action('comic-post-foot'); ?>
</div>
<?php if (comicpress_themeinfo('enable_caps')) { ?><div class="post-foot"></div><?php } ?>
</div>
@@ -37,9 +37,13 @@ function comicpress_export_wp() {
//Insert the comic image into the RSS feed
if (!function_exists('comicpress_comic_feed')) {
function comicpress_comic_feed() {
- global $post;
+ global $wp_query, $post, $comiccat;
$output = '<p>';
- $output .= '<a href="'.get_permalink().'" title="'.comicpress_the_hovertext($post).'">'.comicpress_display_comic_thumbnail('rss',$post,true).'</a>';
+ if ($wp_query->query_vars['cat'] == $comiccat ) {
+ $output .= '<a href="'.get_permalink().'" title="'.comicpress_the_hovertext($post).'">'.comicpress_display_comic_thumbnail('comic',$post,true).'</a>';
+ } else {
+ $output .= '<a href="'.get_permalink().'" title="'.comicpress_the_hovertext($post).'">'.comicpress_display_comic_thumbnail('rss',$post,true).'</a>';
+ }
$output .= '</p>';
return apply_filters('comicpress_comic_feed', $output);
}
Oops, something went wrong.

0 comments on commit c6fbf2f

Please sign in to comment.