URI Protocols Handling Update

Elementor has now updated the way it handles URLs in the URL control.

From v2.9.11 and on, Elementor will use the use wp_allowed_protocols() function to handle allowed URI protocols in links. These protocols are often used to create a deep-link (i.e. a direct link to an app via unique protocol) to a 3rd party application (such as mailto: or tel:)

This means that from this version, only protocols allowed by this WordPress function will be available.

Examples of allowed URI protocols: mailto:, tel:, sms:, etc…

If you wish to add another protocol to your website, you will need to alter the function that retrieves the list of allowed protocols, and add your own protocol.

function allow_additional_protocol( $protocols ){
     $protocols[] = 'my-protocol';
     return $protocols;
}
add_filter( 'kses_allowed_protocols' , 'allow_additional_protocol' );

Liked This Article?

We have a lot more where that came from! Join 1,882,927 subscribers who stay ahead of the pack.
By entering your email, you agree to our Terms of Service and Privacy Policy.

About the Author

Shilo Eish Yemini
Shilo Eish Yemini
Shilo is Elementor’s Editor Product Manager. He loves innovative products, pays attention to the small details, and is passionate about solving puzzles.

Share on

Share on facebook
Share on google
Share on twitter
Share on linkedin

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Never miss an update
Subscribe to our developer’s newsletter for every latest update