WordPress.org

Ready to get started?Download WordPress

Forums

Broken add_filter since last update (1 post)

  1. tis01
    Member
    Posted 2 years ago #

    Hi guys,

    For some rewrite on the fly, I use for 2 years this filter on title but I update WP into 3.3.1 and know it seems to don't work anymore. I serached but I still but don't understand why. Anybody have any idea ?

    add_filter( 'the_title', 'nettoyage' );
    function nettoyage( $title ) {
    $pattern = array ('/(((?!\s+–\s+).)*)\s+–\s+(((?!\s+\().)*)\s+\((\d+)\.(\d+)\)/','/\(.*\)/');
    $replacement = array ('$1 $5x$6 - $3');
    return preg_replace( $pattern, $replacement, $title );
    }

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags