SHARE
TWEET

Untitled

a guest Jun 13th, 2013 457 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function fix_gall($content){
  2. preg_match_all('#(\[gallery.+?\])#is',$content,$listgall);
  3. foreach($listgall[1] as $gall){
  4.  if (stripos($gall,'link=') === false) $content = str_replace($gall, substr($gall, 0, -1).' link="file"]', $content);
  5. }
  6. return $content ;
  7. }
  8. add_filter('content_save_pre','fix_gall');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top