Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Commit

Permalink
add CMB2_LOADED constant for easier checking for dependent scripts. F…
Browse files Browse the repository at this point in the history
…ixes CMB2#181
  • Loading branch information
jtsternberg committed Feb 15, 2015
1 parent 9e202ac commit d45ff09
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.

* Use the more appropriate `add_meta_boxes` hook for adding metaboxes to post-edit screen. Thanks [@inspiraaz](https://github.com/inspiraaz) for reporting. ([#161](https://github.com/WebDevStudios/CMB2/issues/161))
* Add a `row_classes` field param which allows you to add additional classes to the cmb-row wrap. This parameter can take a string, or array, or can take a callback that returns a string or array. The callback will receive `$field_args` as the first argument, and the CMB2_Field `$field` object as the second argument. Reported/requested in [#68](https://github.com/WebDevStudios/CMB2/issues/68).
* New constant, `CMB2_LOADED`, which you can use to check if CMB2 is loaded for your plugins/themes with CMB2 dependency.

## 2.0.1 - 2015-02-02

Expand Down
7 changes: 7 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ public static function go() {
}

private function __construct() {
/**
* A constant you can use to check if CMB2 is loaded
* for your plugins/themes with CMB2 dependency
*/
if ( ! defined( 'CMB2_LOADED' ) ) {
define( 'CMB2_LOADED', true );
}
add_action( 'init', array( $this, 'include_cmb' ), self::PRIORITY );
}

Expand Down
4 changes: 2 additions & 2 deletions languages/cmb2.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ msgid ""
msgstr ""
"Project-Id-Version: CMB2 2.0.2\n"
"Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/cmb2\n"
"POT-Creation-Date: 2015-02-15 01:48:47+00:00\n"
"POT-Creation-Date: 2015-02-15 01:49:01+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2015-2-14 1:48+300\n"
"PO-Revision-Date: 2015-2-14 1:49+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

0 comments on commit d45ff09

Please sign in to comment.