[CodeFactor] Apply fixes to commit 64931ea

[ci skip] [skip ci]
This commit is contained in:
codefactor-io 2020-05-21 17:04:31 +00:00
parent 64931ea48a
commit 445ab15a45
2 changed files with 2 additions and 2 deletions

View file

@ -996,7 +996,7 @@ class MainWP_Child_Posts {
}
}
}
private function post_plus_update_categories( $new_post_id, $post_custom ) {
$random_category = isset( $post_custom['_saved_draft_random_category'] ) ? $post_custom['_saved_draft_random_category'] : false;
$random_category = is_array( $random_category ) ? current( $random_category ) : null;

View file

@ -121,7 +121,7 @@ class MainWP_Clone {
}
$branding_opts = MainWP_Child_Branding::instance()->get_branding_options();
$hide_restore = isset( $branding_opts['remove_restore'] ) && $branding_opts['remove_restore'] ? true : false;
$hide_restore = isset( $branding_opts['remove_restore'] ) && $branding_opts['remove_restore'] ? true : false;
if ( ! $hide_restore ) {
if ( '' == session_id() ) {
session_start();