equal
deleted
inserted
replaced
33 $post_id = isset( $post_id ) ? (int) $post_id : 0; |
33 $post_id = isset( $post_id ) ? (int) $post_id : 0; |
34 |
34 |
35 // Require an ID for the edit screen. |
35 // Require an ID for the edit screen. |
36 if ( isset( $action ) && 'edit' === $action && ! $ID ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName |
36 if ( isset( $action ) && 'edit' === $action && ! $ID ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName |
37 wp_die( |
37 wp_die( |
38 '<h1>' . __( 'Something went wrong.' ) . '</h1>' . |
38 '<h1>' . __( 'An error occurred during the upload process.' ) . '</h1>' . |
39 '<p>' . __( 'Invalid item ID.' ) . '</p>', |
39 '<p>' . __( 'Invalid item ID. You can view all media items in the <a href="upload.php">Media Library</a>.' ) . '</p>', |
40 403 |
40 403 |
41 ); |
41 ); |
42 } |
42 } |
43 |
43 |
44 if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post', $_REQUEST['post_id'] ) ) { |
44 if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post', $_REQUEST['post_id'] ) ) { |