Skip to content

Commit

Permalink
Whitelist allowed enqueue_cmb_css handles to account for hook callbacks.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsternberg committed Jun 28, 2016
1 parent 65f4831 commit d27c0c0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion includes/CMB2_hookup.php
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,12 @@ public static function enqueue_cmb_css( $handle = 'cmb2-styles' ) {
}

self::register_styles();
return wp_enqueue_style( $handle );

/*
* White list the options as this method can be used as a hook callback
* and have a different argument passed.
*/
return wp_enqueue_style( 'cmb2-display-styles' === $handle ? $handle : 'cmb2-styles' );
}

/**
Expand Down

0 comments on commit d27c0c0

Please sign in to comment.