Prepares links for the request.
Description
See also
Parameters
- $element_setting
-
(awsmug\Torro_Forms\DB_Objects\Element_Settings\Element_Setting) (Required) Element setting object.
Return
(array) Links for the given element setting.
Source
File: src/db-objects/element-settings/rest-element-settings-controller.php
protected function prepare_links( $element_setting ) { $links = parent::prepare_links( $element_setting ); if ( ! empty( $element_setting->element_id ) ) { $links['parent_element'] = array( 'href' => rest_url( trailingslashit( sprintf( '%s/%s', $this->namespace, 'elements' ) ) . $element_setting->element_id ), ); } return $links; }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |