'required' => true,
),
'instance' => array
( 'description' =>
__( 'Current instance settings of the widget.'
),
'type' => 'object',
),
'form_data' => array
( 'description' =>
__( 'Serialized widget form data to encode into instance settings.'
),
'type' => 'string',
'sanitize_callback' =>
static function( $form_data ) { $array = array
();
wp_parse_str( $form_data,
$array );
return $array;
},
),
),
array
( 'methods' => WP_REST_Server::CREATABLE,
'permission_callback' => array
( $this, 'get_item_permissions_check'
),
'callback' => array
( $this, 'encode_form_data'
),
),
) );