Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Custom URL schemes for anonymous users

@pittnzk

Participant

Ok, I figured it out.
Just wrote a small plugin adding the “newzik” protocol :

<?php
/**
* Plugin Name: NZK links support
* Plugin URI: http://newzik.com/
* Description: Adds support to newzik:// links
* Version: 1.0
* Author: Pierre Mardon
* Author URI: http://newzik.com/
* License: None
*/

/**
 * Extend list of allowed protocols.
 *
 * @param array $protocols List of default protocols allowed by WordPress.
 *
 * @return array $protocols Updated list including new protocols.
 */
function wporg_extend_allowed_protocols( $protocols ){
    $protocols[] = 'newzik';
    return $protocols;
}
add_filter( 'kses_allowed_protocols' , 'wporg_extend_allowed_protocols' );
?>
Skip to toolbar