Changeset 4144 for trunk/wp-includes/general-template.php
- Timestamp:
- 08/30/2006 09:46:31 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r4138 r4144 29 29 function wp_loginout() { 30 30 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>'; 34 34 35 35 echo apply_filters('loginout', $link); … … 40 40 41 41 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; 44 44 else 45 45 $link = ''; 46 46 } 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; 48 48 } 49 49 … … 76 76 case 'home' : 77 77 case 'siteurl' : 78 $output = get_ settings('home');78 $output = get_option('home'); 79 79 break; 80 80 case 'wpurl' : 81 $output = get_ settings('siteurl');81 $output = get_option('siteurl'); 82 82 break; 83 83 case 'description': 84 $output = get_ settings('blogdescription');84 $output = get_option('blogdescription'); 85 85 break; 86 86 case 'rdf_url': … … 100 100 break; 101 101 case 'pingback_url': 102 $output = get_ settings('siteurl') .'/xmlrpc.php';102 $output = get_option('siteurl') .'/xmlrpc.php'; 103 103 break; 104 104 case 'stylesheet_url': … … 113 113 break; 114 114 case 'admin_email': 115 $output = get_ settings('admin_email');115 $output = get_option('admin_email'); 116 116 break; 117 117 case 'charset': 118 $output = get_ settings('blog_charset');118 $output = get_option('blog_charset'); 119 119 if ('' == $output) $output = 'UTF-8'; 120 120 break; … … 128 128 case 'name': 129 129 default: 130 $output = get_ settings('blogname');130 $output = get_option('blogname'); 131 131 break; 132 132 } … … 310 310 311 311 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)); 319 319 320 320 if ( 'monthly' == $type ) { … … 359 359 } 360 360 } elseif ( 'weekly' == $type ) { 361 $start_of_week = get_ settings('start_of_week');361 $start_of_week = get_option('start_of_week'); 362 362 $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); 363 363 $arc_w_last = ''; … … 367 367 $arc_year = $arcresult->yr; 368 368 $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')); 370 370 $arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']); 371 371 $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, '&', '=', $arcresult->week);372 $url = sprintf('%s/%s%sm%s%s%sw%s%d', get_option('home'), '', '?', '=', $arc_year, '&', '=', $arcresult->week); 373 373 $text = $arc_week_start . $archive_week_separator . $arc_week_end; 374 374 echo get_archives_link($url, $text, $format, $before, $after); … … 417 417 418 418 // 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)); 422 422 423 423 // Let's figure out when we are … … 438 438 $thismonth = ''.zeroise(intval(substr($m, 4, 2)), 2); 439 439 } 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); 442 442 } 443 443 … … 559 559 $newrow = false; 560 560 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)) ) 562 562 echo '<td id="today">'; 563 563 else … … 614 614 $the_date .= $before; 615 615 if ( $d=='' ) 616 $the_date .= mysql2date(get_ settings('date_format'), $post->post_date);616 $the_date .= mysql2date(get_option('date_format'), $post->post_date); 617 617 else 618 618 $the_date .= mysql2date($d, $post->post_date); … … 635 635 function get_the_modified_date($d = '') { 636 636 if ( '' == $d ) 637 $the_time = get_post_modified_time(get_ settings('date_format'));637 $the_time = get_post_modified_time(get_option('date_format')); 638 638 else 639 639 $the_time = get_post_modified_time($d); … … 649 649 function get_the_time( $d = '' ) { 650 650 if ( '' == $d ) 651 $the_time = get_post_time(get_ settings('time_format'));651 $the_time = get_post_time(get_option('time_format')); 652 652 else 653 653 $the_time = get_post_time($d); … … 675 675 function get_the_modified_time($d = '') { 676 676 if ( '' == $d ) 677 $the_time = get_post_modified_time(get_ settings('time_format'));677 $the_time = get_post_modified_time(get_option('time_format')); 678 678 else 679 679 $the_time = get_post_modified_time($d); … … 742 742 */ 743 743 function the_editor($content, $id = 'content', $prev_id = 'title') { 744 $rows = get_ settings('default_post_edit_rows');744 $rows = get_option('default_post_edit_rows'); 745 745 if (($rows < 3) || ($rows > 100)) 746 746 $rows = 12;
Note: See TracChangeset
for help on using the changeset viewer.