Skip to content

Commit

Permalink
Merge branch 'master' into 326-google-api-key
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeselander committed Aug 29, 2016
2 parents a844f25 + 7960b48 commit fb17427
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 16 deletions.
19 changes: 18 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
language: php

php:
- 5.2
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm

env:
Expand All @@ -13,6 +14,22 @@ env:
- WP_VERSION=3.8 WP_MULTISITE=0
- WP_VERSION=3.8 WP_MULTISITE=1

matrix:
allow_failures:
- php: hhvm
fast_finish: true
exclude:
# Only test latest version of WP with HHVM
- php: hhvm
env: WP_VERSION=3.8 WP_MULTISITE=0
- php: hhvm
env: WP_VERSION=3.8 WP_MULTISITE=1
# Only test latest version of WP with PHP 7.0 because 3.8 won't work at all
- php: 7.0
env: WP_VERSION=3.8 WP_MULTISITE=0
- php: 7.0
env: WP_VERSION=3.8 WP_MULTISITE=1

before_script:
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION

Expand Down
9 changes: 8 additions & 1 deletion class.cmb-meta-box.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,13 @@ static function layout_fields( array $fields ) { ?>
if ( ! empty( $field->args['sortable'] ) )
$classes[] = 'cmb-sortable';

// Assign extra class for has label or has no label
if ( ! empty( $field->title ) ) {
$label_designation = 'cmb-has-label';
} else {
$label_designation = 'cmb-no-label';
}

$attrs = array(
sprintf( 'id="%s"', sanitize_html_class( $field->id ) ),
sprintf( 'class="%s"', esc_attr( implode(' ', array_map( 'sanitize_html_class', $classes ) ) ) )
Expand All @@ -290,7 +297,7 @@ static function layout_fields( array $fields ) { ?>

?>

<div class="cmb-cell-<?php echo intval( $field->args['cols'] ); ?>">
<div class="cmb-cell-<?php echo intval( $field->args['cols'] ); ?> <?php echo esc_attr( $label_designation ); ?>">

<div <?php echo implode( ' ', $attrs ); ?>>
<?php $field->display(); ?>
Expand Down
2 changes: 1 addition & 1 deletion classes.fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ public function get_default_args() {

public function html() { ?>

<input step="<?php echo esc_attr( $this->args['step'] ); ?>" type="number" <?php $this->id_attr(); ?> <?php $this->boolean_attr(); ?> <?php $this->class_attr( 'cmb_text_number code' ); ?> <?php $this->name_attr(); ?> value="<?php echo esc_attr( $this->value ); ?>" />
<input step="<?php echo esc_attr( $this->args['step'] ); ?>" type="number" <?php $this->id_attr(); ?> <?php $this->boolean_attr(); ?> <?php $this->class_attr( 'cmb_text_number code' ); ?> <?php $this->name_attr(); ?> value="<?php echo esc_attr( $this->get_value() ); ?>" />

<?php }
}
Expand Down
6 changes: 3 additions & 3 deletions css/dist/cmb.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fb17427

Please sign in to comment.