Skip to content

Commit

Permalink
Need to explicity load CMB2 class in include_cmb method for back-comp…
Browse files Browse the repository at this point in the history
…at (to keep old versions from loading as well). Fixes CMB2#520
  • Loading branch information
jtsternberg committed Feb 29, 2016
1 parent ec47249 commit 22fd55f
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.

## [Unreleased][unreleased]

## 2.2.1 - 2016-02-29

### Bug Fixes

* Fixes back-compatibility issue which could allow multiple CMB2 instances to load (causing fatal errors). ([#520](https://github.com/WebDevStudios/CMB2/pull/520))

## 2.2.0 - 2016-02-27

### Enhancements
Expand Down
19 changes: 10 additions & 9 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Bill Erickson (@billerickson / billerickson.net)
* Andrew Norcross (@norcross / andrewnorcross.com)
*
* Version: 2.2.0
* Version: 2.2.1
*
* Text Domain: cmb2
* Domain Path: languages
Expand Down Expand Up @@ -48,7 +48,7 @@
or things might explode!
*************************************************************************/

if ( ! class_exists( 'CMB2_Bootstrap_221_Trunk', false ) ) {
if ( ! class_exists( 'CMB2_Bootstrap_221', false ) ) {

/**
* Handles checking for and loading the newest version of CMB2
Expand All @@ -61,14 +61,14 @@
* @license GPL-2.0+
* @link http://webdevstudios.com
*/
class CMB2_Bootstrap_221_Trunk {
class CMB2_Bootstrap_221 {

/**
* Current version number
* @var string
* @since 1.0.0
*/
const VERSION = '2.2.0';
const VERSION = '2.2.1';

/**
* Current version hook priority.
Expand All @@ -80,17 +80,17 @@ class CMB2_Bootstrap_221_Trunk {
const PRIORITY = 9983;

/**
* Single instance of the CMB2_Bootstrap_221_Trunk object
* Single instance of the CMB2_Bootstrap_221 object
*
* @var CMB2_Bootstrap_221_Trunk
* @var CMB2_Bootstrap_221
*/
public static $single_instance = null;

/**
* Creates/returns the single instance CMB2_Bootstrap_221_Trunk object
* Creates/returns the single instance CMB2_Bootstrap_221 object
*
* @since 2.0.0
* @return CMB2_Bootstrap_221_Trunk Single instance object
* @return CMB2_Bootstrap_221 Single instance object
*/
public static function initiate() {
if ( null === self::$single_instance ) {
Expand Down Expand Up @@ -141,6 +141,7 @@ public function include_cmb() {
$this->l10ni18n();

// Include helper functions
require_once 'includes/CMB2.php';
require_once 'includes/helper-functions.php';

// Now kick off the class autoloader
Expand Down Expand Up @@ -178,6 +179,6 @@ public function l10ni18n() {
}

// Make it so...
CMB2_Bootstrap_221_Trunk::initiate();
CMB2_Bootstrap_221::initiate();

}
6 changes: 3 additions & 3 deletions languages/cmb2.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# This file is distributed under the same license as the CMB2 package.
msgid ""
msgstr ""
"Project-Id-Version: CMB2 2.2.0\n"
"Project-Id-Version: CMB2 2.2.1\n"
"Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/cmb2\n"
"POT-Creation-Date: 2016-02-28 04:30:43+00:00\n"
"POT-Creation-Date: 2016-02-29 22:09:14+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2016-2-27 4:30+300\n"
"PO-Revision-Date: 2016-2-29 22:9+300\n"
"Last-Translator: WebDevStudios [email protected]\n"
"Language-Team: WebDevStudios [email protected]\n"
"X-Generator: grunt-wp-i18n 0.4.9\n"
Expand Down
8 changes: 7 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
**Tags:** metaboxes, forms, fields, options, settings
**Requires at least:** 3.8.0
**Tested up to:** 4.4.2
**Stable tag:** 2.2.0
**Stable tag:** 2.2.1
**License:** GPLv2 or later
**License URI:** [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)

Expand Down Expand Up @@ -105,6 +105,12 @@ If including the library in your plugin or theme:

## Most Recent Changes

### 2.2.1 - 2016-02-29

#### Bug Fixes

* Fixes back-compatibility issue which could allow multiple CMB2 instances to load (causing fatal errors). ([#520](https://github.com/WebDevStudios/CMB2/pull/520))

### 2.2.0

#### Enhancements
Expand Down
20 changes: 19 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: http://webdevstudios.com
Tags: metaboxes, forms, fields, options, settings
Requires at least: 3.8.0
Tested up to: 4.4.2
Stable tag: 2.2.0
Stable tag: 2.2.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -77,6 +77,12 @@ A complete list of all our awesome contributors found here: [github.com/WebDevSt

### Most Recent Changes

#### 2.2.1

##### Bug Fixes

* Fixes back-compatibility issue which could allow multiple CMB2 instances to load (causing fatal errors). ([#520](https://github.com/WebDevStudios/CMB2/pull/520))

#### 2.2.0

##### Enhancements
Expand Down Expand Up @@ -132,6 +138,12 @@ FAQ's usually end up in the [github wiki](https://github.com/WebDevStudios/CMB2/

== Changelog ==

### 2.2.1

#### Bug Fixes

* Fixes back-compatibility issue which could allow multiple CMB2 instances to load (causing fatal errors). ([#520](https://github.com/WebDevStudios/CMB2/pull/520))

### 2.2.0 - 2016-02-27

#### Enhancements
Expand Down Expand Up @@ -557,6 +569,12 @@ It is now passed a null value vs saved value. If null is returned, default sanit

== Upgrade Notice ==

### 2.2.1

#### Bug Fixes

* CRITICAL UPDATE: Fixes back-compatibility issue which could allow multiple CMB2 instances to load (causing fatal errors). ([#520](https://github.com/WebDevStudios/CMB2/pull/520))

### 2.2.0 - 2016-02-27

#### Enhancements
Expand Down

0 comments on commit 22fd55f

Please sign in to comment.