# alch\_allowed\_editor\_protocols

Filter `alch_allowed_editor_protocols` can be used to change the default protocols that are allowed in the [Editor](https://docs.alchemy-options.com/v0.9/fields/editor) field, which uses those returned by [`wp_allowed_protocols()`](https://developer.wordpress.org/reference/functions/wp_allowed_protocols/) as a default value.

This filter is applied just before saving the value to the database.

## Example

Say we want our Editor fields to allow *only* `https` protocol

```php
function change_alch_allowed_editor_protocols() {
    return array( 'https' );
}

add_filter( 'alch_allowed_editor_protocols', 'change_alch_allowed_editor_protocols' );
```

In a way it is similar to the [`alch_allowed_editor_html_tags`](https://docs.alchemy-options.com/v0.9/filters/alch_allowed_editor_html_tags) filter, since both of them control what is going to be stored from the Editor field. The results of both filters are used in the [`wp_kses`](https://developer.wordpress.org/reference/functions/wp_kses/) before storing the value.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.alchemy-options.com/v0.9/filters/alch_allowed_editor_protocols.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
