diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index f05febb0fd..68dc685cf9 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -816,23 +816,27 @@ class WP_Media_List_Table extends WP_List_Table { ); } - $actions['copy'] = sprintf( - '', - esc_url( $attachment_url ), - /* translators: %s: Attachment title. */ - esc_attr( sprintf( __( 'Copy “%s” URL to clipboard' ), $att_title ) ), - __( 'Copy URL' ), - __( 'Copied!' ) - ); + if ( $attachment_url ) { + $actions['copy'] = sprintf( + '', + esc_url( $attachment_url ), + /* translators: %s: Attachment title. */ + esc_attr( sprintf( __( 'Copy “%s” URL to clipboard' ), $att_title ) ), + __( 'Copy URL' ), + __( 'Copied!' ) + ); + } } - $actions['download'] = sprintf( - '%s', - esc_url( $attachment_url ), - /* translators: %s: Attachment title. */ - esc_attr( sprintf( __( 'Download “%s”' ), $att_title ) ), - __( 'Download file' ) - ); + if ( $attachment_url ) { + $actions['download'] = sprintf( + '%s', + esc_url( $attachment_url ), + /* translators: %s: Attachment title. */ + esc_attr( sprintf( __( 'Download “%s”' ), $att_title ) ), + __( 'Download file' ) + ); + } if ( $this->detached && current_user_can( 'edit_post', $post->ID ) ) { $actions['attach'] = sprintf( diff --git a/wp-includes/version.php b/wp-includes/version.php index c862a131e0..e45b540c72 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-56071'; +$wp_version = '6.3-alpha-56072'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.