Ticket #10758: 10758-admin-post.patch
File 10758-admin-post.patch, 2.0 KB (added by , 15 years ago) |
---|
-
wp-admin/includes/post.php
915 915 * 916 916 * @since unknown 917 917 * 918 * @param unknown_type $id919 * @param unknown_type $title920 * @param unknown_type $name921 * @return unknown918 * @param int|object $id Post ID or post object. 919 * @param string $title (optional) Title 920 * @param string $name (optional) Name 921 * @return array With two entries of type string 922 922 */ 923 923 function get_sample_permalink($id, $title=null, $name = null) { 924 924 $post = &get_post($id); … … 941 941 // If the user wants to set a new name -- override the current one 942 942 // Note: if empty name is supplied -- use the title instead, see #6072 943 943 if (!is_null($name)) { 944 $post->post_name = sanitize_title($name ? $name : $title, $post->ID);944 $post->post_name = sanitize_title($name ? $name : $title, $post->ID); 945 945 } 946 946 947 947 $post->filter = 'sample'; … … 969 969 } 970 970 971 971 /** 972 * {@internal Missing Short Description}}972 * sample permalink html 973 973 * 974 974 * @since unknown 975 975 * 976 * @param unknown_type $id977 * @param unknown_type $new_title978 * @param unknown_type $new_slug979 * @return unknown976 * @param int|object $id Post ID or post object. 977 * @param string $new_title (optional) New title 978 * @param string $new_slug (optional) New slug 979 * @return string intended to be used for the inplace editor of the permalink post slug on in the post (and page?) editor. 980 980 */ 981 function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { 981 function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { 982 982 $post = &get_post($id); 983 list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug); 983 list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug); 984 984 if ( 'publish' == $post->post_status ) 985 985 $view_post = 'post' == $post->post_type ? __('View Post') : __('View Page'); 986 986