Changeset 4144 for trunk/wp-includes/functions.php
- Timestamp:
- 08/30/2006 09:46:31 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/functions.php (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r4127 r4144 46 46 case 'mysql': 47 47 if ( $gmt ) $d = gmdate('Y-m-d H:i:s'); 48 else $d = gmdate('Y-m-d H:i:s', (time() + (get_ settings('gmt_offset') * 3600)));48 else $d = gmdate('Y-m-d H:i:s', (time() + (get_option('gmt_offset') * 3600))); 49 49 return $d; 50 50 break; 51 51 case 'timestamp': 52 52 if ( $gmt ) $d = time(); 53 else $d = time() + (get_ settings('gmt_offset') * 3600);53 else $d = time() + (get_option('gmt_offset') * 3600); 54 54 return $d; 55 55 break; … … 89 89 $i = 86400; 90 90 91 if ( $weekday < get_ settings('start_of_week') )92 $weekday = 7 - (get_ settings('start_of_week') - $weekday);93 94 while ($weekday > get_ settings('start_of_week')) {91 if ( $weekday < get_option('start_of_week') ) 92 $weekday = 7 - (get_option('start_of_week') - $weekday); 93 94 while ($weekday > get_option('start_of_week')) { 95 95 $weekday = date('w',$day); 96 if ( $weekday < get_ settings('start_of_week') )97 $weekday = 7 - (get_ settings('start_of_week') - $weekday);96 if ( $weekday < get_option('start_of_week') ) 97 $weekday = 7 - (get_option('start_of_week') - $weekday); 98 98 99 99 $day = $day - 86400; … … 108 108 function get_lastpostdate($timezone = 'server') { 109 109 global $cache_lastpostdate, $pagenow, $wpdb; 110 $add_seconds_blog = get_ settings('gmt_offset') * 3600;110 $add_seconds_blog = get_option('gmt_offset') * 3600; 111 111 $add_seconds_server = date('Z'); 112 112 if ( !isset($cache_lastpostdate[$timezone]) ) { … … 131 131 function get_lastpostmodified($timezone = 'server') { 132 132 global $cache_lastpostmodified, $pagenow, $wpdb; 133 $add_seconds_blog = get_ settings('gmt_offset') * 3600;133 $add_seconds_blog = get_option('gmt_offset') * 3600; 134 134 $add_seconds_server = date('Z'); 135 135 if ( !isset($cache_lastpostmodified[$timezone]) ) { … … 165 165 /* Options functions */ 166 166 167 function get_ settings($setting) {167 function get_option($setting) { 168 168 global $wpdb; 169 169 … … 187 187 // If home is not set use siteurl. 188 188 if ( 'home' == $setting && '' == $value ) 189 return get_ settings('siteurl');189 return get_option('siteurl'); 190 190 191 191 if ( 'siteurl' == $setting || 'home' == $setting || 'category_base' == $setting ) … … 193 193 194 194 return apply_filters( 'option_' . $setting, maybe_unserialize($value) ); 195 }196 197 function get_option($option) {198 return get_settings($option);199 195 } 200 196 … … 291 287 292 288 function gzip_compression() { 293 if ( !get_ settings('gzipcompression') ) return false;289 if ( !get_option('gzipcompression') ) return false; 294 290 295 291 if ( extension_loaded('zlib') ) { … … 325 321 $link_text = $matches[4][$i]; 326 322 $content = str_replace($link_match, $link_text.' '.$link_number, $content); 327 $link_url = ((strtolower(substr($link_url,0,7)) != 'http://') && (strtolower(substr($link_url,0,8)) != 'https://')) ? get_ settings('home') . $link_url : $link_url;323 $link_url = ((strtolower(substr($link_url,0,7)) != 'http://') && (strtolower(substr($link_url,0,8)) != 'https://')) ? get_option('home') . $link_url : $link_url; 328 324 $links_summary .= "\n".$link_number.' '.$link_url; 329 325 } … … 882 878 // Returns an array containing the current upload directory's path and url, or an error message. 883 879 function wp_upload_dir() { 884 $siteurl = get_ settings('siteurl');880 $siteurl = get_option('siteurl'); 885 881 //prepend ABSPATH to $dir and $siteurl to $url if they're not already there 886 $path = str_replace(ABSPATH, '', trim(get_ settings('upload_path')));882 $path = str_replace(ABSPATH, '', trim(get_option('upload_path'))); 887 883 $dir = ABSPATH . $path; 888 884 $url = trailingslashit($siteurl) . $path; … … 897 893 } 898 894 899 if ( get_ settings('uploads_use_yearmonth_folders')) {895 if ( get_option('uploads_use_yearmonth_folders')) { 900 896 // Generate the yearly and monthly dirs 901 897 $time = current_time( 'mysql' ); … … 1102 1098 global $pagenow, $menu, $submenu, $parent_file, $submenu_file; 1103 1099 1104 $adminurl = get_ settings('siteurl') . '/wp-admin';1100 $adminurl = get_option('siteurl') . '/wp-admin'; 1105 1101 if ( wp_get_referer() ) 1106 1102 $adminurl = wp_get_referer(); … … 1177 1173 </head> 1178 1174 <body> 1179 <h1 id="logo"><img alt="WordPress" src="<?php echo get_ settings('siteurl'); ?>/wp-admin/images/wordpress-logo.png" /></h1>1175 <h1 id="logo"><img alt="WordPress" src="<?php echo get_option('siteurl'); ?>/wp-admin/images/wordpress-logo.png" /></h1> 1180 1176 <p><?php echo $message; ?></p> 1181 1177 </body>
Note: See TracChangeset
for help on using the changeset viewer.