Plugin Directory

Changeset 1868156


Ignore:
Timestamp:
05/03/2018 01:26:52 PM (8 years ago)
Author:
RadoGeorgiev
Message:

[FIX] Improved handling of repeater values in the REST API

Location:
ultimate-fields/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ultimate-fields/trunk/core/classes/Controller/Options.php

    r1856787 r1868156  
    403403        foreach( $this->get_rest_fields() as $combo ) {
    404404            foreach( $combo[ 'fields' ] as $field => $access ) {
    405                 $options[ $field ] = $api->get_value( $field, 'option' );
     405                $value = $api->get_value( $field, 'option' );
     406
     407                if( is_object( $value ) && method_exists( $value, 'export' ) ) {
     408                    $value = $value->export();
     409                }
     410
     411                $options[ $field ] = $value;
    406412            }
    407413        }
  • ultimate-fields/trunk/ui/classes/Field_Editor.php

    r1856787 r1868156  
    153153        $this->fields();
    154154        foreach( $this->enqueue_callbacks as $callback ) {
    155             call_user_func( $callback );
     155            if( is_callable( $callback ) ) {
     156                call_user_func( $callback );
     157            }
    156158        }
    157159    }
Note: See TracChangeset for help on using the changeset viewer.