diff --git a/includes/class.media.php b/includes/class.media.php index 5c632f3..e0464b6 100644 --- a/includes/class.media.php +++ b/includes/class.media.php @@ -61,9 +61,14 @@ function register_hooks() { * Register media-specific field types */ function register_field_types($field_types) { - $media = new CNR_Field_Type('media'); + /** + * @var CNR_Content_Utilities + */ + global $cnr_content_utilities; + + // Media (Base) + $media = new CNR_Field_Type('media', 'base_closed'); $media->set_description('Media Item'); - $media->set_parent('base_closed'); $media->set_property('title', 'Select Media'); $media->set_property('button','Select Media'); $media->set_property('remove', 'Remove Media'); @@ -72,16 +77,17 @@ function register_field_types($field_types) { $media->set_layout('display', '{media format="display"}'); $media->set_layout('display_url', '{media format="display" type="url"}'); $media->add_script( array('add', 'edit-item', 'post-new.php', 'post.php', 'media-upload-popup'), $this->add_prefix('script_media'), $this->util->get_file_url('js/lib.media.js'), array($this->add_prefix('core'), $this->add_prefix('admin'))); - $field_types[$media->id] =& $media; - - $image = new CNR_Field_Type('image'); + $cnr_content_utilities->register_field($media); + + // Image + $image = new CNR_Field_Type('image', 'media'); $image->set_description('Image'); $image->set_parent('media'); $image->set_property('title', 'Select Image'); $image->set_property('button', 'Select Image'); $image->set_property('remove', 'Remove Image'); $image->set_property('set_as', 'image'); - $field_types[$image->id] =& $image; + $cnr_content_utilities->register_field($image); } /** diff --git a/main.php b/main.php index c3f04fb..52efd74 100644 --- a/main.php +++ b/main.php @@ -3,7 +3,7 @@ Plugin Name: Cornerstone Plugin URI: http://archetyped.com/tools/cornerstone/ Description: Enhanced content management for Wordpress -Version: 0.7.2 +Version: 0.7.3 Author: Archetyped Author URI: http://archetyped.com Support URI: https://github.com/archetyped/cornerstone/wiki/Reporting-Issues diff --git a/package.json b/package.json index ce9fff4..f71fd76 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cornerstone", - "version": "0.7.2", + "version": "0.7.3", "title": "Cornerstone", "description": "Enhanced content management for Wordpress", "author": "Archetyped ", diff --git a/readme.txt b/readme.txt index ff37bf2..ab7c291 100644 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: Archetyped Donate: https://gum.co/cnr-donate Tags: cornerstone, cms, content, management, system, structure, organization, sections Plugin Link: http://archetyped.com/tools/cornerstone/ -Requires at least: 4.2.2 -Tested up to: 4.2.3 +Requires at least: 4.3.0 +Tested up to: 4.3.1 Stable tag: trunk Enhanced content management for Wordpress @@ -56,6 +56,10 @@ Post your questions/comments at [Cornerstone's official issue tracker](https://g 1. Quickly modify a post's section == Changelog == += 0.7.3 = +* Fix: Registration of Media field types +* Update: Confirm compatibility with WordPress v4.3.1 + = 0.7.2 = * Update: WordPress 4.2.3 support * Optimize: Autoload classes