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:
Andrew Nacin
2010-03-19 21:15:00 +00:00
parent 2bcc218df8
commit ddc506f01c
14 changed files with 22 additions and 25 deletions
+2 -2
View File
@@ -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);