| 1 |
# CMB2 Metatabs Options |
| 2 |
|
| 3 |
Contributors: @rogerlos, @rubengc |
| 4 |
|
| 5 |
Tags: cmb2, metaboxes, forms, fields, options, settings, tabs, cmo |
| 6 |
|
| 7 |
Requires at least: 3.8.0 |
| 8 |
|
| 9 |
Tested up to: 4.8 |
| 10 |
|
| 11 |
Stable tag: 1.3 |
| 12 |
|
| 13 |
License: GPLv2 or later |
| 14 |
|
| 15 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
| 16 |
|
| 17 |
|
| 18 |
Extends CMB2--create WordPress options pages with multiple metaboxes, |
| 19 |
support for tabs, and flexible menu locations. |
| 20 |
|
| 21 |
# Description |
| 22 |
|
| 23 |
CMB2 Metatabs Options (CMO) is a plugin (or class) for developers using CMB2 to manage metaboxes and fields. |
| 24 |
CMO makes it easy to create options pages with multiple metaboxes--and optional WordPress admin tabs. |
| 25 |
You can attach your option page(s) to any existing Wordpress menu or add them as a new |
| 26 |
top-level menu. You can also add multiple options pages! |
| 27 |
|
| 28 |
This plugin requires the [](http://wordpress.org/plugins/cmb2/CMB2 Plugin](http://wordpress.org/plugins/cmb2/](http://wordpress.org/plugins/cmb2/), or your project |
| 29 |
must already utilize the [](https://github.com/WebDevStudios/CMB2CMB2](https://github.com/WebDevStudios/CMB2](https://github.com/WebDevStudios/CMB2) library. CMB2 is *not* included. |
| 30 |
|
| 31 |
Please see the wiki at CMO's github repository for a |
| 32 |
[](https://github.com/rogerlos/cmb2-metatabs-options/wikidetailed user's guide](https://github.com/rogerlos/cmb2-metatabs-options/wiki](https://github.com/rogerlos/cmb2-metatabs-options/wiki). |
| 33 |
|
| 34 |
Thanks to the folks maintaining CMB2 for their continued development, and providing the |
| 35 |
starting point for this plugin. |
| 36 |
|
| 37 |
# Installation (as WP plugin) |
| 38 |
|
| 39 |
Download the plugin zip file and add via Plugins->Add New->Upload. Or FTP the unzipped plugin folder to |
| 40 |
your wp_content/plugins directory. Activate the plugin within WP admin. |
| 41 |
|
| 42 |
Note this plugin does nothing by default other than give you access to the Cmb2_Metatabs_Options() class. |
| 43 |
|
| 44 |
You can see an example of what this plugin does by using the WP plugin editor and uncommenting the line |
| 45 |
in the main plugin file which reads "include 'example.php';". |
| 46 |
|
| 47 |
# Installation (as stand-alone class) |
| 48 |
|
| 49 |
Copy the files within the code directory to your project and include the class file in your code. If you |
| 50 |
change the location of the JS file, you must inject 'jsuri' with its new URL into the class when creating |
| 51 |
an options page. |
| 52 |
|
| 53 |
# Changelog |
| 54 |
|
| 55 |
= 1.3 = |
| 56 |
* Added "Reset Options" button. Thanks @rubengc |
| 57 |
|
| 58 |
= 1.2 = |
| 59 |
* Added test to see if autoloader has already been loaded. Thanks: @rubengc |
| 60 |
* Added menu argument 'view_capability' to set page viewing capability. Idea: @Julianoe |
| 61 |
* Added argument 'plugincss': disables plugin css, still allows custom CSS via 'admincss'. Idea: @jquimera |
| 62 |
* Added wp box nonces to options page form. Bug report: @Jekyll4k, @Kaleidosko |
| 63 |
|
| 64 |
= 1.1.2 = |
| 65 |
* Changed way empty string was passed in before- and after-form filters, now supports cumulative filtering |
| 66 |
|
| 67 |
= 1.1.1 = |
| 68 |
* Added 'admincss' parameter to turn off (false) or inject your own css (string) into admin page |
| 69 |
* Added 'class' to allow class(es) to be added to the WordPress admin page wrapper |
| 70 |
* Code cleanup to WordPress standards |
| 71 |
|
| 72 |
= 1.1.0 = |
| 73 |
* Oops: Class now works when adding multiple options pages |
| 74 |
* New: add options page(s) to multisite network menus |
| 75 |
* New: argument parameters to turn off calls to CMB2_Box::get_all() and make registering the option optional |
| 76 |
* New: page load actions can now be passed into the contructor |
| 77 |
* Improved: 'boxes' array may now contain either/mixed CMB2 box objects / CMB2 box ids |
| 78 |
* Improved: Less reliance on options key to trigger internal events |
| 79 |
* Improved: Tighter checks for when to load plugin JS and CSS |
| 80 |
* Improved: before and after filters now pass page id as second argument (useful for multiple pages) |
| 81 |
* Bug fix: Submenu page added with same slug as parent works as WP gods intended |
| 82 |
* Bug fix: Wrong parameter passed to localized JS fixed |
| 83 |
* Note: Extensive use of closures requires PHP >= 5.3 |
| 84 |
|
| 85 |
= 1.0.3 = |
| 86 |
* Added composer.json -- thanks misfist |
| 87 |
* Changed should_save() method to static -- thanks chrisgherbert |
| 88 |
|
| 89 |
= 1.0.2 = |
| 90 |
* Revised the menu building method and injected properties to be clearer and more dependable -- thanks ajuliano |
| 91 |
* Added multidimensional argument parsing method |
| 92 |
|
| 93 |
= 1.0.1 = |
| 94 |
* code refactoring and comment revisions |
| 95 |
|
| 96 |
= 1.0.0 = |
| 97 |
* Initial release. |
| 98 |
|