Support » Plugins » function call change splice / str_replace or ?

  • have begun to create a something to limit number of tries on password protected posts/pages (maybe admin even!?) that i would like to make as a plugin

    worked up some code.. don’t want to just hack the wp-pass.php and template-funcitons-post.php (not very pluginable, then?!) the easiest is to replace the function call of ln64 of tempate_functions-post-php

    $output = get_the_password_form();

    to call my function .. eg

    $output = gt_th_psswrd_frm_authentification();

    and that function would then call my modified wp-pass.php called something else.. etc etc..

    does anyone know any good methods to make this happen?

    one way i have seen is the splice/replace done is with “str_replace” but in that instance it seems this is accomplished with strings (text within ‘ ‘ ) & i am having trouble getting it to work to replace the function name!?

    tried like this..

    function add_post_password_authentification ($output) {
    $output = get_the_password_form();
    $output = str_replace (
    return $output;

    but, to no avail… seems like it should / could work..

    any ideas? of course, other suggestions or directions are appreciated, i just want this to work (as a plugin!)

  • The topic ‘function call change splice / str_replace or ?’ is closed to new replies.