mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
Remove redundant isset() and empty() checks.
git-svn-id: https://develop.svn.wordpress.org/trunk@13770 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2078,7 +2078,7 @@ function wp_insert_post($postarr = array(), $wp_error = false) {
|
||||
|
||||
// Create a valid post name. Drafts and pending posts are allowed to have an empty
|
||||
// post name.
|
||||
if ( !isset($post_name) || empty($post_name) ) {
|
||||
if ( empty($post_name) ) {
|
||||
if ( !in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) )
|
||||
$post_name = sanitize_title($post_title);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user