diff --git a/functions/admin-meta.php b/functions/admin-meta.php index e6f39ea..cd57873 100644 --- a/functions/admin-meta.php +++ b/functions/admin-meta.php @@ -541,9 +541,7 @@ function ceo_handle_edit_save_comic($post_id, $post) { 'ma-directory', 'ma-height', 'ma-width', - 'buy_print_amount', 'buyprint-status', - 'buy_print_orig_amount', 'buyorig-status', 'flash_file', 'flash_height', @@ -554,6 +552,19 @@ function ceo_handle_edit_save_comic($post_id, $post) { 'comic-has-map' ); + $defaultorigamount = ceo_pluginfo('buy_comic_orig_amount'); + $defaultbuyprintamount = ceo_pluginfo('buy_comic_print_amount'); + + if (isset($_POST['buy_print_amount'])) { + $buyprint = esc_textarea($_POST['buy_print_amount']); + if ($buyprint !== $defaultbuyprintamount) $meta_array[] = 'buy_print_amount'; + } + + if (isset($_POST['buy_print_orig_amount'])) { + $buyorig = esc_textarea($_POST['buy_print_orig_amount']); + if ($buyorig !== $defaultorigamount) $meta_array[] = 'buy_print_orig_amount'; + } + foreach ($meta_array as $meta_key) { $new_meta_value = ( isset( $_POST[$meta_key] ) ? esc_textarea( $_POST[$meta_key] ) : '' ); $meta_value = get_post_meta( $post_id, $meta_key, true ); diff --git a/functions/injections.php b/functions/injections.php index 631deff..e3f4941 100644 --- a/functions/injections.php +++ b/functions/injections.php @@ -92,7 +92,7 @@ function ceo_display_comic_navigation() {