Alchemy Options Docs
v1.0
v1.0
  • Read Me
  • Installation
  • Configuration
  • Meta Boxes
  • Samples
  • Field types
    • Text
    • Password
    • URL
    • Email
    • Tel
    • Textarea
    • Editor (WYSIWYG)
    • Datepicker
    • Image upload
    • Radio buttons
    • Select
    • Checkbox
    • Colorpicker
    • Image radio
    • Post type select
    • Datalist
    • Sections
    • Repeater
    • Button group
    • Slider
    • Taxonomy select
    • Field group
  • Functions
    • alch_options_id
    • alch_network_options_id
    • alch_get_option
    • alch_get_network_option
    • alch_delete_value
    • alch_get_post_meta
  • Javascript
    • getOption
    • getNetworkOption
    • getPostMeta
  • Filters
    • alch_options_id
    • alch_default_page_capabilities
    • alch_default_page_icon
    • alch_default_page_position
    • alch_network_options_id
    • alch_options_id() . '_args'
    • alch_network_options_id() . '_args'
    • alch_allowed_editor_html_tags
    • alch_allowed_editor_protocols
    • alch_{ $optionsPageID }_capabilities
    • alch_{ $optionsPageID }_icon
    • alch_{ $optionsPageID }_position
    • alch_value_{ $optionID }
    • alch_network_value_{ $optionID }
Powered by GitBook
On this page
  1. Filters

alch_allowed_editor_protocols

Previousalch_allowed_editor_html_tagsNextalch_{ $optionsPageID }_capabilities

Last updated 6 years ago

Filter alch_allowed_editor_protocols can be used to change the default protocols that are allowed in the field, which uses those returned by 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

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 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 before storing the value.

Editor
wp_allowed_protocols()
alch_allowed_editor_html_tags
wp_kses