From 335e4ba53229f33fe0c7f41cef619a5aaf3c0d47 Mon Sep 17 00:00:00 2001 From: Matth_eu Date: Tue, 25 Mar 2014 14:01:37 +0000 Subject: [PATCH] bump version number --- custom-meta-boxes.php | 34 +++++++++++++++++----------------- package.json | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/custom-meta-boxes.php b/custom-meta-boxes.php index 6f5dc7f5..deca7f9a 100755 --- a/custom-meta-boxes.php +++ b/custom-meta-boxes.php @@ -7,7 +7,7 @@ Human Made Limited ( @humanmadeltd / hmn.md ) Jonathan Bardo ( @jonathanbardo / jonathanbardo.com ) Description: This will create metaboxes with custom fields that will blow your mind. -Version: 1.0 - Beta 1 +Version: 1.0.1 */ /** @@ -55,7 +55,7 @@ /** * Get all the meta boxes on init - * + * * @return null */ function cmb_init() { @@ -85,7 +85,7 @@ function cmb_init() { * * Key is field name, Value is class used by field. * Available fields can be modified using the 'cmb_field_types' filter. - * + * * @return array */ function _cmb_available_fields() { @@ -118,8 +118,8 @@ function _cmb_available_fields() { /** * Get a field class by type - * - * @param string $type + * + * @param string $type * @return string $class, or false if not found. */ function _cmb_field_class_for_type( $type ) { @@ -134,24 +134,24 @@ function _cmb_field_class_for_type( $type ) { } /** - * For the order of repeatable fields to be guaranteed, orderby meta_id needs to be set. + * For the order of repeatable fields to be guaranteed, orderby meta_id needs to be set. * Note usermeta has a different meta_id column name. - * + * * Only do this for older versions as meta is now ordered by ID (since 3.8) * See http://core.trac.wordpress.org/ticket/25511 - * + * * @param string $query * @return string $query */ function cmb_fix_meta_query_order($query) { $pattern = '/^SELECT (post_id|user_id), meta_key, meta_value FROM \w* WHERE post_id IN \([\d|,]*\)$/'; - - if ( - 0 === strpos( $query, "SELECT post_id, meta_key, meta_value" ) && - preg_match( $pattern, $query, $matches ) - ) { - + + if ( + 0 === strpos( $query, "SELECT post_id, meta_key, meta_value" ) && + preg_match( $pattern, $query, $matches ) + ) { + if ( isset( $matches[1] ) && 'user_id' == $matches[1] ) $meta_id_column = 'umeta_id'; else @@ -161,12 +161,12 @@ function cmb_fix_meta_query_order($query) { if ( false === strpos( $query, $meta_query_orderby ) ) $query .= $meta_query_orderby; - + } - + return $query; } if ( version_compare( get_bloginfo( 'version' ), '3.8', '<' ) ) - add_filter( 'query', 'cmb_fix_meta_query_order', 1 ); \ No newline at end of file + add_filter( 'query', 'cmb_fix_meta_query_order', 1 ); \ No newline at end of file diff --git a/package.json b/package.json index a6c0854e..53f519bf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Custom-Meta-Boxes", - "version": "0.1.0-beta", + "version": "1.0.1", "description": "Custom Meta Boxes is a framework for easily adding custom fields to the WordPress post edit page.", "homepage": "https://github.com/humanmade/Custom-Meta-Boxes/", "repository": {