Plugin Directory

Changeset 165353


Ignore:
Timestamp:
10/21/2009 02:27:03 AM (16 years ago)
Author:
scripty
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • delink-pages/trunk/scripty-delinkpage.php

    r165171 r165353  
    3434            if ($delinkthis == "true") {
    3535                $newurl = preg_quote(get_permalink($eachpage->ID));
    36                 $output = preg_replace('@\<a href="'.$newurl.'" (.*?)>(.*?)\<\/a>@i', '$2', $output);
     36                $output = preg_replace('@\<a(.*?)href="'.$newurl.'"(.*?)>(.*?)\<\/a>@i', '$3', $output);
    3737            } else if ($delinkthis == "href") {
    3838                $newurl = preg_quote(get_permalink($eachpage->ID));
    39                 $output = preg_replace('@\<a href="'.$newurl.'" (.*?)>(.*?)\<\/a>@i', '<a href="#" $1>$2</a>', $output);
     39                $output = preg_replace('@\<a(.*?)href="'.$newurl.'"(.*?)>(.*?)\<\/a>@i', '<a href="#" $2>$3</a>', $output);
    4040            }
    4141        }
Note: See TracChangeset for help on using the changeset viewer.