Skip to content
Merged
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
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"autoload": {
"psr-4": {
"ACF\\Blocks\\": "includes/Blocks/",
"SCF\\Fields\\FlexibleContent\\": "includes/fields/FlexibleContent/",
"SCF\\Forms\\": "includes/forms/",
"SCF\\Meta\\": "includes/Meta/",
"SCF\\Fields\\FlexibleContent\\": "includes/fields/FlexibleContent/"
Expand All @@ -41,6 +42,8 @@
"phpstan/extension-installer": true,
"roots/wordpress-core-installer": true
},
"classmap-authoritative": true,
"optimize-autoloader": true,
"platform": {
"php": "7.4"
},
Expand Down
14 changes: 12 additions & 2 deletions docs/code-reference/META.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,14 +398,24 @@ This file tracks code elements that need documentation.
- `acf/get_field_types`
- `acf/localized_field_categories`

## fields/class-acf-field-flexible-content.php
## fields/FlexibleContent/Layout.php

### Hooks

- `acf/fields/flexible_content/layout_default_expanded`
- `acf/fields/flexible_content/layout_title`

## fields/FlexibleContent/Render.php

### Hooks

- `acf/fields/flexible_content/no_value_message`

## fields/class-acf-field-flexible-content.php

### Hooks

- `acf/fields/flexible_content/layout_default_expanded`

## fields/class-acf-field-gallery.php

### Hooks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Class SCF_Rest_Types_Endpoint

* Extends the /wp/v2/types endpoint to include SCF fields.
* Extends the /wp/v2/types endpoint to include SCF fields and source filtering.
* @since SCF 6.5.0

## Methods
Expand All @@ -13,6 +13,35 @@ Initialize the class.

* @since SCF 6.5.0

### `filter_types_request`

Filter post types requests, fires for both collection and individual requests.
We only want to handle individual requets to ensure the post type requested matches the source.

* @since SCF 6.5.0
* @param mixed $response The current response, either response or null.
* @param array $handler The handler for the route.
* @param WP_REST_Request $request The request object.
* @return mixed The response or null.

### `filter_post_type`

Filter individual post type in the response.

* @since SCF 6.5.0
* @param WP_REST_Response $response The response object.
* @param WP_Post_Type $post_type The post type object.
* @param WP_REST_Request $request The request object.
* @return WP_REST_Response|null The filtered response or null to filter it out.

### `get_source_post_types`

Get an array of post types for each source.

* @since SCF 6.5.0
* @param string $source The source to get post types for.
* @return array An array of post type names for the specified source.

### `register_extra_fields`

Register extra SCF fields for the post types endpoint.
Expand All @@ -34,3 +63,42 @@ Get the schema for the SCF fields.

* @since SCF 6.5.0
* @return array The schema for the SCF fields.

### `register_parameters`

Register the source parameter for the post types endpoint.

* @since SCF 6.5.0

### `get_source_param_definition`

Get the source parameter definition

* @since SCF 6.5.0
* @return array Parameter definition

### `add_parameter_to_endpoints`

Add source parameter directly to the endpoints for proper documentation

* @since SCF 6.5.0
* @param array $endpoints The REST API endpoints.
* @return array Modified endpoints

### `add_collection_params`

Add source parameter to the collection parameters for the types endpoint.

* @since SCF 6.5.0
* @param array $query_params JSON Schema-formatted collection parameters.
* @return array Modified collection parameters.

### `clean_types_response`

Clean up null entries from the response

* @since SCF 6.5.0
* @param array $response The response data.
* @param WP_REST_Server $server The REST server instance.
* @param WP_REST_Request $request The original request.
* @return array The filtered response data.
2 changes: 0 additions & 2 deletions lang/secure-custom-fields-nl_NL_formal.l10n.php

This file was deleted.

Binary file removed lang/secure-custom-fields-nl_NL_formal.mo
Binary file not shown.
Loading
Loading