in progress

This commit is contained in:
John Bintz 2009-12-06 21:36:44 -05:00
parent a57e9583e4
commit b886b513ab
3 changed files with 10 additions and 12 deletions

View File

@ -17,6 +17,8 @@ class ComicPressAdmin {
add_filter('comicpress_display_attached_images', array(&$this, 'comicpress_display_attached_images'), 10, 2); add_filter('comicpress_display_attached_images', array(&$this, 'comicpress_display_attached_images'), 10, 2);
} }
add_action('edit_form_advanced', array(&$this, 'edit_form_advanced'));
add_filter('comicpress_core_version', array(&$this, 'comicpress_core_version')); add_filter('comicpress_core_version', array(&$this, 'comicpress_core_version'));
$this->comic_image_types = array( $this->comic_image_types = array(
@ -33,6 +35,12 @@ class ComicPressAdmin {
} }
} }
function edit_form_advanced() { ?>
<input type="hidden" name="cp[_nonce]" value="<?php echo esc_attr(wp_create_nonce('comicpress')) ?>" />
<input type="hidden" name="cp[action]" value="edit-form-advanced" />
<input type="hidden" name="cp[_action_nonce]" value="<?php echo esc_attr(wp_create_nonce('comicpress-edit-form-advanced')) ?>" />
<?php }
function comicpress_core_version($version = '') { return '1.0'; } function comicpress_core_version($version = '') { return '1.0'; }
function comicpress_attached_image($content, $attachment_id, $index) { function comicpress_attached_image($content, $attachment_id, $index) {
@ -483,16 +491,8 @@ class ComicPressAdmin {
$method = 'handle_update_' . strtolower(str_replace('-', '_', $action)); $method = 'handle_update_' . strtolower(str_replace('-', '_', $action));
if (method_exists($this, $method)) { if (method_exists($this, $method)) {
$this->{$method}($_REQUEST['cp']); $this->{$method}($_REQUEST['cp']);
} else {
foreach (get_declared_classes() as $class_name) {
if (preg_match('#^ComicPressBackend.+Admin$#', $class_name) > 0) {
if (method_exists($class_name, $method)) {
$fa = new $class_name();
$fa->{$method}($_REQUEST['cp']);
}
}
}
} }
do_action("comicpress-${method}", $_REQUEST['cp']);
} }
} }
} }

View File

@ -122,3 +122,4 @@ class ComicPressBackendURLAdmin {
} }
add_action('admin_menu', array('ComicPressBackendURLAdmin', 'admin_menu')); add_action('admin_menu', array('ComicPressBackendURLAdmin', 'admin_menu'));
add_action('comicpress-handle_update_backend_url_new_editor', array('ComicPressBackendURLAdmin', 'handle_update_backend_url_new_editor'));

View File

@ -1,7 +1,4 @@
<div style="overflow: hidden"> <div style="overflow: hidden">
<input type="hidden" name="cp[_nonce]" value="<?php echo esc_attr($nonce) ?>" />
<input type="hidden" name="cp[action]" value="comic-ordering" />
<input type="hidden" name="cp[_action_nonce]" value="<?php echo esc_attr($action_nonce) ?>" />
<div id="ordering-zoom-slider-holder"> <div id="ordering-zoom-slider-holder">
<div id="ordering-zoom-slider"> <div id="ordering-zoom-slider">
<div id="ordering-zoom-handle"></div> <div id="ordering-zoom-handle"></div>