From 9c874234f5821b9ac4fceb39b54aceae3a2e96c9 Mon Sep 17 00:00:00 2001 From: Justin Sternberg Date: Fri, 13 Feb 2015 10:58:07 -0500 Subject: [PATCH] Add new_cmb2_box function because OOP can be scary --- includes/helper-functions.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/includes/helper-functions.php b/includes/helper-functions.php index c90b63a24..c1dae870d 100644 --- a/includes/helper-functions.php +++ b/includes/helper-functions.php @@ -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