X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/baca9ce86a38dc54c4574890ee2d352fd81f78b2..61343b82c4f0da4c68e4c6373daafff4a81efdd1:/wp-includes/deprecated.php diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index 655316a0..d86709a7 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -394,7 +394,7 @@ function user_can_edit_user($user_id, $other_user) { * @param string $cat_name Optional. The category name to use. If no match is found uses all. * @param string $before Optional. The html to output before the link. * @param string $after Optional. The html to output after the link. - * @param string $between Optional. The html to output between the link/image and it's description. Not used if no image or $show_images is true. + * @param string $between Optional. The html to output between the link/image and its description. Not used if no image or $show_images is true. * @param bool $show_images Optional. Whether to show images (if defined). * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url', 'description' or 'rating'. Or maybe owner. * If you start the name with an underscore the order will be reversed. You can also specify 'rand' as the order which will return links in a @@ -547,7 +547,7 @@ function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) { * @param string $cat_name The category name to use. If no match is found uses all * @param string $before The html to output before the link * @param string $after The html to output after the link - * @param string $between The html to output between the link/image and it's description. Not used if no image or show_images is true + * @param string $between The html to output between the link/image and its description. Not used if no image or show_images is true * @param bool $show_images Whether to show images (if defined). * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url', * 'description', or 'rating'. Or maybe owner. If you start the name with an @@ -575,7 +575,7 @@ function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = * @param int $category The category to use. If no category supplied uses all * @param string $before The html to output before the link * @param string $after The html to output after the link - * @param string $between The html to output between the link/image and it's description. Not used if no image or show_images == true + * @param string $between The html to output between the link/image and its description. Not used if no image or show_images == true * @param bool $show_images Whether to show images (if defined). * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', * 'description', or 'rating'. Or maybe owner. If you start the name with an @@ -794,12 +794,12 @@ function get_archives($type='', $limit='', $format='html', $before = '', $after * @deprecated Use get_author_posts_url() * @see get_author_posts_url() * - * @param bool $echo Optional. - * @param int $author_id Required. + * @param bool $echo + * @param int $author_id * @param string $author_nicename Optional. * @return string|null */ -function get_author_link($echo = false, $author_id, $author_nicename = '') { +function get_author_link($echo, $author_id, $author_nicename = '') { _deprecated_function( __FUNCTION__, '2.1', 'get_author_posts_url()' ); $link = get_author_posts_url($author_id, $author_nicename); @@ -1087,18 +1087,6 @@ function get_links_list($order = 'name') { */ function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) { _deprecated_function( __FUNCTION__, '2.1' ); - - if ( $count ) - $counts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->links"); - - $javascript = ""; - $javascript .= $text; - - if ( $count ) - $javascript .= " ($counts)"; - - $javascript .= "\n\n"; - echo $javascript; } /** @@ -1691,8 +1679,6 @@ function the_author_ID() { * @subpackage Feed * @since 0.71 * @uses apply_filters() Calls 'the_content_rss' on the content before processing. - * @see get_the_content() For the $more_link_text, $stripteaser, and $more_file - * parameters. * * @deprecated 2.9.0 * @deprecated Use the_content_feed() @@ -1706,7 +1692,7 @@ function the_author_ID() { */ function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) { _deprecated_function( __FUNCTION__, '2.9', 'the_content_feed' ); - $content = get_the_content($more_link_text, $stripteaser, $more_file); + $content = get_the_content($more_link_text, $stripteaser); $content = apply_filters('the_content_rss', $content); if ( $cut && !$encode_html ) $encode_html = 2; @@ -3335,7 +3321,7 @@ function _save_post_hook() {} * * @since 2.9.0 * @deprecated 3.5.0 - * see wp_image_editor_supports() + * @see wp_image_editor_supports() * * @param string $mime_type * @return bool @@ -3364,3 +3350,31 @@ function gd_edit_image_support($mime_type) { } return false; } + +/** + * Converts an integer byte value to a shorthand byte value. + * + * @since 2.3.0 + * @deprecated 3.6.0 + * @deprecated Use size_format() + * + * @param int $bytes An integer byte value. + * @return string A shorthand byte value. + */ +function wp_convert_bytes_to_hr( $bytes ) { + _deprecated_function( __FUNCTION__, '3.6', 'size_format()' ); + + $units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB', 4 => 'TB' ); + $log = log( $bytes, 1024 ); + $power = (int) $log; + $size = pow( 1024, $log - $power ); + + if ( ! is_nan( $size ) && array_key_exists( $power, $units ) ) { + $unit = $units[ $power ]; + } else { + $size = $bytes; + $unit = $units[0]; + } + + return $size . $unit; +}