Advertisement
Guest User

Function for filtering amazon link and a action

a guest
Oct 18th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. function akram_filtering_posts($content){
  2.  
  3.  
  4. if(preg_match('(amazon.|amzn.to)', $content) === 1 && !is_admin()) {
  5.  
  6. echo __('<h4>An Amazon link have found!</h4>');
  7. }
  8.  
  9. return $content;
  10.  
  11. }
  12. add_filter('the_content','akram_filtering_posts');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement