• Resolved kungfunefar

    (@kungfunefar)


    Hi, found out that blocking phrases does not work. Single words are found but phrases with a space are not found.

    The problem is the str_replace in class-front.php in line 100:
    $blocked_words_str = str_replace(" ", ",", get_post_meta($post_id, "_wpcf7_block_words", true));
    Here you replace all spaces with a comma but you have to replace alle commas that are followed by a space with a comma. If you replace line 100 with this:
    $blocked_words_str = str_replace(", ", ",", get_post_meta($post_id, "_wpcf7_block_words", true));
    it works well.

    Please update your code, so that my changers are overwritten correctly in the next update.

Viewing 3 replies - 1 through 3 (of 3 total)
  • +1

    Good idea, not to remove empty spaces between words in phrases. The original code was empty on both ends of the function (no comma). It did not separate the spam words, but combined them to a new word. Should be better and enough to clean the phrases on both end points instead.

    Plugin Author nysl

    (@nysl)

    Please check the latest version of the plugin.

    Thanks for the suggestion.

    Plugin Author nysl

    (@nysl)

    Solved

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Mistake in class-front.php’ is closed to new replies.