Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions includes/fields/class-acf-field.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

if ( ! class_exists( 'acf_field' ) ) :
if ( ! class_exists( 'ACF_Field' ) ) :

class acf_field {
class ACF_Field {

// vars
var $name = '',
Expand Down
2 changes: 1 addition & 1 deletion includes/forms/form-comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function comment_form_field_comment( $html ) {
global $post;

// vars
$post_id = false;
$post_id = $post->ID;;

// get field groups
$field_groups = acf_get_field_groups(
Expand Down
3 changes: 2 additions & 1 deletion includes/walkers/class-acf-walker-taxonomy-field.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public function end_lvl( &$output, $depth = 0, $args = array() ) {
* @param int $id ID of the current term.
*/
public function start_el( &$output, $term, $depth = 0, $args = array(), $id = 0 ) {
$term->term_id = (int) $term->term_id;
$is_selected = in_array( $term->term_id, $this->field['value'] );

// Generate array of checkbox input attributes.
Expand All @@ -106,7 +107,7 @@ public function start_el( &$output, $term, $depth = 0, $args = array(), $id = 0
$input_attrs['checked'] = true;
}

$output .= "\n" . '<li data-id="' . esc_attr( $term->term_id ) . '">' .
$output .= "\n" . '<li data-id="' . $term->term_id . '">' .
'<label' . ( $is_selected ? ' class="selected"' : '' ) . '>' .
'<input ' . acf_esc_attrs( $input_attrs ) . '/> ' .
'<span>' . acf_esc_html( $term->name ) . '</span>' .
Expand Down