WordPress.org

Make WordPress Core

Changeset 5370


Ignore:
Timestamp:
05/02/2007 12:32:22 AM (15 years ago)
Author:
ryan
Message:

Call get_option('siteurl') outside the loop to save a few dozen get_option calls. Props andissimo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r5363 r5370  
    14781478    }
    14791479
     1480    $siteurl = get_option('siteurl');
    14801481    foreach ( (array) $wpsmiliestrans as $smiley => $img ) {
    14811482        $wp_smiliessearch[] = '/(\s|^)'.preg_quote($smiley, '/').'(\s|$)/';
    14821483        $smiley_masked = htmlspecialchars(trim($smiley), ENT_QUOTES);
    1483         $wp_smiliesreplace[] = " <img src='" . get_option('siteurl') . "/wp-includes/images/smilies/$img' alt='$smiley_masked' class='wp-smiley' /> ";
     1484        $wp_smiliesreplace[] = " <img src='$siteurl/wp-includes/images/smilies/$img' alt='$smiley_masked' class='wp-smiley' /> ";
    14841485    }
    14851486}
Note: See TracChangeset for help on using the changeset viewer.