Make WordPress Core


Ignore:
Timestamp:
08/30/2006 09:46:31 PM (19 years ago)
Author:
ryan
Message:

Use get_option instead of get_settings. Just 'cause.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r4138 r4144  
    2929function wp_loginout() {
    3030    if ( ! is_user_logged_in() )
    31         $link = '<a href="' . get_settings('siteurl') . '/wp-login.php">' . __('Login') . '</a>';
    32     else
    33         $link = '<a href="' . get_settings('siteurl') . '/wp-login.php?action=logout">' . __('Logout') . '</a>';
     31        $link = '<a href="' . get_option('siteurl') . '/wp-login.php">' . __('Login') . '</a>';
     32    else
     33        $link = '<a href="' . get_option('siteurl') . '/wp-login.php?action=logout">' . __('Logout') . '</a>';
    3434
    3535    echo apply_filters('loginout', $link);
     
    4040
    4141    if ( ! is_user_logged_in() ) {
    42         if ( get_settings('users_can_register') )
    43             $link = $before . '<a href="' . get_settings('siteurl') . '/wp-register.php">' . __('Register') . '</a>' . $after;
     42        if ( get_option('users_can_register') )
     43            $link = $before . '<a href="' . get_option('siteurl') . '/wp-register.php">' . __('Register') . '</a>' . $after;
    4444        else
    4545            $link = '';
    4646    } else {
    47         $link = $before . '<a href="' . get_settings('siteurl') . '/wp-admin/">' . __('Site Admin') . '</a>' . $after;
     47        $link = $before . '<a href="' . get_option('siteurl') . '/wp-admin/">' . __('Site Admin') . '</a>' . $after;
    4848    }
    4949
     
    7676        case 'home' :
    7777        case 'siteurl' :
    78             $output = get_settings('home');
     78            $output = get_option('home');
    7979            break;
    8080        case 'wpurl' :
    81             $output = get_settings('siteurl');
     81            $output = get_option('siteurl');
    8282            break;
    8383        case 'description':
    84             $output = get_settings('blogdescription');
     84            $output = get_option('blogdescription');
    8585            break;
    8686        case 'rdf_url':
     
    100100            break;
    101101        case 'pingback_url':
    102             $output = get_settings('siteurl') .'/xmlrpc.php';
     102            $output = get_option('siteurl') .'/xmlrpc.php';
    103103            break;
    104104        case 'stylesheet_url':
     
    113113            break;
    114114        case 'admin_email':
    115             $output = get_settings('admin_email');
     115            $output = get_option('admin_email');
    116116            break;
    117117        case 'charset':
    118             $output = get_settings('blog_charset');
     118            $output = get_option('blog_charset');
    119119            if ('' == $output) $output = 'UTF-8';
    120120            break;
     
    128128        case 'name':
    129129        default:
    130             $output = get_settings('blogname');
     130            $output = get_option('blogname');
    131131            break;
    132132    }
     
    310310
    311311    if ( !$archive_date_format_over_ride ) {
    312         $archive_day_date_format = get_settings('date_format');
    313         $archive_week_start_date_format = get_settings('date_format');
    314         $archive_week_end_date_format = get_settings('date_format');
    315     }
    316 
    317     $add_hours = intval(get_settings('gmt_offset'));
    318     $add_minutes = intval(60 * (get_settings('gmt_offset') - $add_hours));
     312        $archive_day_date_format = get_option('date_format');
     313        $archive_week_start_date_format = get_option('date_format');
     314        $archive_week_end_date_format = get_option('date_format');
     315    }
     316
     317    $add_hours = intval(get_option('gmt_offset'));
     318    $add_minutes = intval(60 * (get_option('gmt_offset') - $add_hours));
    319319
    320320    if ( 'monthly' == $type ) {
     
    359359        }
    360360    } elseif ( 'weekly' == $type ) {
    361         $start_of_week = get_settings('start_of_week');
     361        $start_of_week = get_option('start_of_week');
    362362        $arcresults = $wpdb->get_results("SELECT DISTINCT WEEK(post_date, $start_of_week) AS `week`, YEAR(post_date) AS yr, DATE_FORMAT(post_date, '%Y-%m-%d') AS yyyymmdd FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' ORDER BY post_date DESC" . $limit);
    363363        $arc_w_last = '';
     
    367367                        $arc_year = $arcresult->yr;
    368368                        $arc_w_last = $arcresult->week;
    369                         $arc_week = get_weekstartend($arcresult->yyyymmdd, get_settings('start_of_week'));
     369                        $arc_week = get_weekstartend($arcresult->yyyymmdd, get_option('start_of_week'));
    370370                        $arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']);
    371371                        $arc_week_end = date_i18n($archive_week_end_date_format, $arc_week['end']);
    372                         $url  = sprintf('%s/%s%sm%s%s%sw%s%d', get_settings('home'), '', '?', '=', $arc_year, '&amp;', '=', $arcresult->week);
     372                        $url  = sprintf('%s/%s%sm%s%s%sw%s%d', get_option('home'), '', '?', '=', $arc_year, '&amp;', '=', $arcresult->week);
    373373                        $text = $arc_week_start . $archive_week_separator . $arc_week_end;
    374374                        echo get_archives_link($url, $text, $format, $before, $after);
     
    417417
    418418    // week_begins = 0 stands for Sunday
    419     $week_begins = intval(get_settings('start_of_week'));
    420     $add_hours = intval(get_settings('gmt_offset'));
    421     $add_minutes = intval(60 * (get_settings('gmt_offset') - $add_hours));
     419    $week_begins = intval(get_option('start_of_week'));
     420    $add_hours = intval(get_option('gmt_offset'));
     421    $add_minutes = intval(60 * (get_option('gmt_offset') - $add_hours));
    422422
    423423    // Let's figure out when we are
     
    438438                $thismonth = ''.zeroise(intval(substr($m, 4, 2)), 2);
    439439    } else {
    440         $thisyear = gmdate('Y', current_time('timestamp') + get_settings('gmt_offset') * 3600);
    441         $thismonth = gmdate('m', current_time('timestamp') + get_settings('gmt_offset') * 3600);
     440        $thisyear = gmdate('Y', current_time('timestamp') + get_option('gmt_offset') * 3600);
     441        $thismonth = gmdate('m', current_time('timestamp') + get_option('gmt_offset') * 3600);
    442442    }
    443443
     
    559559        $newrow = false;
    560560
    561         if ( $day == gmdate('j', (time() + (get_settings('gmt_offset') * 3600))) && $thismonth == gmdate('m', time()+(get_settings('gmt_offset') * 3600)) && $thisyear == gmdate('Y', time()+(get_settings('gmt_offset') * 3600)) )
     561        if ( $day == gmdate('j', (time() + (get_option('gmt_offset') * 3600))) && $thismonth == gmdate('m', time()+(get_option('gmt_offset') * 3600)) && $thisyear == gmdate('Y', time()+(get_option('gmt_offset') * 3600)) )
    562562            echo '<td id="today">';
    563563        else
     
    614614        $the_date .= $before;
    615615        if ( $d=='' )
    616             $the_date .= mysql2date(get_settings('date_format'), $post->post_date);
     616            $the_date .= mysql2date(get_option('date_format'), $post->post_date);
    617617        else
    618618            $the_date .= mysql2date($d, $post->post_date);
     
    635635function get_the_modified_date($d = '') {
    636636    if ( '' == $d )
    637         $the_time = get_post_modified_time(get_settings('date_format'));
     637        $the_time = get_post_modified_time(get_option('date_format'));
    638638    else
    639639        $the_time = get_post_modified_time($d);
     
    649649function get_the_time( $d = '' ) {
    650650    if ( '' == $d )
    651         $the_time = get_post_time(get_settings('time_format'));
     651        $the_time = get_post_time(get_option('time_format'));
    652652    else
    653653        $the_time = get_post_time($d);
     
    675675function get_the_modified_time($d = '') {
    676676    if ( '' == $d )
    677         $the_time = get_post_modified_time(get_settings('time_format'));
     677        $the_time = get_post_modified_time(get_option('time_format'));
    678678    else
    679679        $the_time = get_post_modified_time($d);
     
    742742 */
    743743function the_editor($content, $id = 'content', $prev_id = 'title') {
    744     $rows = get_settings('default_post_edit_rows');
     744    $rows = get_option('default_post_edit_rows');
    745745    if (($rows < 3) || ($rows > 100))
    746746        $rows = 12;
Note: See TracChangeset for help on using the changeset viewer.