• Resolved schlumpfmaster

    (@schlumpfmaster)


    Hi all

    I wonder if there is a problem with WordPress 2.8 and this piece of code:

    global $wp_smiliessearch, $wp_smiliesreplace;
    $content = preg_replace($wp_smiliessearch, $wp_smiliesreplace, $content);

    It works in WP2.1 – 2.7.1 but doesn’t in WP2.8.
    I didn’t find any hints to so solve this problem.

    Thanks a lot for suggestions,
    Reto

Viewing 1 replies (of 1 total)
  • Thread Starter schlumpfmaster

    (@schlumpfmaster)

    I’ve found a solution:

    $siteurl = get_option( 'siteurl' );
    foreach ( (array) $wpsmiliestrans as $smiley => $img ) {
    $wp_smiliessearch = '/(\s|^)' . preg_quote( $smiley, '/' ) . '(\s|$)/';
    $smiley_masked = attribute_escape( trim( $smiley ) );
    $wp_smiliesreplace = " <img src='$siteurl/wp-includes/images/smilies/$img' alt='$smiley_masked' class='wp-smiley' /> ";
    $content=preg_replace($wp_smiliessearch, $wp_smiliesreplace, $content);
    }

    Greetings,
    Reto

Viewing 1 replies (of 1 total)
  • The topic ‘Smilies doesn’t shows in WP 2.8’ is closed to new replies.