mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 23:57:41 +02:00
Coding Standards: Use strict comparison in wp-admin/includes/class-wp-media-list-table.php
.
Includes minor code layout fixes for better readability. See #52627. Built from https://develop.svn.wordpress.org/trunk@50770 git-svn-id: http://core.svn.wordpress.org/trunk@50379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0cbb526928
commit
596b9ed6ce
@ -648,12 +648,14 @@ class WP_Media_List_Table extends WP_List_Table {
|
|||||||
|
|
||||||
while ( have_posts() ) :
|
while ( have_posts() ) :
|
||||||
the_post();
|
the_post();
|
||||||
|
|
||||||
if ( $this->is_trash && 'trash' !== $post->post_status
|
if ( $this->is_trash && 'trash' !== $post->post_status
|
||||||
|| ! $this->is_trash && 'trash' === $post->post_status
|
|| ! $this->is_trash && 'trash' === $post->post_status
|
||||||
) {
|
) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$post_owner = ( get_current_user_id() == $post->post_author ) ? 'self' : 'other';
|
|
||||||
|
$post_owner = ( get_current_user_id() === (int) $post->post_author ) ? 'self' : 'other';
|
||||||
?>
|
?>
|
||||||
<tr id="post-<?php echo $post->ID; ?>" class="<?php echo trim( ' author-' . $post_owner . ' status-' . $post->post_status ); ?>">
|
<tr id="post-<?php echo $post->ID; ?>" class="<?php echo trim( ' author-' . $post_owner . ' status-' . $post->post_status ); ?>">
|
||||||
<?php $this->single_row_columns( $post ); ?>
|
<?php $this->single_row_columns( $post ); ?>
|
||||||
@ -691,6 +693,7 @@ class WP_Media_List_Table extends WP_List_Table {
|
|||||||
__( 'Edit' )
|
__( 'Edit' )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( current_user_can( 'delete_post', $post->ID ) ) {
|
if ( current_user_can( 'delete_post', $post->ID ) ) {
|
||||||
if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
|
if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
|
||||||
$actions['trash'] = sprintf(
|
$actions['trash'] = sprintf(
|
||||||
@ -712,6 +715,7 @@ class WP_Media_List_Table extends WP_List_Table {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$actions['view'] = sprintf(
|
$actions['view'] = sprintf(
|
||||||
'<a href="%s" aria-label="%s" rel="bookmark">%s</a>',
|
'<a href="%s" aria-label="%s" rel="bookmark">%s</a>',
|
||||||
get_permalink( $post->ID ),
|
get_permalink( $post->ID ),
|
||||||
@ -739,6 +743,7 @@ class WP_Media_List_Table extends WP_List_Table {
|
|||||||
__( 'Edit' )
|
__( 'Edit' )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( current_user_can( 'delete_post', $post->ID ) ) {
|
if ( current_user_can( 'delete_post', $post->ID ) ) {
|
||||||
if ( $this->is_trash ) {
|
if ( $this->is_trash ) {
|
||||||
$actions['untrash'] = sprintf(
|
$actions['untrash'] = sprintf(
|
||||||
@ -757,6 +762,7 @@ class WP_Media_List_Table extends WP_List_Table {
|
|||||||
_x( 'Trash', 'verb' )
|
_x( 'Trash', 'verb' )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $this->is_trash || ! EMPTY_TRASH_DAYS || ! MEDIA_TRASH ) {
|
if ( $this->is_trash || ! EMPTY_TRASH_DAYS || ! MEDIA_TRASH ) {
|
||||||
$delete_ays = ( ! $this->is_trash && ! MEDIA_TRASH ) ? " onclick='return showNotice.warn();'" : '';
|
$delete_ays = ( ! $this->is_trash && ! MEDIA_TRASH ) ? " onclick='return showNotice.warn();'" : '';
|
||||||
$actions['delete'] = sprintf(
|
$actions['delete'] = sprintf(
|
||||||
@ -769,6 +775,7 @@ class WP_Media_List_Table extends WP_List_Table {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! $this->is_trash ) {
|
if ( ! $this->is_trash ) {
|
||||||
$actions['view'] = sprintf(
|
$actions['view'] = sprintf(
|
||||||
'<a href="%s" aria-label="%s" rel="bookmark">%s</a>',
|
'<a href="%s" aria-label="%s" rel="bookmark">%s</a>',
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.8-alpha-50769';
|
$wp_version = '5.8-alpha-50770';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user