fix(2meet-data-optimizer): stop false alarms in doctor, term-comment-diagnose and bridge-status
- doctor: entity flat tables come from the registry (TMDO_CLI::check_entity_tables()) instead of a hard-coded user list naming the never-registered sso group, which failed doctor on every site; it also reports Promotion Guard violations and the recorded drift status per entity (report_guard_and_drift()). - term-comment-diagnose: filter status comes from each filter's is_enabled() (the garbage filter and misc bucket default to off but were shown enabled); a filter whose add-on is not active shows "not installed". - bridge-status: flat_rows counts rows holding a value (wp_core keeps an all-NULL row per post: 15306% on dev36) and eav_ids of a post-type group counts only its post types. - Tests: the WP_CLI stubs record their output in $GLOBALS['_wp_cli_output']. - Verify: DoctorTest, CliFilterStatusTest, CliBridgeStatusTest (RED before); dev36 doctor exit 1 → 0, wp_core 15306% → 100%. - PR: PR-076
This commit is contained in:
@@ -517,10 +517,12 @@ if ( ! function_exists( 'wp_insert_comment' ) ) {
|
||||
|
||||
if ( ! class_exists( 'WP_CLI' ) ) {
|
||||
class WP_CLI {
|
||||
public static function log( string $msg ): void {}
|
||||
public static function warning( string $msg ): void {}
|
||||
public static function success( string $msg ): void {}
|
||||
public static function error( string $msg ): void {}
|
||||
// Output is kept in $GLOBALS['_wp_cli_output'] so CLI tests can assert it.
|
||||
public static function log( string $msg ): void { $GLOBALS['_wp_cli_output'][] = $msg; }
|
||||
public static function line( string $msg = '' ): void { $GLOBALS['_wp_cli_output'][] = $msg; }
|
||||
public static function warning( string $msg ): void { $GLOBALS['_wp_cli_output'][] = 'Warning: ' . $msg; }
|
||||
public static function success( string $msg ): void { $GLOBALS['_wp_cli_output'][] = 'Success: ' . $msg; }
|
||||
public static function error( string $msg ): void { $GLOBALS['_wp_cli_output'][] = 'Error: ' . $msg; }
|
||||
public static function add_command( string $name, $class ): void {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user