Changeset 6726 for trunk/wp-includes/functions.php
- Timestamp:
- 02/05/2008 06:47:27 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r6669 r6726 554 554 else 555 555 $request_type = 'HEAD'; 556 556 557 557 $head = "$request_type $file HTTP/1.1\r\nHOST: $host\r\nUser-Agent: WordPress/" . $wp_version . "\r\n\r\n"; 558 558 … … 580 580 return wp_get_http( $headers['location'], $file_path, ++$red ); 581 581 } 582 582 583 583 // make a note of the final location, so the caller can tell if we were redirected or not 584 584 $headers['x-final-location'] = $url; … … 589 589 return $headers; 590 590 } 591 591 592 592 // GET request - fetch and write it to the supplied filename 593 593 $content_length = $headers['content-length']; … … 602 602 break; 603 603 } 604 604 605 605 fclose($out_fp); 606 606 fclose($fp); … … 948 948 global $wpdb; 949 949 950 // Check cache first. If options table goes away and we have true cached, oh well. 950 // Check cache first. If options table goes away and we have true cached, oh well. 951 951 if ( wp_cache_get('is_blog_installed') ) 952 952 return true; … … 995 995 if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) 996 996 return $_REQUEST['_wp_http_referer']; 997 else if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) 997 else if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) 998 998 return $_SERVER['HTTP_REFERER']; 999 999 return false; … … 1069 1069 // return a filename that is sanitized and unique for the given directory 1070 1070 function wp_unique_filename( $dir, $filename, $unique_filename_callback = NULL ) { 1071 1071 1072 1072 // separate the filename into a name and extension 1073 1073 $info = pathinfo($filename); 1074 1074 $ext = $info['extension']; 1075 1075 $name = basename($filename, ".{$ext}"); 1076 1076 1077 1077 // Increment the file number until we have a unique file to save in $dir. Use $override['unique_filename_callback'] if supplied. 1078 1078 if ( $unique_filename_callback && function_exists( $unique_filename_callback ) ) { … … 1096 1096 $filename = sanitize_title_with_dashes( $filename ) . $ext; 1097 1097 } 1098 1098 1099 1099 return $filename; 1100 1100 } … … 1112 1112 if ( $upload['error'] !== false ) 1113 1113 return $upload; 1114 1114 1115 1115 $filename = wp_unique_filename( $upload['path'], $name ); 1116 1116 … … 1226 1226 $trans['delete']['bookmark'] = array( __( 'Are you sure you want to delete this link: "%s"?' ), 'use_id' ); 1227 1227 $trans['update']['bookmark'] = array( __( 'Are you sure you want to edit this link: "%s"?' ), 'use_id' ); 1228 $trans['bulk']['bookmarks'] = array( __( 'Are you sure you want to bulk modify links?' ), false ); 1228 $trans['bulk']['bookmarks'] = array( __( 'Are you sure you want to bulk modify links?' ), false ); 1229 1229 1230 1230 $trans['add']['page'] = array( __( 'Are you sure you want to add this page?' ), false ); … … 1323 1323 } 1324 1324 1325 if ( defined( 'WP_SITEURL' ) && '' != WP_SITEURL ) 1326 $admin_dir = WP_SITEURL . '/wp-admin/'; 1325 if ( defined( 'WP_SITEURL' ) && '' != WP_SITEURL ) 1326 $admin_dir = WP_SITEURL . '/wp-admin/'; 1327 1327 elseif ( function_exists( 'get_bloginfo' ) && '' != get_bloginfo( 'wpurl' ) ) 1328 $admin_dir = get_bloginfo( 'wpurl' ) . '/wp-admin/'; 1328 $admin_dir = get_bloginfo( 'wpurl' ) . '/wp-admin/'; 1329 1329 elseif ( strpos( $_SERVER['PHP_SELF'], 'wp-admin' ) !== false ) 1330 1330 $admin_dir = ''; … … 1556 1556 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 1557 1557 <title>Database Error</title> 1558 1558 1559 1559 </head> 1560 1560 <body> … … 1613 1613 * _deprecated_function() - Marks a function as deprecated and informs when it has been used. 1614 1614 * 1615 * There is a hook deprecated_function_run that will be called that can be used to get the backtrace 1615 * There is a hook deprecated_function_run that will be called that can be used to get the backtrace 1616 1616 * up to what file and function called the deprecated function. 1617 1617 * 1618 1618 * The current behavior is to trigger an user error if WP_DEBUG is defined and is true. 1619 * 1619 * 1620 1620 * This function is to be used in every function in depreceated.php 1621 1621 * … … 1648 1648 * _deprecated_file() - Marks a file as deprecated and informs when it has been used. 1649 1649 * 1650 * There is a hook deprecated_file_included that will be called that can be used to get the backtrace 1650 * There is a hook deprecated_file_included that will be called that can be used to get the backtrace 1651 1651 * up to what file and function included the deprecated file. 1652 1652 * 1653 1653 * The current behavior is to trigger an user error if WP_DEBUG is defined and is true. 1654 * 1654 * 1655 1655 * This function is to be used in every file that is depreceated 1656 1656 *
Note: See TracChangeset
for help on using the changeset viewer.