Make WordPress Core

Ticket #45247: 45247.2.diff

File 45247.2.diff, 1.5 KB (added by noisysocks, 7 years ago)
  • src/wp-admin/includes/class-wp-posts-list-table.php

     
    12371237                                esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ),
    12381238                                __( 'Edit' )
    12391239                        );
    1240                         $actions['inline hide-if-no-js'] = sprintf(
    1241                                 '<a href="#" class="editinline" aria-label="%s">%s</a>',
    1242                                 /* translators: %s: post title */
    1243                                 esc_attr( sprintf( __( 'Quick edit &#8220;%s&#8221; inline' ), $title ) ),
    1244                                 __( 'Quick&nbsp;Edit' )
    1245                         );
     1240
     1241                        if ( 'wp_block' !== $post->post_type ) {
     1242                                $actions['inline hide-if-no-js'] = sprintf(
     1243                                        '<a href="#" class="editinline" aria-label="%s">%s</a>',
     1244                                        /* translators: %s: post title */
     1245                                        esc_attr( sprintf( __( 'Quick edit &#8220;%s&#8221; inline' ), $title ) ),
     1246                                        __( 'Quick&nbsp;Edit' )
     1247                                );
     1248                        }
    12461249                }
    12471250
    12481251                if ( current_user_can( 'delete_post', $post->ID ) ) {
     
    12971300                        }
    12981301                }
    12991302
     1303                if ( 'wp_block' === $post->post_type ) {
     1304                        $actions['export'] = sprintf(
     1305                                '<button type="button" class="wp-list-reusable-blocks__export button-link" data-id="%s" aria-label="%s">%s</button>',
     1306                                $post->ID,
     1307                                esc_attr(
     1308                                        sprintf(
     1309                                                /* translators: %s: post title */
     1310                                                __( 'Export &#8220;%s&#8221; as JSON', 'gutenberg' ),
     1311                                                $title
     1312                                        )
     1313                                ),
     1314                                __( 'Export as JSON', 'gutenberg' )
     1315                        );
     1316                }
     1317
    13001318                if ( is_post_type_hierarchical( $post->post_type ) ) {
    13011319
    13021320                        /**