Support » Plugins and Hacks » Problem with add_filter

  • 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:
    Description: replace get_the_password_form()
    Version: 0.1
    Author: –
    Author URI:

    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 😉

  • The topic ‘Problem with add_filter’ is closed to new replies.