mirror of
https://github.com/Frumph/comic-easel.git
synced 2026-08-26 18:06:41 -04:00
df7a6f78ba
The domain has been 'comiceasel' since 2012 while the wordpress.org slug is 'comic-easel'. Language packs from translate.wordpress.org are keyed to the slug, so they could never load; no working translation ever shipped against the old domain. Renames the domain in every gettext call, in load_plugin_textdomain(), in both Text Domain headers, and on the lang/ template files, which already carried comic-easel domain markers internally. Option keys, admin page slugs, nonce actions and style handles that share the comiceasel prefix are deliberately left alone; only the $domain argument moved. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
368 lines
22 KiB
PHP
368 lines
22 KiB
PHP
<?php
|
|
/*
|
|
Widget Name: Graphical Navigation
|
|
Widget URI: https://github.com/Frumph/comic-easel
|
|
Description: You can place graphical navigation buttons on your comic.
|
|
Author: Philip M. Hofer (Frumph) (mods by Chris Maverick)
|
|
Author URI: http://frumph.net/
|
|
Version: 1.1m
|
|
*/
|
|
|
|
if (!defined('ABSPATH')) exit;
|
|
|
|
class ceo_comic_navigation_widget extends WP_Widget {
|
|
|
|
/**
|
|
* Register widget with WordPress.
|
|
*/
|
|
function __construct() {
|
|
parent::__construct(
|
|
__CLASS__, // Base ID
|
|
__( 'Comic Easel - Navigation', 'comic-easel' ), // Name
|
|
array( 'classname' => __CLASS__, 'description' => __( 'Displays navigation links for navigating your comics. This widget works in the above-comic and under-comic sidebars if you set them in the theme you use.', 'comic-easel' ), ) // Args
|
|
);
|
|
}
|
|
|
|
function display_comic_nav_wrapper($args, $instance) {
|
|
global $post;
|
|
extract($args, EXTR_SKIP);
|
|
if (empty($post) || ($post->post_type != 'comic')) return;
|
|
$prev_in_comic = $next_in_comic = $first_in_comic = $last_in_comic = $prev_comic = $next_comic = $first_comic = $last_comic = $previous_chap = $next_chap = false;
|
|
if ($instance['previous_in']) $prev_in_comic = ceo_get_previous_comic_in_chapter_permalink();
|
|
if ($instance['next_in']) $next_in_comic = ceo_get_next_comic_in_chapter_permalink();
|
|
if ($instance['first_in']) $first_in_comic = ceo_get_first_comic_in_chapter_permalink();
|
|
if ($instance['last_in']) $last_in_comic = ceo_get_last_comic_in_chapter_permalink();
|
|
if ($instance['previous']) $prev_comic = ceo_get_previous_comic_permalink();
|
|
if ($instance['next']) $next_comic = ceo_get_next_comic_permalink();
|
|
if ($instance['first']) $first_comic = ceo_get_first_comic_permalink();
|
|
if ($instance['last']) $last_comic = ceo_get_last_comic_permalink();
|
|
if ($instance['previous_chap']) $previous_chap = ceo_get_previous_chapter();
|
|
if ($instance['next_chap']) $next_chap = ceo_get_next_chapter();
|
|
$this_permalink = get_permalink($post->ID);
|
|
// echo $before_widget;
|
|
?>
|
|
<div class="comic_navi_wrapper">
|
|
<table class="comic_navi">
|
|
<?php if (!isset($instance['comicchapter'])) $instance['comicchapter'] = false; ?>
|
|
<?php if (($instance['comicchapter']) || ($instance['comictitle'])) { ?>
|
|
<tr>
|
|
<td class="comic_navi_title" colspan="3">
|
|
<?php if ($instance['comicchapter']) { $post_category = get_the_term_list ($post->ID,'chapters', '', ', ', ''); ?>
|
|
<span class="navi-comicchapter"><?php echo $post_category ?></span>
|
|
<?php if ($instance['comictitle']) { echo '- '; }
|
|
}
|
|
if ($instance['comictitle']) { ?>
|
|
<span class="navi-comictitle"><a href="<?php echo esc_url(get_permalink($post->ID)); ?>" class="comic-nav-title">"<?php echo ceo_title_for_html($post->ID); ?>"</a></span>
|
|
<?php } ?>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
<tr>
|
|
<td class="comic_navi_left">
|
|
<?php
|
|
do_action('before-comic-navigation');
|
|
if ($instance['first']) {
|
|
if (!empty($first_comic) && ($first_comic !== $this_permalink)) { ?>
|
|
<a href="<?php echo esc_url($first_comic); ?>" class="navi navi-first" title="<?php echo esc_attr($instance['first_title']); ?>"><?php echo esc_html($instance['first_title']); ?></a>
|
|
<?php } else { ?>
|
|
<span class="navi navi-first navi-void"><?php echo esc_html($instance['first_title']); ?></span>
|
|
<?php }
|
|
}
|
|
if ($instance['first_in']) {
|
|
if (!empty($first_in_comic) && ($first_in_comic !== $this_permalink)) { ?>
|
|
<a href="<?php echo esc_url($first_in_comic); ?>" class="navi navi-first-in" title="<?php echo esc_attr($instance['first_in_title']); ?>"><?php echo esc_html($instance['first_in_title']); ?></a>
|
|
<?php } else { ?>
|
|
<span class="navi navi-first-in navi-void"><?php echo esc_html($instance['first_in_title']); ?></span>
|
|
<?php }
|
|
}
|
|
if ($instance['previous']) {
|
|
if (!empty($prev_comic)) { ?>
|
|
<a href="<?php echo esc_url($prev_comic); ?>" class="navi comic-nav-previous navi-prev" title="<?php echo esc_attr($instance['previous_title']); ?>"><?php echo esc_html($instance['previous_title']); ?></a>
|
|
<?php } else { ?>
|
|
<span class="navi navi-prev navi-void"><?php echo esc_html($instance['previous_title']); ?></span>
|
|
<?php }
|
|
}
|
|
if ($instance['previous_in']) {
|
|
if (!empty($prev_in_comic)) { ?>
|
|
<a href="<?php echo esc_url($prev_in_comic); ?>" class="navi navi-prev-in" title="<?php echo esc_attr($instance['previous_in_title']); ?>"><?php echo esc_html($instance['previous_in_title']); ?></a>
|
|
<?php } else { ?>
|
|
<span class="navi navi-prev-in navi-void"><?php echo esc_html($instance['previous_in_title']); ?></span>
|
|
<?php }
|
|
}
|
|
if ($instance['previous_chap']) {
|
|
if (!empty($previous_chap)) { ?>
|
|
<a href="<?php echo esc_url($previous_chap); ?>" class="navi navi-prev-chap" title="<?php echo esc_attr($instance['previous_chap_title']); ?>"><?php echo esc_html($instance['previous_chap_title']); ?></a>
|
|
<?php } else { ?>
|
|
<span class="navi navi-prev-chap navi-void"><?php echo esc_html($instance['previous_chap_title']); ?></span>
|
|
<?php }
|
|
}
|
|
?>
|
|
</td>
|
|
<td class="comic_navi_center">
|
|
<?php
|
|
if ($instance['archives'] && !empty($instance['archive_path'])) { ?>
|
|
<a href="<?php echo esc_url($instance['archive_path']); ?>" class="navi navi-archives navi-archive" title="<?php echo esc_attr($instance['archives_title']); ?>"><?php echo esc_html($instance['archives_title']); ?></a>
|
|
<?php }
|
|
if ($instance['random']) {
|
|
$stay = '';
|
|
if (ceo_pluginfo('enable_chapter_only_random')) {
|
|
$chapter = get_the_terms($post->ID, 'chapters');
|
|
if (!empty($chapter) && !is_wp_error($chapter)) $stay = '&stay='.reset($chapter)->term_id;
|
|
}
|
|
?>
|
|
<a href="<?php echo esc_url(home_url()); ?>/?random&nocache=1<?php echo esc_attr($stay); ?>" class="navi navi-random" title="<?php echo esc_attr($instance['random_title']); ?>"><?php echo esc_html($instance['random_title']); ?></a>
|
|
<?php }
|
|
if (ceo_pluginfo('enable_buy_comic') && isset($instance['buycomic']) && $instance['buycomic']) {
|
|
if (strpos(ceo_pluginfo('buy_comic_url'), '?') !== false) {
|
|
$bpsep = '&';
|
|
} else {
|
|
$bpsep = '?';
|
|
}
|
|
?>
|
|
<a href="<?php echo esc_url(ceo_pluginfo('buy_comic_url').$bpsep.'id='.$post->ID); ?>" class="navi navi-buycomic" title="<?php echo esc_attr($instance['buycomic_title']); ?>"><?php echo esc_html($instance['buycomic_title']); ?></a>
|
|
<?php
|
|
}
|
|
do_action('inside-comic-navigation');
|
|
if ($instance['comments']) { ?>
|
|
<a href="<?php the_permalink(); ?>#comments" class="navi navi-comments" title="<?php echo esc_attr($instance['comments_title']); ?>"><span class="navi-comments-count"><?php echo esc_html(get_comments_number()); ?></span><?php echo esc_html($instance['comments_title']); ?></a>
|
|
<?php } ?>
|
|
</td>
|
|
<td class="comic_navi_right">
|
|
<?php
|
|
if ($instance['next_chap']) {
|
|
if (!empty($next_chap)) { ?>
|
|
<a href="<?php echo esc_url($next_chap); ?>" class="navi navi-next-chap" title="<?php echo esc_attr($instance['next_chap_title']); ?>"><?php echo esc_html($instance['next_chap_title']); ?></a>
|
|
<?php } else { ?>
|
|
<span class="navi navi-next-chap navi-void"><?php echo esc_html($instance['next_chap_title']); ?></span>
|
|
<?php }
|
|
}
|
|
if ($instance['next_in']) {
|
|
if (!empty($next_in_comic)) { ?>
|
|
<a href="<?php echo esc_url($next_in_comic); ?>" class="navi navi-next-in" title="<?php echo esc_attr($instance['next_in_title']); ?>"><?php echo esc_html($instance['next_in_title']); ?></a>
|
|
<?php } else { ?>
|
|
<span class="navi navi-next-in navi-void"><?php echo esc_html($instance['next_in_title']); ?></span>
|
|
<?php }
|
|
}
|
|
if ($instance['next']) {
|
|
if (!empty($next_comic)) { ?>
|
|
<a href="<?php echo esc_url($next_comic); ?>" class="navi comic-nav-next navi-next" title="<?php echo esc_attr($instance['next_title']); ?>"><?php echo esc_html($instance['next_title']); ?></a>
|
|
<?php } else { ?>
|
|
<span class="navi navi-next navi-void"><?php echo esc_html($instance['next_title']); ?></span>
|
|
<?php }
|
|
}
|
|
if ($instance['last_in']) {
|
|
if (!empty($last_in_comic) && ($last_in_comic !== $this_permalink)) { ?>
|
|
<a href="<?php echo esc_url($last_in_comic); ?>" class="navi navi-last-in" title="<?php echo esc_attr($instance['last_in_title']); ?>"><?php echo esc_html($instance['last_in_title']); ?></a>
|
|
<?php } else { ?>
|
|
<span class="navi navi-last-in navi-void"><?php echo esc_html($instance['last_in_title']); ?></span>
|
|
<?php }
|
|
}
|
|
if ($instance['last']) {
|
|
if (!empty($last_comic) && ($last_comic !== $this_permalink)) {
|
|
if (isset($instance['lastgohome']) && $instance['lastgohome']) { ?>
|
|
<a href="/" class="navi navi-last" title="<?php echo esc_attr($instance['last_title']); ?>"><?php echo esc_html($instance['last_title']); ?></a>
|
|
<?php } else { ?>
|
|
<a href="<?php echo esc_url($last_comic); ?>" class="navi navi-last" title="<?php echo esc_attr($instance['last_title']); ?>"><?php echo esc_html($instance['last_title']); ?></a>
|
|
<?php } ?>
|
|
<?php } else { ?>
|
|
<span class="navi navi-last navi-void"><?php echo esc_html($instance['last_title']); ?></span>
|
|
<?php }
|
|
}
|
|
do_action('after-comic-navigation');
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<?php if ($instance['imageurl']) { ?>
|
|
<tr>
|
|
<td class="comic_navi_href" colspan="3">
|
|
<?php
|
|
$post_image_id = get_post_thumbnail_id($post->ID);
|
|
$thumbnail = wp_get_attachment_image_src( $post_image_id, 'full', false);
|
|
if (is_array($thumbnail) && !empty($thumbnail)) {
|
|
$thumbnail = reset($thumbnail);
|
|
echo '<span class="comic-navi-href-info">'.esc_html__('Image URL (for hotlinking/embedding):','comic-easel').' '.esc_url($thumbnail).'</span>';
|
|
}
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
</table>
|
|
</div>
|
|
<?php
|
|
// echo $after_widget;
|
|
}
|
|
|
|
function widget($args, $instance) {
|
|
global $post;
|
|
ceo_protect();
|
|
if (is_home() || is_front_page()) {
|
|
$order = (ceo_pluginfo('display_first_comic_on_home_page')) ? 'asc' : 'desc';
|
|
$comic_args = array(
|
|
'showposts' => 1,
|
|
'posts_per_page' => 1,
|
|
'post_type' => 'comic',
|
|
'order' => $order
|
|
);
|
|
apply_filters('ceo_comic_navigation_widget_home_query_args_array', $comic_args);
|
|
$comicFrontpage = new WP_Query(); $comicFrontpage->query($comic_args);
|
|
while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post();
|
|
$this->display_comic_nav_wrapper($args, $instance);
|
|
endwhile;
|
|
} else {
|
|
$this->display_comic_nav_wrapper($args, $instance);
|
|
}
|
|
ceo_unprotect();
|
|
}
|
|
|
|
function update($new_instance, $old_instance) {
|
|
$instance = $old_instance;
|
|
foreach (array(
|
|
'previous_chap',
|
|
'next_chap',
|
|
'first_in',
|
|
'last_in',
|
|
'previous_in',
|
|
'next_in',
|
|
'first',
|
|
'last',
|
|
'previous',
|
|
'next',
|
|
'random',
|
|
'archives',
|
|
'comments',
|
|
'comictitle',
|
|
'comicchapter',
|
|
'imageurl',
|
|
'buycomic') as $key) {
|
|
// Unchecked boxes are not submitted at all, so the key may be absent.
|
|
$instance[$key] = (!empty($new_instance[$key])) ? true : false;
|
|
}
|
|
// The archive path is a URL, so sanitize it as one rather than lumping it
|
|
// in with the plain-text labels below -- esc_attr() would happily store a
|
|
// javascript: URI.
|
|
$instance['archive_path'] = isset($new_instance['archive_path']) ? esc_url_raw($new_instance['archive_path']) : '';
|
|
foreach (array(
|
|
'previous_chap_title',
|
|
'next_chap_title',
|
|
'first_in_title',
|
|
'last_in_title',
|
|
'previous_in_title',
|
|
'next_in_title',
|
|
'first_title',
|
|
'last_title',
|
|
'previous_title',
|
|
'next_title',
|
|
'random_title',
|
|
'archives_title',
|
|
'comments_title',
|
|
'buycomic_title'
|
|
) as $key) {
|
|
$instance[$key] = isset($new_instance[$key]) ? esc_attr($new_instance[$key]) : '';
|
|
}
|
|
return $instance;
|
|
}
|
|
|
|
function form($instance) {
|
|
$instance = wp_parse_args( (array)$instance, array(
|
|
'previous_chap' => false,
|
|
'next_chap' => false,
|
|
'first_in' => false,
|
|
'last_in' => false,
|
|
'previous_in' => false,
|
|
'next_in' => false,
|
|
'first' => false,
|
|
'last' => false,
|
|
'previous' => false,
|
|
'next' => false,
|
|
'random' => false,
|
|
'archives' => false,
|
|
'comments' => false,
|
|
'comictitle' => false,
|
|
'comicchapter' => false,
|
|
'imageurl' => false,
|
|
'buycomic' => false,
|
|
'archive_path' => '',
|
|
'previous_chap_title' => __('<[ Prev Chapter', 'comic-easel'),
|
|
'next_chap_title' => __('Next Chapter ]>', 'comic-easel'),
|
|
'first_in_title' => __('<<[ First', 'comic-easel'),
|
|
'last_in_title' => __('Last ]>>', 'comic-easel'),
|
|
'previous_in_title' => __('<[ Prev', 'comic-easel'),
|
|
'next_in_title' => __('Next ]>', 'comic-easel'),
|
|
'first_title' => __('<< First', 'comic-easel'),
|
|
'last_title' => __('Last >>', 'comic-easel'),
|
|
'previous_title' => __('< Prev', 'comic-easel'),
|
|
'next_title' => __('Next >', 'comic-easel'),
|
|
'random_title' => __('Random', 'comic-easel'),
|
|
'archives_title' => __('Archives', 'comic-easel'),
|
|
'comments_title' => __('Comments', 'comic-easel'),
|
|
'buycomic_title' => __('Buy!', 'comic-easel')
|
|
));
|
|
?>
|
|
<input id="<?php echo esc_attr($this->get_field_id('first')); ?>" name="<?php echo esc_attr($this->get_field_name('first')); ?>" type="checkbox" value="1" <?php checked(true, $instance['first']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('first')); ?>"><strong><?php esc_html_e('First','comic-easel'); ?></strong></label><br />
|
|
<input id="<?php echo esc_attr($this->get_field_id('first_title')); ?>" name="<?php echo esc_attr($this->get_field_name('first_title')); ?>" type="text" value="<?php echo esc_attr($instance['first_title']); ?>" /><br />
|
|
<br />
|
|
|
|
<input id="<?php echo esc_attr($this->get_field_id('last')); ?>" name="<?php echo esc_attr($this->get_field_name('last')); ?>" type="checkbox" value="1" <?php checked(true, $instance['last']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('last')); ?>"><strong><?php esc_html_e('Last','comic-easel'); ?></strong></label><br />
|
|
<input id="<?php echo esc_attr($this->get_field_id('last_title')); ?>" name="<?php echo esc_attr($this->get_field_name('last_title')); ?>" type="text" value="<?php echo esc_attr($instance['last_title']); ?>" /><br />
|
|
<br />
|
|
|
|
<input id="<?php echo esc_attr($this->get_field_id('previous')); ?>" name="<?php echo esc_attr($this->get_field_name('previous')); ?>" type="checkbox" value="1" <?php checked(true, $instance['previous']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('previous')); ?>"><strong><?php esc_html_e('Previous','comic-easel'); ?></strong></label><br />
|
|
<input id="<?php echo esc_attr($this->get_field_id('previous_title')); ?>" name="<?php echo esc_attr($this->get_field_name('previous_title')); ?>" type="text" value="<?php echo esc_attr($instance['previous_title']); ?>" /><br />
|
|
<br />
|
|
|
|
<input id="<?php echo esc_attr($this->get_field_id('next')); ?>" name="<?php echo esc_attr($this->get_field_name('next')); ?>" type="checkbox" value="1" <?php checked(true, $instance['next']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('next')); ?>"><strong><?php esc_html_e('Next','comic-easel'); ?></strong></label><br />
|
|
<input id="<?php echo esc_attr($this->get_field_id('next_title')); ?>" name="<?php echo esc_attr($this->get_field_name('next_title')); ?>" type="text" value="<?php echo esc_attr($instance['next_title']); ?>" /><br />
|
|
<br />
|
|
|
|
<input id="<?php echo esc_attr($this->get_field_id('first_in')); ?>" name="<?php echo esc_attr($this->get_field_name('first_in')); ?>" type="checkbox" value="1" <?php checked(true, $instance['first_in']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('first_in')); ?>"><strong><?php esc_html_e('First in Chapter','comic-easel'); ?></strong></label><br />
|
|
<input id="<?php echo esc_attr($this->get_field_id('first_in_title')); ?>" name="<?php echo esc_attr($this->get_field_name('first_in_title')); ?>" type="text" value="<?php echo esc_attr($instance['first_in_title']); ?>" /><br />
|
|
<br />
|
|
|
|
<input id="<?php echo esc_attr($this->get_field_id('last_in')); ?>" name="<?php echo esc_attr($this->get_field_name('last_in')); ?>" type="checkbox" value="1" <?php checked(true, $instance['last_in']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('last_in')); ?>"><strong><?php esc_html_e('Last in Chapter','comic-easel'); ?></strong></label><br />
|
|
<input id="<?php echo esc_attr($this->get_field_id('last_in_title')); ?>" name="<?php echo esc_attr($this->get_field_name('last_in_title')); ?>" type="text" value="<?php echo esc_attr($instance['last_in_title']); ?>" /><br />
|
|
<br />
|
|
|
|
<input id="<?php echo esc_attr($this->get_field_id('previous_in')); ?>" name="<?php echo esc_attr($this->get_field_name('previous_in')); ?>" type="checkbox" value="1" <?php checked(true, $instance['previous_in']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('previous_in')); ?>"><strong><?php esc_html_e('Previous in Chapter','comic-easel'); ?></strong></label><br />
|
|
<input id="<?php echo esc_attr($this->get_field_id('previous_in_title')); ?>" name="<?php echo esc_attr($this->get_field_name('previous_in_title')); ?>" type="text" value="<?php echo esc_attr($instance['previous_in_title']); ?>" /><br />
|
|
<br />
|
|
|
|
<input id="<?php echo esc_attr($this->get_field_id('next_in')); ?>" name="<?php echo esc_attr($this->get_field_name('next_in')); ?>" type="checkbox" value="1" <?php checked(true, $instance['next_in']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('next_in')); ?>"><strong><?php esc_html_e('Next in Chapter','comic-easel'); ?></strong></label><br />
|
|
<input id="<?php echo esc_attr($this->get_field_id('next_in_title')); ?>" name="<?php echo esc_attr($this->get_field_name('next_in_title')); ?>" type="text" value="<?php echo esc_attr($instance['next_in_title']); ?>" /><br />
|
|
<br />
|
|
|
|
<input id="<?php echo esc_attr($this->get_field_id('previous_chap')); ?>" name="<?php echo esc_attr($this->get_field_name('previous_chap')); ?>" type="checkbox" value="1" <?php checked(true, $instance['previous_chap']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('previous_chap')); ?>"><strong><?php esc_html_e('Previous Chapter','comic-easel'); ?></strong></label><br />
|
|
<input id="<?php echo esc_attr($this->get_field_id('previous_chap_title')); ?>" name="<?php echo esc_attr($this->get_field_name('previous_chap_title')); ?>" type="text" value="<?php echo esc_attr($instance['previous_chap_title']); ?>" /><br />
|
|
<br />
|
|
|
|
<input id="<?php echo esc_attr($this->get_field_id('next_chap')); ?>" name="<?php echo esc_attr($this->get_field_name('next_chap')); ?>" type="checkbox" value="1" <?php checked(true, $instance['next_chap']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('next_chap')); ?>"><strong><?php esc_html_e('Next Chapter','comic-easel'); ?></strong></label><br />
|
|
<input id="<?php echo esc_attr($this->get_field_id('next_chap_title')); ?>" name="<?php echo esc_attr($this->get_field_name('next_chap_title')); ?>" type="text" value="<?php echo esc_attr($instance['next_chap_title']); ?>" /><br />
|
|
<br />
|
|
|
|
<input id="<?php echo esc_attr($this->get_field_id('comictitle')); ?>" name="<?php echo esc_attr($this->get_field_name('comictitle')); ?>" type="checkbox" value="1" <?php checked(true, $instance['comictitle']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('comictitle')); ?>"><strong><?php esc_html_e('Comic Title','comic-easel'); ?></strong></label>
|
|
<br />
|
|
|
|
<input id="<?php echo esc_attr($this->get_field_id('comicchapter')); ?>" name="<?php echo esc_attr($this->get_field_name('comicchapter')); ?>" type="checkbox" value="1" <?php checked(true, $instance['comicchapter']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('comicchapter')); ?>"><strong><?php esc_html_e('Comic Chapter','comic-easel'); ?></strong></label><br />
|
|
<br />
|
|
|
|
<input id="<?php echo esc_attr($this->get_field_id('archives')); ?>" name="<?php echo esc_attr($this->get_field_name('archives')); ?>" type="checkbox" value="1" <?php checked(true, $instance['archives']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('archives')); ?>"><strong><?php esc_html_e('Archives','comic-easel'); ?></strong></label><br />
|
|
<input id="<?php echo esc_attr($this->get_field_id('archives_title')); ?>" name="<?php echo esc_attr($this->get_field_name('archives_title')); ?>" type="text" value="<?php echo esc_attr($instance['archives_title']); ?>" /><br />
|
|
Archive URL: <input class="widefat" id="<?php echo esc_attr($this->get_field_id('archive_path')); ?>" name="<?php echo esc_attr($this->get_field_name('archive_path')); ?>" type="text" value="<?php echo esc_attr($instance['archive_path']); ?>" /><br />
|
|
<br />
|
|
|
|
<input id="<?php echo esc_attr($this->get_field_id('comments')); ?>" name="<?php echo esc_attr($this->get_field_name('comments')); ?>" type="checkbox" value="1" <?php checked(true, $instance['comments']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('comments')); ?>"><strong><?php esc_html_e('Comments','comic-easel'); ?></strong></label><br />
|
|
<input id="<?php echo esc_attr($this->get_field_id('comments_title')); ?>" name="<?php echo esc_attr($this->get_field_name('comments_title')); ?>" type="text" value="<?php echo esc_attr($instance['comments_title']); ?>" /><br />
|
|
<br />
|
|
|
|
<input id="<?php echo esc_attr($this->get_field_id('random')); ?>" name="<?php echo esc_attr($this->get_field_name('random')); ?>" type="checkbox" value="1" <?php checked(true, $instance['random']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('random')); ?>"><strong><?php esc_html_e('Random','comic-easel'); ?></strong></label><br />
|
|
<input id="<?php echo esc_attr($this->get_field_id('random_title')); ?>" name="<?php echo esc_attr($this->get_field_name('random_title')); ?>" type="text" value="<?php echo esc_attr($instance['random_title']); ?>" /><br />
|
|
<br />
|
|
<?php if (ceo_pluginfo('enable_buy_comic')) { ?>
|
|
<input id="<?php echo esc_attr($this->get_field_id('buycomic')); ?>" name="<?php echo esc_attr($this->get_field_name('buycomic')); ?>" type="checkbox" value="1" <?php checked(true, $instance['buycomic']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('buycomic')); ?>"><strong><?php esc_html_e('Buy!','comic-easel'); ?></strong></label><br />
|
|
<input id="<?php echo esc_attr($this->get_field_id('buycomic_title')); ?>" name="<?php echo esc_attr($this->get_field_name('buycomic_title')); ?>" type="text" value="<?php echo esc_attr($instance['buycomic_title']); ?>" /><br />
|
|
<br />
|
|
<?php } ?>
|
|
<input id="<?php echo esc_attr($this->get_field_id('imageurl')); ?>" name="<?php echo esc_attr($this->get_field_name('imageurl')); ?>" type="checkbox" value="1" <?php checked(true, $instance['imageurl']); ?> /> <label for="<?php echo esc_attr($this->get_field_id('imageurl')); ?>"><strong><?php esc_html_e('ImageURL','comic-easel'); ?></strong></label>
|
|
<?php
|
|
}
|
|
}
|