Advertisement
daymobrew

Filter the_content and the_title to remove confusing text.

Apr 21st, 2013
556
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | None | 0 0
  1. <?php
  2. /*
  3. Plugin Name: Remove references to 'OLYMPUS DIGITAL CAMERA'.
  4. Plugin URI: http://www.damiencarbery.com
  5. Description: Remove references to 'OLYMPUS DIGITAL CAMERA' as it causes confusion.
  6. Author: Damien Carbery
  7. Version: 0.1
  8. */
  9.  
  10. function remove_olympus_digital_camera($content) {
  11.   // Remove references to 'OLYMPUS DIGITAL CAMERA'
  12.   return preg_replace( '/OLYMPUS DIGITAL CAMERA/', ' ', $content);
  13. }
  14.  
  15. add_filter( 'the_content', 'remove_olympus_digital_camera', 20 );
  16. add_filter( 'the_title', 'remove_olympus_digital_camera', 20 );
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement