mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 14:47:02 +00:00
Remove unnecessary ternary operators such as (expr) ? true : false.
git-svn-id: https://develop.svn.wordpress.org/trunk@13769 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+2
-2
@@ -412,7 +412,7 @@ EOD;
|
||||
array_push($post_category, $cat->term_id);
|
||||
}
|
||||
|
||||
$publish = (isset($entry->draft) && trim($entry->draft) == 'yes') ? false : true;
|
||||
$publish = ! ( isset( $entry->draft ) && 'yes' == trim( $entry->draft ) );
|
||||
|
||||
$cap = ($publish) ? 'publish_posts' : 'edit_posts';
|
||||
|
||||
@@ -505,7 +505,7 @@ EOD;
|
||||
if ( !current_user_can('edit_post', $entry['ID']) )
|
||||
$this->auth_required(__('Sorry, you do not have the right to edit this post.'));
|
||||
|
||||
$publish = (isset($parsed->draft) && trim($parsed->draft) == 'yes') ? false : true;
|
||||
$publish = ! ( isset($parsed->draft) && 'yes' == trim($parsed->draft) );
|
||||
$post_status = ($publish) ? 'publish' : 'draft';
|
||||
|
||||
extract($entry);
|
||||
|
||||
Reference in New Issue
Block a user