Skip to content

Commit

Permalink
Add new_cmb2_box function because OOP can be scary
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsternberg committed Feb 15, 2015
1 parent 9eea736 commit 9c87423
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions includes/helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ function cmb2_autoload_classes( $class_name ) {
}
spl_autoload_register( 'cmb2_autoload_classes' );

/**
* Because OOP can be scary
* @since 2.0.2
* @param array $meta_box_config Metabox Config array
* @return CMB2 object Instantiated CMB2 object
*/
function new_cmb2_box( array $meta_box_config ) {
return new CMB2( $meta_box_config );
}

/**
* Get instance of the CMB2_Utils class
* @since 2.0.0
Expand Down

0 comments on commit 9c87423

Please sign in to comment.