A list of denied words, with a condition only if glued with symbols
-
[moved to Developing WordPress. Please use this for any coding questions. The old Plugins and Hacks forum is no longer in use.]
A list of denied words, with a condition only if glued with symbols
//my arrays
$Rejected_symbols = array('*','#','-','!','?','+','=','¨','^','~','@'); $Rejected_if_with_symbols = array('t1','t2','t3','t4');
// my search 1 – symbols always rejecteds
$search = $Rejected_symbols; $replace = array('Forbidden symbol','Forbidden symbol','Forbidden symbol','x','x','x','x','x','x','x','x'); (my-function)
// my search 2 – Words rejecteds, if theys are glueds with symbols
$search = $Rejected_if_with_symbols; $replace = array('Prohibited combination','Prohibited combination','Prohibited combination','Prohibited combination'); (my-function)
// my search 3, words always rejecteds and your array.
$search = array('string1','string2','string3','string4'); $replace = array('forbiten word','forbiten word','forbiten word','forbiten word'); (my-function)
In the first search, success, the forever prohibited symbols,
In the third search, success, words that do not desire are always forbidden.
But in SECOND search, words are always denied, and these are important must pass, only can be denied if they are glued with simbols in the first array.this words: (‘t1′,’t2′,’t3′,’t4’); in seatch 2 Are always being denied, and I do not want this, I want them denied only if they are glued with symbols:
%t1 ou ?t1 ou +t1 etc..
- The topic ‘A list of denied words, with a condition only if glued with symbols’ is closed to new replies.