WordPress.org

Make WordPress Core

Ticket #17609: 17609.2.diff

File 17609.2.diff, 1.9 KB (added by theaussiepea, 9 months ago)
  • wp-admin/edit-form-advanced.php

    diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php
    index 6130252..2ea9e42 100644
    a b wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); 
    364364</div> 
    365365<div class="inside"> 
    366366<?php 
    367 $sample_permalink_html = $post_type_object->public ? get_sample_permalink_html($post->ID) : ''; 
     367$sample_permalink_html = $post_type_object->publicly_queryable ? get_sample_permalink_html($post->ID) : ''; 
    368368$shortlink = wp_get_shortlink($post->ID, 'post'); 
    369369if ( !empty($shortlink) ) 
    370370    $sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr($shortlink) . '" /><a href="#" class="button button-small" onclick="prompt(&#39;URL:&#39;, jQuery(\'#shortlink\').val()); return false;">' . __('Get Shortlink') . '</a>'; 
  • wp-admin/includes/class-wp-posts-list-table.php

    diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php
    index a798a2c..d752f0b 100644
    a b class WP_Posts_List_Table extends WP_List_Table { 
    593593                                        if ( 'trash' == $post->post_status || !EMPTY_TRASH_DAYS ) 
    594594                                                $actions['delete'] = "<a class='submitdelete' title='" . esc_attr( __( 'Delete this item permanently' ) ) . "' href='" . get_delete_post_link( $post->ID, '', true ) . "'>" . __( 'Delete Permanently' ) . "</a>"; 
    595595                                } 
    596                                 if ( $post_type_object->public ) { 
     596                                if ( $post_type_object->publicly_queryable ) { 
    597597                                        if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) { 
    598598                                                if ( $can_edit_post ) 
    599599                                                        $actions['view'] = '<a href="' . esc_url( apply_filters( 'preview_post_link', set_url_scheme( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ) ) . '" title="' . esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;' ), $title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>';