Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/wp-admin/includes/class-wp-comments-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ public function prepare_items() {
$comment_type = $_REQUEST['comment_type'];
}

$search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : '';
$search = $_REQUEST['s'] ?? '';

$post_type = ( isset( $_REQUEST['post_type'] ) ) ? sanitize_key( $_REQUEST['post_type'] ) : '';

$user_id = ( isset( $_REQUEST['user_id'] ) ) ? $_REQUEST['user_id'] : '';
$user_id = $_REQUEST['user_id'] ?? '';

$orderby = ( isset( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : '';
$order = ( isset( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : '';
$orderby = $_REQUEST['orderby'] ?? '';
$order = $_REQUEST['order'] ?? '';

$comments_per_page = $this->get_per_page( $comment_status );

Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/network/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';

$action = ( isset( $_GET['action'] ) ) ? $_GET['action'] : '';
$action = $_GET['action'] ?? '';

if ( empty( $action ) ) {
wp_redirect( network_admin_url() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ public static function get_setting( $key = 'all' ) {
$options = array_intersect_key( $options, $defaults );

if ( 'all' !== $key ) {
return isset( $options[ $key ] ) ? $options[ $key ] : false;
return $options[ $key ] ?? false;
}

return $options;
Expand Down
4 changes: 2 additions & 2 deletions src/wp-content/themes/twentyfourteen/inc/widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function enqueue_scripts() {
* @param array $instance An array of settings for this widget instance.
*/
public function widget( $args, $instance ) {
$format = isset( $instance['format'] ) ? $instance['format'] : '';
$format = $instance['format'] ?? '';

if ( ! $format || ! in_array( $format, $this->formats, true ) ) {
$format = 'aside';
Expand Down Expand Up @@ -289,7 +289,7 @@ public function update( $new_instance, $old_instance ) {
public function form( $instance ) {
$title = ! empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
$number = ! empty( $instance['number'] ) ? absint( $instance['number'] ) : 2;
$format = isset( $instance['format'] ) ? $instance['format'] : '';
$format = $instance['format'] ?? '';

if ( ! $format || ! in_array( $format, $this->formats, true ) ) {
$format = 'aside';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ function twenty_twenty_one_get_attachment_image_attributes( $attr, $attachment,
if ( $width && $height ) {

// Add style.
$attr['style'] = isset( $attr['style'] ) ? $attr['style'] : '';
$attr['style'] = $attr['style'] ?? '';
$attr['style'] = 'width:100%;height:' . round( 100 * $height / $width, 2 ) . '%;max-width:' . $width . 'px;' . $attr['style'];
}

Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-xmlrpc-server.php
Original file line number Diff line number Diff line change
Expand Up @@ -4448,7 +4448,7 @@ public function wp_getMediaLibrary( $args ) {
do_action( 'xmlrpc_call', 'wp.getMediaLibrary', $args, $this );

$parent_id = ( isset( $struct['parent_id'] ) ) ? absint( $struct['parent_id'] ) : '';
$mime_type = ( isset( $struct['mime_type'] ) ) ? $struct['mime_type'] : '';
$mime_type = $struct['mime_type'] ?? '';
$offset = ( isset( $struct['offset'] ) ) ? absint( $struct['offset'] ) : 0;
$number = ( isset( $struct['number'] ) ) ? absint( $struct['number'] ) : -1;

Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3351,7 +3351,7 @@ function wp_get_image_mime( $file ) {
$imagesize = @getimagesize( $file );
}

$mime = ( isset( $imagesize['mime'] ) ) ? $imagesize['mime'] : false;
$mime = $imagesize['mime'] ?? false;
} else {
$mime = false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/post-formats.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function get_post_format_string( $slug ) {
if ( ! $slug ) {
return $strings['standard'];
} else {
return ( isset( $strings[ $slug ] ) ) ? $strings[ $slug ] : '';
return $strings[ $slug ] ?? '';
}
}

Expand Down
Loading