Changeset 47122 for trunk/src/wp-includes/deprecated.php
- Timestamp:
- 01/29/2020 12:43:23 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/deprecated.php (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/deprecated.php
r47088 r47122 271 271 _deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' ); 272 272 273 // right now if one can edit, one can delete273 // Right now if one can edit, one can delete. 274 274 return user_can_edit_post($user_id, $post_id, $blog_id); 275 275 } … … 328 328 _deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' ); 329 329 330 // right now if one can edit a post, one can edit comments made on it330 // Right now if one can edit a post, one can edit comments made on it. 331 331 return user_can_edit_post($user_id, $post_id, $blog_id); 332 332 } … … 347 347 _deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' ); 348 348 349 // right now if one can edit comments, one can delete comments349 // Right now if one can edit comments, one can delete comments. 350 350 return user_can_edit_post_comments($user_id, $post_id, $blog_id); 351 351 } … … 932 932 } 933 933 934 if ( $category == -1 ) // get_bookmarks uses '' to signify all categories934 if ( $category == -1 ) // get_bookmarks() uses '' to signify all categories. 935 935 $category = ''; 936 936 … … 977 977 if ( strpos($row->link_image, 'http') !== false ) 978 978 $output .= "<img src=\"$row->link_image\" $alt $title />"; 979 else // If it's a relative path 979 else // If it's a relative path. 980 980 $output .= "<img src=\"" . get_option('siteurl') . "$row->link_image\" $alt $title />"; 981 981 } else { … … 996 996 997 997 $output .= "$after\n"; 998 } // end while998 } // End while. 999 999 1000 1000 if ( !$echo ) … … 1020 1020 $order = strtolower($order); 1021 1021 1022 // Handle link category sorting 1022 // Handle link category sorting. 1023 1023 $direction = 'ASC'; 1024 1024 if ( '_' == substr($order,0,1) ) { … … 1032 1032 $cats = get_categories(array('type' => 'link', 'orderby' => $order, 'order' => $direction, 'hierarchical' => 0)); 1033 1033 1034 // Display each category 1034 // Display each category. 1035 1035 if ( $cats ) { 1036 1036 foreach ( (array) $cats as $cat ) { 1037 1037 // Handle each category. 1038 1038 1039 // Display the category name 1039 // Display the category name. 1040 1040 echo ' <li id="linkcat-' . $cat->term_id . '" class="linkcat"><h2>' . apply_filters('link_category', $cat->name ) . "</h2>\n\t<ul>\n"; 1041 // Call get_links() with all the appropriate params 1041 // Call get_links() with all the appropriate params. 1042 1042 get_links($cat->term_id, '<li>', "</li>", "\n", true, 'name', false); 1043 1043 1044 // Close the last category 1044 // Close the last category. 1045 1045 echo "\n\t</ul>\n</li>\n"; 1046 1046 } … … 1255 1255 1256 1256 $chain = ''; 1257 /** TODO: consult hierarchy */1257 /** TODO: Consult hierarchy */ 1258 1258 $cat_ids = get_all_category_ids(); 1259 1259 foreach ( (array) $cat_ids as $cat_id ) { … … 1878 1878 1879 1879 if ( !$fullsize && $src = wp_get_attachment_thumb_url( $post->ID ) ) { 1880 // We have a thumbnail desired, specified and existing 1880 // We have a thumbnail desired, specified and existing. 1881 1881 1882 1882 $src_file = wp_basename($src); 1883 1883 } elseif ( wp_attachment_is_image( $post->ID ) ) { 1884 // We have an image without a thumbnail 1884 // We have an image without a thumbnail. 1885 1885 1886 1886 $src = wp_get_attachment_url( $post->ID ); … … 2114 2114 function register_sidebar_widget($name, $output_callback, $classname = '', ...$params) { 2115 2115 _deprecated_function( __FUNCTION__, '2.8.0', 'wp_register_sidebar_widget()' ); 2116 // Compat 2116 // Compat. 2117 2117 if ( is_array( $name ) ) { 2118 2118 if ( count( $name ) === 3 ) { … … 2168 2168 function register_widget_control($name, $control_callback, $width = '', $height = '', ...$params) { 2169 2169 _deprecated_function( __FUNCTION__, '2.8.0', 'wp_register_widget_control()' ); 2170 // Compat 2170 // Compat. 2171 2171 if ( is_array( $name ) ) { 2172 2172 if ( count( $name ) === 3 ) { … … 2272 2272 $meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key); 2273 2273 $user = wp_cache_get($user_id, 'users'); 2274 // Check the cached user object 2274 // Check the cached user object. 2275 2275 if ( false !== $user && isset($user->$meta_key) ) 2276 2276 $metas = array($user->$meta_key); … … 2395 2395 add_theme_support( 'automatic-feed-links' ); 2396 2396 else 2397 remove_action( 'wp_head', 'feed_links_extra', 3 ); // Just do this yourself in 3.0+ 2397 remove_action( 'wp_head', 'feed_links_extra', 3 ); // Just do this yourself in 3.0+. 2398 2398 } 2399 2399 … … 2671 2671 2672 2672 $posts = get_boundary_post($in_same_cat, $excluded_categories, $start); 2673 // If there is no post stop.2673 // If there is no post, stop. 2674 2674 if ( empty($posts) ) 2675 2675 return; 2676 2676 2677 // Even though we limited get_posts to return only 1 item it still returns an array of objects.2677 // Even though we limited get_posts() to return only 1 item it still returns an array of objects. 2678 2678 $post = $posts[0]; 2679 2679 … … 3597 3597 3598 3598 if ( !empty($output) ) 3599 $output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // convert only < > &3599 $output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // Convert only '< > &'. 3600 3600 3601 3601 /** … … 3674 3674 return $headers; 3675 3675 3676 // GET request - write it to the supplied filename 3676 // GET request - write it to the supplied filename. 3677 3677 $out_fp = fopen($file_path, 'w'); 3678 3678 if ( !$out_fp )
Note: See TracChangeset
for help on using the changeset viewer.