Plugin Directory

Changeset 202667


Ignore:
Timestamp:
02/06/2010 08:08:01 PM (16 years ago)
Author:
guyfisher
Message:

Replaced the_content filter with the_content_more_link filter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • striptease/branches/2.0/striptease.php

    r85672 r202667  
    3131*/
    3232
    33 function hb_striptease($the_content) {
    34 
    35     global $id, $permalink;
    36 
    37     $teaser = preg_quote("$permalink#more-$id", '/');
    38     $the_content = preg_replace("/$teaser/", $permalink, $the_content);
    39 
    40     return $the_content;
    41 
     33function striptease_more_link( $more_link, $more_link_text ) {
     34    global $id;
     35    return str_replace( "#more-$id", '', $more_link );
    4236}
    43 
    44 add_filter('the_content', 'hb_striptease');
     37add_filter( 'the_content_more_link', 'striptease_more_link', 10, 2 );
    4538
    4639?>
Note: See TracChangeset for help on using the changeset viewer.