mirror of
https://github.com/Frumph/comic-easel.git
synced 2026-07-18 18:34:32 -04:00
1.8 Rev.
* added two input boxes to the archive tab to allow changing the name and slug references for 'chapter'
This commit is contained in:
+5
-2
@@ -87,11 +87,14 @@ if ( isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'update-op
|
||||
|
||||
if ($_REQUEST['action'] == 'ceo_save_archive') {
|
||||
|
||||
/* foreach (array(
|
||||
foreach (array(
|
||||
'custom_post_type_slug_name',
|
||||
'chapter_type_slug_name',
|
||||
'chapter_type_name_plural'
|
||||
) as $key) {
|
||||
if (isset($_REQUEST[$key]))
|
||||
$ceo_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
|
||||
} */
|
||||
}
|
||||
|
||||
foreach (array(
|
||||
'include_comics_in_blog_archive'
|
||||
|
||||
+33
-16
@@ -3,7 +3,7 @@
|
||||
Plugin Name: Comic Easel
|
||||
Plugin URI: http://comiceasel.com
|
||||
Description: Comic Easel allows you to incorporate a WebComic using the WordPress Media Library functionality with Navigation into almost all WordPress themes. With just a few modifications of adding injection do_action locations into a theme, you can have the theme of your choice display and manage a webcomic.
|
||||
Version: 1.7.7.1
|
||||
Version: 1.8
|
||||
Author: Philip M. Hofer (Frumph)
|
||||
Author URI: http://frumph.net/
|
||||
|
||||
@@ -78,18 +78,25 @@ function ceo_initialize_post_types() {
|
||||
'description' => 'Post type for Comics'
|
||||
));
|
||||
|
||||
$chapter_slug = ceo_pluginfo('chapter_type_slug_name');
|
||||
$chapter_slug_plural = ucwords(ceo_pluginfo('chapter_type_name_plural'));
|
||||
|
||||
if (empty($chapter_slug) || is_array($chapter_slug)) $chapter_slug = 'chapter';
|
||||
if (empty($chapter_slug_plural) || is_array($chapter_slug_plural)) $chapter_slug_plural = 'Chapters';
|
||||
|
||||
$labels = array(
|
||||
'name' => __( 'Chapters', 'comiceasel' ),
|
||||
'singular_name' => __( 'Chapter', 'comiceasel' ),
|
||||
'search_items' => __( 'Search Chapters', 'comiceasel' ),
|
||||
'popular_items' => __( 'Popular Chapters', 'comiceasel' ),
|
||||
'all_items' => __( 'All Chapters', 'comiceasel' ),
|
||||
'parent_item' => __( 'Parent Chapter', 'comiceasel' ),
|
||||
'parent_item_colon' => __( 'Parent Chapter:', 'comiceasel' ),
|
||||
'edit_item' => __( 'Edit Chapters', 'comiceasel' ),
|
||||
'update_item' => __( 'Update Chapters', 'comiceasel' ),
|
||||
'add_new_item' => __( 'Add New Chapter', 'comiceasel' ),
|
||||
'new_item_name' => __( 'New Chapter Name', 'comiceasel' ),
|
||||
'name' => $chapter_slug_plural,
|
||||
'menu_name' => $chapter_slug_plural,
|
||||
'singular_name' => ucwords($chapter_slug),
|
||||
'search_items' => __( 'Search', 'comiceasel' ).' '.$chapter_slug_plural,
|
||||
'popular_items' => __( 'Popular', 'comiceasel' ).' '.$chapter_slug_plural,
|
||||
'all_items' => __( 'All', 'comiceasel' ).' '.$chapter_slug_plural,
|
||||
'parent_item' => __( 'Parent', 'comiceasel' ).' '.ucwords($chapter_slug),
|
||||
'parent_item_colon' => __( 'Parent', 'comiceasel' ).' '.ucwords($chapter_slug).':',
|
||||
'edit_item' => __( 'Edit', 'comiceasel' ).' '.$chapter_slug_plural,
|
||||
'update_item' => __( 'Update', 'comiceasel' ).' '.$chapter_slug_plural,
|
||||
'add_new_item' => __( 'Add New', 'comiceasel' ).' '.ucwords($chapter_slug),
|
||||
'new_item_name' => __( 'New', 'comiceasel' ).' '.ucwords($chapter_slug).__('Name')
|
||||
);
|
||||
|
||||
register_taxonomy('chapters', 'comic', array(
|
||||
@@ -100,7 +107,7 @@ function ceo_initialize_post_types() {
|
||||
'query_var' => true,
|
||||
'show_tagcloud' => false,
|
||||
'has_archive' => true,
|
||||
'rewrite' => array( 'slug' => 'chapter', 'with_front' => true, 'feeds' => true ),
|
||||
'rewrite' => array( 'slug' => $chapter_slug, 'with_front' => true, 'feeds' => false ),
|
||||
));
|
||||
|
||||
$labels = array(
|
||||
@@ -149,9 +156,11 @@ function ceo_initialize_post_types() {
|
||||
'query_var' => true,
|
||||
'show_tagcloud' => false,
|
||||
'rewrite' => array( 'slug' => 'location', 'with_front' => true, 'feeds' => false ),
|
||||
));
|
||||
));
|
||||
|
||||
if (ceo_pluginfo('allow_comics_to_have_categories'))
|
||||
register_taxonomy_for_object_type('category', 'comic');
|
||||
|
||||
register_taxonomy_for_object_type('post_tag', 'comic');
|
||||
register_taxonomy_for_object_type('chapters', 'comic');
|
||||
register_taxonomy_for_object_type('characters', 'comic');
|
||||
@@ -379,6 +388,8 @@ function ceo_load_options($reset = false) {
|
||||
'include_comics_in_blog_archive' => false,
|
||||
'disable_related_comics' => true,
|
||||
'custom_post_type_slug_name' => __('comic','comiceasel'),
|
||||
'chapter_type_slug_name' => __('chapter', 'comiceasel'),
|
||||
'chapter_type_name_plural' => __('chapters', 'comiceasel'),
|
||||
'display_first_comic_on_home_page' => false,
|
||||
'disable_style_sheet' => false,
|
||||
'enable_transcripts_in_comic_posts' => false,
|
||||
@@ -445,7 +456,13 @@ function ceo_pluginfo($whichinfo = null) {
|
||||
$ceo_options['db_version'] = '1.6';
|
||||
$ceo_options['thumbnail_size_for_facebook'] = 'large';
|
||||
update_option('comiceasel-config', $ceo_options);
|
||||
}
|
||||
}
|
||||
if (version_compare($ceo_options['db_version'], '1.7', '<')) {
|
||||
$ceo_options['db_version'] = '1.7';
|
||||
$ceo_options['chapter_type_slug_name'] = 'chapter';
|
||||
$ceo_options['chapter_type_name_plural'] = 'chapters';
|
||||
update_option('comiceasel-config', $ceo_options);
|
||||
}
|
||||
$ceo_coreinfo = wp_upload_dir();
|
||||
$ceo_addinfo = array(
|
||||
// if wp_upload_dir reports an error, capture it
|
||||
@@ -462,7 +479,7 @@ function ceo_pluginfo($whichinfo = null) {
|
||||
// comic-easel plugin directory/url
|
||||
'plugin_url' => plugin_dir_url(__FILE__),
|
||||
'plugin_path' => plugin_dir_path(__FILE__),
|
||||
'version' => '1.7.7.1'
|
||||
'version' => '1.8'
|
||||
);
|
||||
// Combine em.
|
||||
$ceo_pluginfo = array_merge($ceo_pluginfo, $ceo_addinfo);
|
||||
|
||||
@@ -36,7 +36,7 @@ function ceo_display_comic_post_info() {
|
||||
function ceo_display_comic_chapters() {
|
||||
global $post;
|
||||
if ($post->post_type == 'comic') {
|
||||
$before = '<div class="comic-chapter">'.__('Chapter','comiceasel').': ';
|
||||
$before = '<div class="comic-chapter">'.ucwords(ceo_pluginfo('chapter_type_slug_name')).': ';
|
||||
$sep = ', ';
|
||||
$after = '</div>';
|
||||
echo apply_filters('ceo_display_comic_chapters', get_the_term_list( $post->ID, 'chapters', $before, $sep, $after ));
|
||||
|
||||
@@ -20,8 +20,79 @@
|
||||
<?php _e('When this is enabled, when you search through the year/date/month and other archiving WordPress functions, the comic will appear with the regular blog posts. This feature automatically works for all tags already.','comiceasel'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php if (!isset($ceo_options['disable_cal_rewrite_rules'])) $ceo_options['disable_cal_rewrite_rules'] = false; ?>
|
||||
<th scope="row"><label for="disable_cal_rewrite_rules"><?php _e('Disable the regeneration of the rewrite rules so numerical slugs get turned into dates?','comiceasel'); ?></label></th>
|
||||
<td>
|
||||
<input id="disable_cal_rewrite_rules" name="disable_cal_rewrite_rules" type="checkbox" value="1" <?php checked(true, $ceo_options['disable_cal_rewrite_rules']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('This option disables the url line from interpreting numerical numbers as dates.','comiceasel'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('Comic Post Type','comiceasel'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<?php if (empty($ceo_options['custom_post_type_slug_name'])) $ceo_options['custom_post_type_slug_name'] = 'comic'; ?>
|
||||
<th scope="row"><label for="custom_post_type_slug_name"><?php _e('Custom Post Type slug name?','comiceasel'); ?></label></th>
|
||||
<td>
|
||||
<input id="custom_post_type_slug_name" name="custom_post_type_slug_name" type="text" value="<?php echo $ceo_options['custom_post_type_slug_name']; ?>" /><br />
|
||||
<?php
|
||||
$check_term = term_exists($ceo_options['custom_post_type_slug_name']);
|
||||
if ($check_term) { ?>
|
||||
<span style="font-weight: 700; color: #f00;"><?php _e('This slug already exists and will cause problems. Change it.','comiceasel'); ?></span>
|
||||
<?php if ($ceo_options['custom_post_type_slug_name'] == 'comic') { ?>
|
||||
<br /><?php _e('This is the default custom post type slug - which is already in use on your system. Sometimes people have the chapter name as this slug, that needs to be changed if you want to use the default.','comiceasel'); ?>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Default: "comic" changing this will modify the permalink name for the /comic/ how it is addressed in the url. This is a slug name, no slashes or spaces allowed; only alpha characters and a single word.','comiceasel'); ?><br />
|
||||
<br />
|
||||
<span style='color: #b00;'><?php _e('IMPORTANT - If you change this from the default remember to go to settings -> permalink and click SAVE so that the permalink structure can be recognized by WordPress','comiceasel'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php if (empty($ceo_options['chapter_type_slug_name'])) $ceo_options['chapter_type_slug_name'] = 'comic'; ?>
|
||||
<th scope="row"><label for="chapter_type_slug_name"><?php _e('Chapter Type slug name?','comiceasel'); ?></label></th>
|
||||
<td>
|
||||
<input id="chapter_type_slug_name" name="chapter_type_slug_name" type="text" value="<?php echo $ceo_options['chapter_type_slug_name']; ?>" /><br />
|
||||
<?php
|
||||
$check_term = term_exists($ceo_options['chapter_type_slug_name']);
|
||||
if ($check_term) { ?>
|
||||
<span style="font-weight: 700; color: #f00;"><?php _e('This slug already exists and will cause problems. Change it.','comiceasel'); ?></span>
|
||||
<?php if ($ceo_options['chapter_type_slug_name'] == 'chapter') { ?>
|
||||
<br /><?php _e('This is the default chapter slug - which is already in use on your system.','comiceasel'); ?>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Default: "chapter" changing this will modify the permalink name for the /chapter/ how it is addressed in the url. This is a slug name, no slashes or spaces allowed; only alpha characters and a single word.','comiceasel'); ?><br />
|
||||
<br />
|
||||
<span style='color: #b00;'><?php _e('IMPORTANT - If you change this from the default remember to go to settings -> permalink and click SAVE so that the permalink structure can be recognized by WordPress','comiceasel'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alternate">
|
||||
<?php if (empty($ceo_options['chapter_type_name_plural'])) $ceo_options['chapter_type_name_plural'] = 'chapters'; ?>
|
||||
<th scope="row"><label for="chapter_type_name_plural"><?php _e('Chapter name plural form?','comiceasel'); ?></label></th>
|
||||
<td>
|
||||
<input id="chapter_type_name_plural" name="chapter_type_name_plural" type="text" value="<?php echo $ceo_options['chapter_type_name_plural']; ?>" /><br />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Default: "chapters" changing this will modify the description information of the plural form of what is put as the chapters slug. For example if you change the chapters slug to "story" this would be "stories" - use lowercase.','comiceasel'); ?><br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
@@ -240,44 +240,6 @@ foreach ($thumbnail_sizes as $size) { ?>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><?php _e('Comic Post Type','comiceasel'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="alternate">
|
||||
<?php if (empty($ceo_options['custom_post_type_slug_name'])) $ceo_options['custom_post_type_slug_name'] = 'comic'; ?>
|
||||
<th scope="row"><label for="custom_post_type_slug_name"><?php _e('Custom Post Type slug name?','comiceasel'); ?></label></th>
|
||||
<td>
|
||||
<input id="custom_post_type_slug_name" name="custom_post_type_slug_name" type="text" value="<?php echo $ceo_options['custom_post_type_slug_name']; ?>" /><br />
|
||||
<?php
|
||||
$check_term = term_exists($ceo_options['custom_post_type_slug_name']);
|
||||
if ($check_term) { ?>
|
||||
<span style="font-weight: 700; color: #f00;"><?php _e('This slug already exists and will cause problems. Change it.','comiceasel'); ?></span>
|
||||
<?php if ($ceo_options['custom_post_type_slug_name'] == 'comic') { ?>
|
||||
<br /><?php _e('This is the default custom post type slug - which is already in use on your system. Sometimes people have the chapter name as this slug, that needs to be changed if you want to use the default.','comiceasel'); ?>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Default: "comic" changing this will modify the permalink name for the /comic/ how it is addressed in the url. This is a slug name, no slashes or spaces allowed; only alpha characters and a single word.','comiceasel'); ?><br />
|
||||
<br />
|
||||
<span style='color: #b00;'><?php _e('IMPORTANT - If you change this from the default remember to go to settings -> permalink and click SAVE so that the permalink structure can be recognized by WordPress','comiceasel'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php if (!isset($ceo_options['disable_cal_rewrite_rules'])) $ceo_options['disable_cal_rewrite_rules'] = false; ?>
|
||||
<th scope="row"><label for="disable_cal_rewrite_rules"><?php _e('Disable the regeneration of the rewrite rules so numerical slugs get turned into dates?','comiceasel'); ?></label></th>
|
||||
<td>
|
||||
<input id="disable_cal_rewrite_rules" name="disable_cal_rewrite_rules" type="checkbox" value="1" <?php checked(true, $ceo_options['disable_cal_rewrite_rules']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('This option disables the url line from interpreting numerical numbers as dates.','comiceasel'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
<?php _e('This version of Comic Easel was sponsored by everyone in the WebComic community, my brother who helped me with my gofundme campaign. THANK YOU! (And Brad Guigar from WebComics.COM)','comiceasel'); ?><br />
|
||||
<?php _e('This version of Comic Easel was sponsored by everyone in the WebComic community & my brother who helped me with my gofundme campaign. THANK YOU! (And Brad Guigar from WebComics.COM)','comiceasel'); ?><br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
+7
-1
@@ -3,7 +3,7 @@ Contributors: Frumph
|
||||
Tags: comiceasel, easel, webcomic, comic, webcomic
|
||||
Requires at least: 3.2
|
||||
Tested up to: 4.0
|
||||
Stable tag: 1.7.7.1
|
||||
Stable tag: 1.8
|
||||
Donate link: http://frumph.net
|
||||
License: GPLv3 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
@@ -127,6 +127,12 @@ The comic navigation widget is only seen if you have the comic sidebar's enabled
|
||||
|
||||
|
||||
== Changelog ==
|
||||
= 1.8 =
|
||||
* Added some tabs in the comic - config
|
||||
* Moved the post type name options to the 'archive' tab
|
||||
* Added a couple of new options that allow you to change the word usage for "chapter" to something else
|
||||
|
||||
|
||||
= 1.7.7.1 =
|
||||
* fixed bug where you couldn't save the facebook image size
|
||||
|
||||
|
||||
Reference in New Issue
Block a user