Want more features on Pastebin? Sign Up, it's FREE!

Remove Angle Brackets

By: SergeyBiryukov on Jun 1st, 2011  |  syntax: PHP  |  size: 0.49 KB  |  views: 320  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. /*
  3. Plugin Name: Remove Angle Brackets
  4. Plugin URI: http://milordk.ru/r-lichnoe/opyt/cms/ispravlyaem-ssylku-dlya-vosstanovleniya-parolya-v-wordpres-3-1-3.html
  5. Version: 0.1
  6. Description: Removes angle brackets from a password reset link.
  7. Author: Sergey Biryukov
  8. Author URI: http://sergeybiryukov.ru/
  9. */
  10.  
  11. function remove_angle_brackets($message) {
  12.         return preg_replace('/<http:\/\/(.*)>/', 'http://$1', $message);
  13. }
  14. add_filter('retrieve_password_message', 'remove_angle_brackets');
  15. ?>
clone this paste RAW Paste Data