fix meta box so it works properly
This commit is contained in:
parent
02600786c9
commit
eb0e091e8b
@ -73,6 +73,17 @@ function cpm_add_pages() {
|
||||
$do_enqueue_prototype = true;
|
||||
}
|
||||
|
||||
if (strpos($pagenow, "post") === 0) {
|
||||
add_meta_box(
|
||||
'comic-for-this-post',
|
||||
__('Comic For This Post', 'comicpress-manager'),
|
||||
'cpm_show_comic_caller',
|
||||
'post',
|
||||
'normal',
|
||||
'low'
|
||||
);
|
||||
}
|
||||
|
||||
$filename = plugin_basename(__FILE__);
|
||||
|
||||
if (strpos($plugin_page, $filename) !== false) {
|
||||
|
@ -94,9 +94,7 @@ function cpm_show_comic() {
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div id="comicdiv" class="postbox">
|
||||
<h3><?php _e("Comic For This Post", 'comicpress-manager') ?></h3>
|
||||
<div class="inside" style="overflow: hidden">
|
||||
|
||||
<?php if (count($cpm_config->comic_files) == 0) { ?>
|
||||
<div style="border: solid #daa 1px; background-color: #ffe7e7; padding: 5px">
|
||||
<strong>It looks like this is a new ComicPress install.</strong> You should test to make
|
||||
@ -190,15 +188,20 @@ function cpm_show_comic() {
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<th scope="row"><?php _e('<img title>/hover text', 'comicpress-manager') ?></th>
|
||||
<td><input type="text" name="comicpress-img-title" size="50" value="<?php echo get_post_meta($post->ID, 'hovertext', true) ?>" /></td>
|
||||
<td><input type="text" name="comicpress-img-title" style="width:99%" value="<?php echo get_post_meta($post->ID, 'hovertext', true) ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><?php _e("Transcript", 'comicpress-manager') ?></th>
|
||||
<td><textarea name="comicpress-transcript" rows="8" cols="50"><?php echo get_post_meta($post->ID, 'transcript', true) ?></textarea></td>
|
||||
<td>
|
||||
<textarea name="comicpress-transcript" rows="8" style="width:99%"><?php echo get_post_meta($post->ID, 'transcript', true) ?></textarea>
|
||||
<?php if (!is_plugin_active('what-did-they-say/what-did-they-say.php')) { ?>
|
||||
<p>
|
||||
<?php _e('Want even better control over your transcripts? Try <a href="http://wordpress.org/extend/plugins/what-did-they-say/" target="wdts">What Did They Say?!?</a>', 'comicpress-manager') ?>
|
||||
</p>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user