Make WordPress Core


Ignore:
Timestamp:
12/18/2003 09:36:13 AM (21 years ago)
Author:
saxmatt
Message:

Renaming Reloaded.

File:
1 edited

Legend:

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

    r617 r628  
    229229function convert_chars($content,$flag='obsolete attribute left there for backwards compatibility') { // html/unicode entities output
    230230
    231     global $use_htmltrans, $b2_htmltrans, $b2_htmltranswinuni;
     231    global $use_htmltrans, $wp_htmltrans, $wp_htmltranswinuni;
    232232
    233233    // removes metadata tags
     
    242242        // converts HTML-entities to their display values in order to convert them again later
    243243        $content = preg_replace('/['.chr(127).'-'.chr(255).']/e', '"&#".ord(\'\0\').";"', $content );
    244         $content = strtr($content, $b2_htmltrans);
     244        $content = strtr($content, $wp_htmltrans);
    245245
    246246        // now converting: Windows CP1252 => Unicode (valid HTML)
    247247        // (if you've ever pasted text from MSWord, you'll understand)
    248248
    249         $content = strtr($content, $b2_htmltranswinuni);
     249        $content = strtr($content, $wp_htmltranswinuni);
    250250
    251251    }
     
    260260
    261261function convert_bbcode($content) {
    262     global $b2_bbcode, $use_bbcode;
     262    global $wp_bbcode, $use_bbcode;
    263263    if ($use_bbcode) {
    264         $content = preg_replace($b2_bbcode["in"], $b2_bbcode["out"], $content);
     264        $content = preg_replace($wp_bbcode["in"], $wp_bbcode["out"], $content);
    265265    }
    266266    $content = convert_bbcode_email($content);
     
    284284
    285285function convert_gmcode($content) {
    286     global $b2_gmcode, $use_gmcode;
     286    global $wp_gmcode, $use_gmcode;
    287287    if ($use_gmcode) {
    288         $content = preg_replace($b2_gmcode["in"], $b2_gmcode["out"], $content);
     288        $content = preg_replace($wp_gmcode["in"], $wp_gmcode["out"], $content);
    289289    }
    290290    return $content;
     
    293293function convert_smilies($text) {
    294294    global $smilies_directory, $use_smilies;
    295     global $b2_smiliessearch, $b2_smiliesreplace;
     295    global $wp_smiliessearch, $wp_smiliesreplace;
    296296    $output = '';
    297297    if ($use_smilies) {
     
    302302            $content = $textarr[$i];
    303303            if ((strlen($content) > 0) && ('<' != $content{0})) { // If it's not a tag
    304                 $content = str_replace($b2_smiliessearch, $b2_smiliesreplace, $content);
     304                $content = str_replace($wp_smiliessearch, $wp_smiliesreplace, $content);
    305305            }
    306306            $output .= $content;
     
    10311031function pingback($content, $post_ID) {
    10321032    // original code by Mort (http://mort.mine.nu:8080)
    1033     global $siteurl, $blogfilename, $b2_version;
     1033    global $siteurl, $blogfilename, $wp_version;
    10341034    $log = debug_fopen('./pingback.log', 'a');
    10351035    $post_links = array();
     
    11001100
    11011101        // Send the GET request
    1102         $request = "GET $path HTTP/1.1\r\nHost: $host\r\nUser-Agent: b2/$b2_version PHP/" . phpversion() . "\r\n\r\n";
     1102        $request = "GET $path HTTP/1.1\r\nHost: $host\r\nUser-Agent: b2/$wp_version PHP/" . phpversion() . "\r\n\r\n";
    11031103        ob_end_flush();
    11041104        fputs($fp, $request);
     
    15541554}
    15551555
    1556 function start_b2() {
     1556function start_wp() {
    15571557    global $post, $id, $postdata, $authordata, $day, $preview, $page, $pages, $multipage, $more, $numpages;
    15581558    global $preview_userid,$preview_date,$preview_content,$preview_title,$preview_category,$preview_notify,$preview_make_clickable,$preview_autobr;
     
    16101610
    16111611function apply_filters($tag, $string) {
    1612     global $b2_filter;
    1613     if (isset($b2_filter['all'])) {
    1614         $b2_filter['all'] = (is_string($b2_filter['all'])) ? array($b2_filter['all']) : $b2_filter['all'];
    1615         if (isset($b2_filter[$tag]))
    1616             $b2_filter[$tag] = array_merge($b2_filter['all'], $b2_filter[$tag]);
     1612    global $wp_filter;
     1613    if (isset($wp_filter['all'])) {
     1614        $wp_filter['all'] = (is_string($wp_filter['all'])) ? array($wp_filter['all']) : $wp_filter['all'];
     1615        if (isset($wp_filter[$tag]))
     1616            $wp_filter[$tag] = array_merge($wp_filter['all'], $wp_filter[$tag]);
    16171617        else
    1618             $b2_filter[$tag] = array_merge($b2_filter['all'], array());
    1619         $b2_filter[$tag] = array_unique($b2_filter[$tag]);
    1620     }
    1621     if (isset($b2_filter[$tag])) {
    1622         $b2_filter[$tag] = (is_string($b2_filter[$tag])) ? array($b2_filter[$tag]) : $b2_filter[$tag];
    1623         $functions = $b2_filter[$tag];
     1618            $wp_filter[$tag] = array_merge($wp_filter['all'], array());
     1619        $wp_filter[$tag] = array_unique($wp_filter[$tag]);
     1620    }
     1621    if (isset($wp_filter[$tag])) {
     1622        $wp_filter[$tag] = (is_string($wp_filter[$tag])) ? array($wp_filter[$tag]) : $wp_filter[$tag];
     1623        $functions = $wp_filter[$tag];
    16241624        foreach($functions as $function) {
    16251625            //error_log("apply_filters #1 applying filter $function");
     
    16311631
    16321632function add_filter($tag, $function_to_add) {
    1633     global $b2_filter;
    1634     if (isset($b2_filter[$tag])) {
    1635         $functions = $b2_filter[$tag];
     1633    global $wp_filter;
     1634    if (isset($wp_filter[$tag])) {
     1635        $functions = $wp_filter[$tag];
    16361636        if (is_array($functions)) {
    16371637            foreach($functions as $function) {
     
    16451645        if (is_array($function_to_add)) {
    16461646            foreach($function_to_add as $function) {
    1647                 if (!in_array($function, $b2_filter[$tag])) {
     1647                if (!in_array($function, $wp_filter[$tag])) {
    16481648                    $new_functions[] = $function;
    16491649                }
    16501650            }
    16511651        } else */if (is_string($function_to_add)) {
    1652             if (!@in_array($function_to_add, $b2_filter[$tag])) {
     1652            if (!@in_array($function_to_add, $wp_filter[$tag])) {
    16531653                $new_functions[] = $function_to_add;
    16541654            }
    16551655        }
    1656         $b2_filter[$tag] = $new_functions;
    1657     } else {
    1658         $b2_filter[$tag] = array($function_to_add);
     1656        $wp_filter[$tag] = $new_functions;
     1657    } else {
     1658        $wp_filter[$tag] = array($function_to_add);
    16591659    }
    16601660    return true;
     
    16631663// Check for hacks file if the option is enabled
    16641664if (get_settings('hack_file')) {
    1665     if (file_exists($abspath . '/my-hacks.php'))
    1666         require($abspath . '/my-hacks.php');
     1665    if (file_exists(ABSPATH . '/my-hacks.php'))
     1666        require(ABSPATH . '/my-hacks.php');
    16671667}
    16681668?>
Note: See TracChangeset for help on using the changeset viewer.