Skip to content

Commit

Permalink
s/get_the_id/get_the_ID and fix docblock. Fixes CMB2#732
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsternberg committed Sep 10, 2016
1 parent 3aec8d0 commit 339a57d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions includes/CMB2_Show_Filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ private static function get_show_on_value( $meta_box_args ) {
/**
* Add metaboxes for an specific ID
* @since 1.0.0
* @param bool $display To display or not
* @param bool $display To display or not
* @param array $meta_box_args Metabox config array
* @return bool Whether to display this metabox on the current page.
* @param CMB2 $cmb The CMB2 instance.
* @return bool Whether to display this metabox on the current page.
*/
public static function check_id( $display, $meta_box_args, $cmb ) {

Expand All @@ -81,7 +82,7 @@ public static function check_id( $display, $meta_box_args, $cmb ) {
return $display;
}

$object_id = is_admin() ? $cmb->object_id() : @get_the_id();
$object_id = is_admin() ? $cmb->object_id() : get_the_ID();

if ( ! $object_id ) {
return false;
Expand Down

0 comments on commit 339a57d

Please sign in to comment.