WordPress.org

Make WordPress Core

Changeset 6581


Ignore:
Timestamp:
01/09/08 11:21:27 (8 years ago)
Author:
matt
Message:

Redirect to edit page with posted blurb as default.

Location:
trunk/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit.php

    r6476 r6581  
    1414?> 
    1515 
     16<?php 
     17if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?> 
     18<div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View post'); ?></a> | <a href="post.php?action=edit&amp;post=<?php echo $_GET['posted']; ?>"><?php _e('Edit post'); ?></a></p></div> 
     19<?php 
     20endif; 
     21?> 
     22 
    1623<div class="wrap"> 
    1724 
    1825<?php 
    19  
    2026$posts_columns = wp_manage_posts_columns(); 
    2127 
  • trunk/wp-admin/post-new.php

    r6579 r6581  
    2323} 
    2424 
    25 if ( isset($_GET['posted']) && $_GET['posted'] ) : ?> 
     25if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?> 
    2626<div id="message" class="updated fade"><p><strong><?php _e('Post saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View post &raquo;'); ?></a></p></div> 
    2727<?php 
  • trunk/wp-admin/post.php

    r6579 r6581  
    1313case 'postajaxpost': 
    1414case 'post': 
    15     $parent_file = 'post-new.php'; 
    16     $submenu_file = 'post-new.php'; 
    1715    check_admin_referer('add-post'); 
    1816 
     
    2018 
    2119    // Redirect. 
    22     if (!empty($_POST['mode'])) { 
     20    if ( !empty( $_POST['mode'] ) ) { 
    2321    switch($_POST['mode']) { 
    2422        case 'bookmarklet': 
     
    3634    } 
    3735 
    38     if ( isset($_POST['save']) ) 
     36    if ( isset( $_POST['save'] ) ) 
    3937        $location = "post.php?action=edit&post=$post_ID"; 
    4038 
    41     if ( empty($post_ID) ) 
     39    if ( empty( $post_ID ) ) 
    4240        $location = 'post-new.php'; 
    4341 
    44     wp_redirect($location); 
     42    wp_redirect( $location ); 
    4543    exit(); 
    4644    break; 
     
    140138            $location = 'attachments.php'; 
    141139        } else { 
    142             $location = 'post-new.php'; 
     140            $location = 'edit.php?posted=' . $post_ID; 
    143141        } 
    144142    } 
Note: See TracChangeset for help on using the changeset viewer.