Skip to content

Commit ba99d6f

Browse files
committed
Merge remote-tracking branch 'kobi/fix/allow-more-url-protocols' into release/3.0.0-rc3
2 parents 794d603 + 6cfabde commit ba99d6f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

includes/base/element-base.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,11 @@ public function add_link_attributes( $element, array $url_control, $overwrite =
450450
$attributes = [];
451451

452452
if ( ! empty( $url_control['url'] ) ) {
453-
$attributes['href'] = esc_url( $url_control['url'] );
453+
$allowed_protocols = wp_allowed_protocols();
454+
455+
$allowed_protocols += [ 'skype', 'viber' ];
456+
457+
$attributes['href'] = esc_url( $url_control['url'], $allowed_protocols );
454458
}
455459

456460
if ( ! empty( $url_control['is_external'] ) ) {

0 commit comments

Comments
 (0)