WordPress.org

Make WordPress Core

Ticket #17609: 17609.patch

File 17609.patch, 551 bytes (added by tyxla, 5 years ago)

If the post type is not publicly queryable, display the "Post Updated" / "Page Updated" message instead of the ones with "View" links.

  • src/wp-admin/post.php

     
    6262                        $message = 'draft' == $status ? 10 : 1;
    6363                }
    6464
     65                if( ! $post_type_object->publicly_queryable ) {
     66                        $message = 4;
     67                }
     68
    6569                $location = add_query_arg( 'message', $message, get_edit_post_link( $post_id, 'url' ) );
    6670        } elseif ( isset($_POST['addmeta']) && $_POST['addmeta'] ) {
    6771                $location = add_query_arg( 'message', 2, wp_get_referer() );