Skip to content

Commit

Permalink
removed class check added by 6af54a0 fixes issue #6
Browse files Browse the repository at this point in the history
  • Loading branch information
Hube2 committed Sep 26, 2016
1 parent d4699f1 commit 277ef42
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions acf-input-counter.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public function scripts() {
} // end public function scripts

public function render_field($field) {
//echo '<pre>'; print_r($field); echo '</pre>';
if (!$this->run() ||
!$field['maxlength'] ||
($field['type'] != 'text' && $field['type'] != 'textarea')) {
Expand All @@ -60,15 +61,12 @@ public function render_field($field) {
}
$len = strlen($field['value']);
$max = $field['maxlength'];

if ( $field['wrapper']['class'] == 'acf_counter' ) {
?>
<span class="char-count">
<?php echo __('Characters', 'dvp'); ?>: <span class="count"><?php echo $len; ?></span>
<?php echo __('of', 'dvp'); ?> <?php echo $max; ?>
</span>
<?php
}
} // end public function render_field

} // end class acf_input_counter
Expand Down

0 comments on commit 277ef42

Please sign in to comment.