Remove html in website url
-
How do I override this function to take out the “https://”
function tribe_get_organizer_website_link( $post_id = null, $label = null ) { $post_id = tribe_get_organizer_id( $post_id ); $url = tribe_get_event_meta( $post_id, '_OrganizerWebsite', true ); if ( ! empty( $url ) ) { $label = is_null( $label ) ? $url : $label; if ( ! empty( $url ) ) { $parseUrl = parse_url( $url ); if ( empty( $parseUrl['scheme'] ) ) { $url = "https://$url"; } } $html = sprintf( '<a href="%s" target="%s">%s</a>', esc_attr( esc_url( $url ) ), apply_filters( 'tribe_get_organizer_website_link_target', '_self' ), apply_filters( 'tribe_get_organizer_website_link_label', esc_html( $label ) ) ); } else { $html = ''; } return apply_filters( 'tribe_get_organizer_website_link', $html );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Remove html in website url’ is closed to new replies.