isDir() && ! $datpco_f->isLink() ) { rmdir( $datpco_f->getPathname() ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_rmdir -- xoá thư mục sao lưu của chính plugin } else { wp_delete_file( $datpco_f->getPathname() ); } } rmdir( $datpco_path ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_rmdir -- như trên } } // tên mới (1.6+) và tên cũ dpc_* nếu web chưa chạy bước chuyển dữ liệu foreach ( array( 'connection', 'backup_dir', 'backup_key', 'hardening', 'speed', 'health_last', 'scan_last', 'mu_ver', 'ec_mu' ) as $datpco_opt ) { delete_option( 'datpco_' . $datpco_opt ); delete_option( 'dpc_' . $datpco_opt ); } delete_option( 'datpco_version' ); // nonce lệnh đã dùng foreach ( array( 'datpco_nonce_', 'dpc_nonce_' ) as $datpco_like ) { $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s", $wpdb->esc_like( $datpco_like ) . '%' ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery -- dọn khi gỡ plugin }