Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename CMB2_hookup to CMB2_Hookup #1330

Merged
merged 1 commit into from Jan 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bootstrap.php
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
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
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
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
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