Make WordPress Core


Ignore:
Timestamp:
09/14/2009 02:06:33 AM (17 years ago)
Author:
azaozz
Message:

Explain that the permalink is temporary for autosave generated permalinks, fixes #7733

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r11925 r11928  
    921921 * @return unknown
    922922 */
    923 function get_sample_permalink($id, $title=null, $name = null) {
     923function get_sample_permalink($id, $title = null, $name = null) {
    924924        $post = &get_post($id);
    925925        if (!$post->ID) {
    … …  
    982982        $post = &get_post($id);
    983983        list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug);
    984         if ( 'publish' == $post->post_status )
     984
     985        if ( 'publish' == $post->post_status ) {
    985986                $view_post = 'post' == $post->post_type ? __('View Post') : __('View Page');
     987                $title = __('Click to edit this part of the permalink');
     988        } else {
     989                $title = __('Temporary permalink. Click to edit this part.');
     990        }
    986991
    987992        if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) {
    … …  
    9971002        }
    9981003
    999         $title = __('Click to edit this part of the permalink');
    1000         if (function_exists('mb_strlen')) {
    1001                 if (mb_strlen($post_name) > 30) {
     1004        if ( function_exists('mb_strlen') ) {
     1005                if ( mb_strlen($post_name) > 30 ) {
    10021006                        $post_name_abridged = mb_substr($post_name, 0, 14). '…' . mb_substr($post_name, -14);
    10031007                } else {
    … …  
    10051009                }
    10061010        } else {
    1007                 if (strlen($post_name) > 30) {
     1011                if ( strlen($post_name) > 30 ) {
    10081012                        $post_name_abridged = substr($post_name, 0, 14). '…' . substr($post_name, -14);
    10091013                } else {
Note: See TracChangeset for help on using the changeset viewer.