mirror of
https://github.com/mainwp/mainwp-child.git
synced 2025-09-01 03:58:07 +08:00
Merge pull request #129 from mainwp/bogdan01-cf-autofix
Apply fixes from CodeFactor
This commit is contained in:
commit
caac8ef5ae
1 changed files with 4 additions and 4 deletions
|
@ -487,7 +487,7 @@ class MainWP_Client_Report {
|
|||
continue;
|
||||
}
|
||||
|
||||
$valid_context = false;
|
||||
$valid_context = false;
|
||||
// check context.
|
||||
if ( 'comments' == $context ) { // multi values.
|
||||
$comment_contexts = array( 'post', 'page' );
|
||||
|
@ -501,19 +501,19 @@ class MainWP_Client_Report {
|
|||
}
|
||||
$valid_context = true;
|
||||
} elseif ( 'menus' == $context ) {
|
||||
$valid_context = true; // ok, pass, don't check context.
|
||||
$valid_context = true; // ok, pass, don't check context.
|
||||
} elseif ( 'editor' == $record->connector ) {
|
||||
$valid_context = true; // ok, pass, checked above.
|
||||
} elseif ( 'media' == $connector && 'media' == $record->connector ) {
|
||||
$valid_context = true; // ok, pass, do not check context.
|
||||
} elseif ( 'widgets' == $connector && 'widgets' == $record->connector ) {
|
||||
$valid_context = true; // ok, pass, don't check context.
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! $valid_context || strtolower( $record->context ) !== $context ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// custom action value.
|
||||
if ( 'widgets' == $connector ) {
|
||||
if ( 'deleted' == $action ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue