Problem with add_filter (1 post)

  1. modjodandy
    Posted 7 years ago #

    HI guys,

    I tried to create a plugin who replace a wordpress's core function, but that don't seems to work. Here the piece of code, I've done:

    Plugin Name: Test
    Plugin URI: http://www.nowhere.com
    Description: replace get_the_password_form()
    Version: 0.1
    Author: -
    Author URI: http://www.nowhere.com

    function get_the_password_form_bis() {
    global $post;
    $label = 'pwbox-'.(empty($post->ID) ? rand() : $post->ID);
    $output = '<p>Esapce réservé à nos partenaire, merci de bien vouloir entré votre mot de passe: </p>';

    return apply_filters('the_password_form', $output);

    add_filter('get_the_password_form', 'get_the_password_form_bis');

    By the way, thank you guys ;)

Topic Closed

This topic has been closed to new replies.

About this Topic