Skip to content

Commit

Permalink
Rename CMB2_hookup to CMB2_Hookup
Browse files Browse the repository at this point in the history
Fixes CMB2#1328
  • Loading branch information
szepeviktor committed Jan 20, 2020
1 parent f47f392 commit 88e911f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function cmb2_bootstrap() {
do_action( 'cmb2_init_before_hookup' );

/**
* Get all created metaboxes, and instantiate CMB2_hookup
* Get all created metaboxes, and instantiate CMB2_Hookup
* on metaboxes which require it.
*
* @since 2.0.2
Expand Down
2 changes: 1 addition & 1 deletion includes/CMB2.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function __construct( $config, $object_id = 0 ) {
do_action( "cmb2_init_{$this->cmb_id}", $this );

// Hook in the hookup... how meta.
add_action( "cmb2_init_hookup_{$this->cmb_id}", array( 'CMB2_hookup', 'maybe_init_and_hookup' ) );
add_action( "cmb2_init_hookup_{$this->cmb_id}", array( 'CMB2_Hookup', 'maybe_init_and_hookup' ) );

// Hook in the rest api functionality.
add_action( "cmb2_init_hookup_{$this->cmb_id}", array( 'CMB2_REST', 'maybe_init_and_hookup' ) );
Expand Down
2 changes: 1 addition & 1 deletion includes/CMB2_hookup.php → includes/CMB2_Hookup.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @license GPL-2.0+
* @link https://cmb2.io
*/
class CMB2_hookup extends CMB2_Hookup_Base {
class CMB2_Hookup extends CMB2_Hookup_Base {

/**
* Only allow JS registration once
Expand Down
4 changes: 2 additions & 2 deletions includes/CMB2_Options_Hookup.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @license GPL-2.0+
* @link https://cmb2.io
*/
class CMB2_Options_Hookup extends CMB2_hookup {
class CMB2_Options_Hookup extends CMB2_Hookup {

/**
* The object type we are performing the hookup for
Expand Down Expand Up @@ -116,7 +116,7 @@ public function options_page_menu_hooks() {

if ( $this->cmb->prop( 'cmb_styles' ) ) {
// Include CMB CSS in the head to avoid FOUC.
add_action( "admin_print_styles-{$page_hook}", array( 'CMB2_hookup', 'enqueue_cmb_css' ) );
add_action( "admin_print_styles-{$page_hook}", array( 'CMB2_Hookup', 'enqueue_cmb_css' ) );
}

$this->maybe_register_message();
Expand Down
4 changes: 2 additions & 2 deletions includes/helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,11 @@ function cmb2_print_metabox_form( $meta_box, $object_id = 0, $args = array() ) {

// Enqueue JS/CSS.
if ( $args['cmb_styles'] ) {
CMB2_hookup::enqueue_cmb_css();
CMB2_Hookup::enqueue_cmb_css();
}

if ( $args['enqueue_js'] ) {
CMB2_hookup::enqueue_cmb_js();
CMB2_Hookup::enqueue_cmb_js();
}

$form_format = apply_filters( 'cmb2_get_metabox_form_format', $args['form_format'], $object_id, $cmb );
Expand Down

0 comments on commit 88e911f

Please sign in to comment.