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_network_value_{ $optionID }

Previousalch_value_{ $optionID }

Last updated 4 years ago

Dynamic filter alch_network_value_{ $optionID } is similar to . It is used to filter the value for a given before returning it from . It isn't applied to the $default parameter if the field has no value stored.

The $optionID should match one of the IDs in the .

Example

Say you want to tweak the with the ID of my-url-field to convert the http protocol to https.

//somewhere in functions.php

function tweak_network_url_field( $value ) {
    // do not forget to pass it further
    return str_replace( "http://", "https://", $value );
}

add_filter( 'alch_network_value_my-url-field', 'tweak_network_url_field' );
alch_value_{ $optionID }
field
alch_get_network_option
configuration object
URL field