Permalink
Cannot retrieve contributors at this time
<?php | |
/* | |
Script Name: Custom Metaboxes and Fields | |
Contributors: WebDevStudios (@webdevstudios / webdevstudios.com) | |
Justin Sternberg (@jtsternberg / dsgnwrks.pro) | |
Jared Atchison (@jaredatch / jaredatchison.com) | |
Bill Erickson (@billerickson / billerickson.net) | |
Andrew Norcross (@norcross / andrewnorcross.com) | |
Description: This will create metaboxes with custom fields that will blow your mind. | |
Version: 2.0.0 | |
*/ | |
/** | |
* Released under the GPL license | |
* http://www.opensource.org/licenses/gpl-license.php | |
* | |
* This is an add-on for WordPress | |
* http://wordpress.org/ | |
* | |
* ********************************************************************** | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
* GNU General Public License for more details. | |
* ********************************************************************** | |
*/ | |
/************************************************************************ | |
You should not edit the code below or things might explode! | |
*************************************************************************/ | |
/** | |
* Check for newest version of CMB | |
*/ | |
class cmb2_bootstrap_200 { | |
/** | |
* Current version number | |
* @var string | |
* @since 1.0.0 | |
*/ | |
const VERSION = '2.0.0'; | |
/** | |
* Current version hook priority | |
* Will decrement with each release | |
* | |
* @var int | |
* @since 2.0.0 | |
*/ | |
const PRIORITY = 9999; | |
public static $single = null; | |
public static function go() { | |
if ( null === self::$single ) { self::$single = new self(); } | |
return self::$single; | |
} | |
private function __construct() { | |
add_action( 'init', array( $this, 'include_cmb' ), self::PRIORITY ); | |
} | |
public function include_cmb() { | |
if ( ! class_exists( 'CMB2' ) ) { | |
if ( ! defined( 'CMB2_VERSION' ) ) { | |
define( 'CMB2_VERSION', self::VERSION ); | |
} | |
require_once 'CMB2.php'; | |
} | |
} | |
} | |
cmb2_bootstrap_200::go(); |