WordPress Remove Tool Tips and Title Attributes


/ Published in: PHP
Save to your folder(s)

One crazy designer felt that the title attributes and image alt tool tips were a detraction to his perfect design. This snippit remove images alt="" and href title="" meta.


Copy this code and paste it in your HTML
  1. function fb-remove_title($input) {
  2. return preg_replace_callback('#\stitle=["|\'].*["|\']#',
  3. '$matches',
  4. 'return "";'
  5. ),
  6. $input
  7. );
  8. }
  9. add_filter('wp_list_pages','fb-remove_title');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.