From 5a00d9ea81a2e8c8e6af976e31cbbfd2d247c655 Mon Sep 17 00:00:00 2001 From: Robin Cornett Date: Tue, 21 Jun 2016 10:51:58 -0400 Subject: [PATCH] Use admin_post_thumbnail ID arg --- includes/class-displayfeaturedimagegenesis-postmeta.php | 8 ++++---- includes/class-displayfeaturedimagegenesis.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/class-displayfeaturedimagegenesis-postmeta.php b/includes/class-displayfeaturedimagegenesis-postmeta.php index 5eef0c9..1e08df3 100644 --- a/includes/class-displayfeaturedimagegenesis-postmeta.php +++ b/includes/class-displayfeaturedimagegenesis-postmeta.php @@ -25,7 +25,7 @@ class Display_Featured_Image_Genesis_Post_Meta { /** * Build the metabox with the checkbox setting. */ - public function meta_box( $content ) { + public function meta_box( $content, $post_id ) { $output = wp_nonce_field( 'displayfeaturedimagegenesis_post_save', 'displayfeaturedimagegenesis_post_nonce', true, false ); $checkboxes = array( @@ -39,7 +39,7 @@ class Display_Featured_Image_Genesis_Post_Meta { ), ); foreach ( $checkboxes as $checkbox ) { - $output .= $this->do_checkbox( $checkbox ); + $output .= $this->do_checkbox( $checkbox, $post_id ); } return $output . $content; @@ -51,8 +51,8 @@ class Display_Featured_Image_Genesis_Post_Meta { * * @return string checkbox label/input */ - protected function do_checkbox( $args ) { - $check = get_post_meta( get_the_ID(), $args['setting'], true ) ? 1 : ''; + protected function do_checkbox( $args, $post_id ) { + $check = get_post_meta( $post_id, $args['setting'], true ) ? 1 : ''; $output = '

'; $output .= sprintf( '