Skip to content

Commit

Permalink
merge upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
cluke009 committed Nov 12, 2014
2 parents bb59669 + f3693fc commit 3957bbe
Show file tree
Hide file tree
Showing 23 changed files with 1,319 additions and 257 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,10 @@ build/Release
# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
node_modules

# PHPStorm
.idea

# Sass Cache
*.sass-cache

dandelion.yml
37 changes: 37 additions & 0 deletions CMB2.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public function show_form( $object_id = 0, $object_type = '' ) {
$this->nonce_field();

echo "\n<!-- Begin CMB Fields -->\n";

/**
* Hook before form table begins
*
Expand All @@ -129,6 +130,24 @@ public function show_form( $object_id = 0, $object_type = '' ) {
*/
do_action( 'cmb2_before_form', $this->cmb_id, $object_id, $object_type, $this );

/**
* Hook before form table begins
*
* The first dynamic portion of the hook name, $object_type, is the type of object
* you are working with. Usually `post` (this applies to all post-types).
* Could also be `comment`, `user` or `options-page`.
*
* The second dynamic portion of the hook name, $this->cmb_id, is the meta_box id.
*
* @param array $cmb_id The current box ID
* @param int $object_id The ID of the current object
* @param array $cmb This CMB2 object
* @param string $object_type The type of object you are working with.
* Usually `post` (this applies to all post-types).
* Could also be `comment`, `user` or `options-page`.
*/
do_action( "cmb2_before_{$object_type}_form_{$this->cmb_id}", $object_id, $this, $object_type );

echo '<div class="cmb2-wrap form-table"><div id="cmb2-metabox-'. sanitize_html_class( $this->cmb_id ) .'" class="cmb2-metabox cmb-field-list">';

foreach ( $this->prop( 'fields' ) as $field_args ) {
Expand Down Expand Up @@ -180,6 +199,24 @@ public function show_form( $object_id = 0, $object_type = '' ) {
* @param array $cmb This CMB2 object
*/
do_action( 'cmb2_after_form', $this->cmb_id, $object_id, $object_type, $this );

/**
* Hook after form form has been rendered
*
* The dynamic portion of the hook name, $this->cmb_id, is the meta_box id.
*
* The first dynamic portion of the hook name, $object_type, is the type of object
* you are working with. Usually `post` (this applies to all post-types).
* Could also be `comment`, `user` or `options-page`.
*
* @param int $object_id The ID of the current object
* @param array $cmb This CMB2 object
* @param string $object_type The type of object you are working with.
* Usually `post` (this applies to all post-types).
* Could also be `comment`, `user` or `options-page`.
*/
do_action( "cmb2_after_{$object_type}_form_{$this->cmb_id}", $object_id, $this );

echo "\n<!-- End CMB Fields -->\n";

}
Expand Down
34 changes: 32 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,39 @@ module.exports = function(grunt) {

grunt.initConfig({

pkg: grunt.file.readJSON('package.json'),
pkg: grunt.file.readJSON( 'package.json' ),

phpunit: {
classes: {}
},

githooks: {
all: {
'pre-commit': 'default'
'pre-commit': 'tests'
}
},

makepot: {
target: {
options: {
domainPath: 'languages/',
potComments: '',
potFilename: 'cmb2.pot',
type: 'wp-plugin',
updateTimestamp: true,
potHeaders: {
poedit: true,
'x-poedit-keywordslist': true
},
processPot: function( pot, options ) {
pot.headers['report-msgid-bugs-to'] = 'http://wordpress.org/support/plugin/cmb2';
pot.headers['last-translator'] = 'WebDevStudios [email protected]';
pot.headers['language-team'] = 'WebDevStudios [email protected]';
var today = new Date();
pot.headers['po-revision-date'] = today.getFullYear() +'-'+ ( today.getMonth() + 1 ) +'-'+ today.getDate() +' '+ today.getUTCHours() +':'+ today.getUTCMinutes() +'+'+ today.getTimezoneOffset();
return pot;
}
}
}
},

Expand Down Expand Up @@ -149,7 +173,13 @@ module.exports = function(grunt) {
options: {
debounceDelay: 500
}
},

other: {
files: [ '*.php', '**/*.php', '!node_modules/**', '!tests/**' ],
tasks: [ 'makepot' ]
}

},

// make a zipfile
Expand Down
14 changes: 6 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
"name": "webdevstudios/cmb2",
"description": "Custom Metaboxes and Fields (CMB) will create metaboxes and forms with custom fields that will blow your mind.",
"license": "GPL-2.0+",
"version": "2.0",
"keywords": ["wordpress", "plugin", "metabox"],
"homepage": "https://github.com/WebDevStudios/CMB2",
"type": "wordpress-plugin",
"authors": [
{
"name": "WebDevStudios",
Expand All @@ -14,18 +10,20 @@
"role": "Developer"
}
],
"keywords": ["wordpress", "plugin", "metabox"],
"homepage": "https://github.com/WebDevStudios/CMB2",
"type": "wordpress-plugin",
"support": {
"issues": "https://github.com/WebDevStudios/CMB2/issues",
"source": "http://wordpress.org/support/plugin/cmb2"
},
"require": {
"php": ">5.2.4",
"php": ">5.2.4"
},
"suggest": {
"composer/installers": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
},
"autoload": {
"files": ["init.php"]
}
}
8 changes: 3 additions & 5 deletions css/cmb2.css
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ span.cmb2-metabox-description
border: 1px solid #e9e9e9;
-moz-border-radius: 2px;
border-radius: 2px;
background: #fff;
background: white;
}

/* line 357, sass/partials/_main_wrap.scss */
Expand Down Expand Up @@ -1255,7 +1255,7 @@ Sidebar Placement Adjustments
{
color: #222;
border: 1px solid #aaa;
background: #fff url(../images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;
background: white url(../images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;
}

/* line 28, sass/partials/_jquery_ui.scss */
Expand Down Expand Up @@ -1343,7 +1343,7 @@ Sidebar Placement Adjustments

color: #212121;
border: 1px solid #aaa;
background: #fff url(../images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
background: white url(../images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
}

/* line 36, sass/partials/_jquery_ui.scss */
Expand Down Expand Up @@ -3183,8 +3183,6 @@ Sidebar Placement Adjustments
filter: mask(); /*must have*/
}

/*# sourceMappingURL=cmb2.css.map */

@media (max-width: 450px)
{
/* line 198, sass/partials/_main_wrap.scss */
Expand Down
Loading

0 comments on commit 3957bbe

Please sign in to comment.