PittNZK (@pittnzk)

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

  • PittNZK
    Participant

    @pittnzk

    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' );
    ?>

    PittNZK
    Participant

    @pittnzk

    Just removed the tags above so that my question makes sense 🙂

Viewing 2 replies - 1 through 2 (of 2 total)