Skip to content

Commit 8ef5ec4

Browse files
dkmytanateweller
authored andcommitted
Protect: Update Scan History extension types (#40548)
1 parent 319fce1 commit 8ef5ec4

File tree

3 files changed

+4
-32
lines changed

3 files changed

+4
-32
lines changed

projects/plugins/protect/src/class-scan-history.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ private static function normalize_api_data( $scan_data ) {
219219
}
220220

221221
foreach ( $scan_data->threats as $source_threat ) {
222+
if ( ! empty( $source_threat->extension ) && in_array( $source_threat->extension->type, array( 'plugin', 'theme' ), true ) ) {
223+
$source_threat->extension->type .= 's';
224+
}
225+
222226
$history->threats[] = new Threat_Model( $source_threat );
223227
}
224228

projects/plugins/protect/src/js/routes/firewall/firewall-footer.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ const ShareData = () => {
6969
<div className={ styles[ 'share-data' ] }>
7070
<Title mb={ 0 }>{ __( 'Share data with Jetpack', 'jetpack-protect' ) }</Title>
7171
<ToggleControl
72-
className={ styles[ 'share-data-toggle' ] }
7372
checked={ !! jetpackWafShareData }
7473
onChange={ handleShareDataChange }
7574
disabled={ isUpdating }
@@ -81,7 +80,6 @@ const ShareData = () => {
8180
) }
8281
/>
8382
<ToggleControl
84-
className={ styles[ 'share-data-toggle' ] }
8583
checked={ !! jetpackWafShareDebugData }
8684
onChange={ handleShareDebugDataChange }
8785
disabled={ isUpdating }

projects/plugins/protect/src/js/routes/firewall/styles.module.scss

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -171,36 +171,6 @@
171171
white-space: nowrap;
172172
}
173173

174-
@media ( max-width: 1115px ) {
175-
.stat-card-wrapper {
176-
margin-top: calc( var( --spacing-base ) * 3 ); // 24px
177-
}
178-
}
179-
180-
@media ( max-width: 599px ) {
181-
.stat-card-wrapper {
182-
margin-top: calc( var( --spacing-base ) * 3 ); // 24px
183-
184-
>:first-child {
185-
margin-right: 0;
186-
margin-bottom: var( --spacing-base ); // 8px
187-
}
188-
}
189-
190-
.stat-card-icon {
191-
margin-bottom: 0;
192-
}
193-
}
194-
195-
.share-data-section {
196-
display: flex;
197-
198-
.share-data-toggle {
199-
margin-top: calc( var( --spacing-base ) / 2 ); // 4px
200-
margin-right: var( --spacing-base ); // 8px
201-
}
202-
}
203-
204174
.icon-tooltip {
205175
max-height: 20px;
206176
margin-left: calc( var( --spacing-base ) / 2 ); // 4px

0 commit comments

Comments
 (0)