Skip to content

Commit c5f4cdc

Browse files
committed
Revert "Wrap blocked domains and keywords tables in collapsible details element"
This reverts commit 9db8790.
1 parent 9db8790 commit c5f4cdc

File tree

1 file changed

+24
-52
lines changed

1 file changed

+24
-52
lines changed

includes/wp-admin/class-settings-fields.php

Lines changed: 24 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -438,37 +438,23 @@ public static function render_moderation_section_description() {
438438
*/
439439
public static function render_site_blocked_domains_field() {
440440
$blocked_domains = Moderation::get_site_blocks()['domains'];
441-
$count = \count( $blocked_domains );
442441
?>
443442
<p class="description"><?php \esc_html_e( 'Block entire ActivityPub instances by domain name.', 'activitypub' ); ?></p>
444443

445444
<div class="activitypub-site-block-list">
446445
<?php if ( ! empty( $blocked_domains ) ) : ?>
447-
<details style="margin: 10px 0;">
448-
<summary style="cursor: pointer; padding: 8px 0; color: inherit;">
449-
<?php
450-
echo \esc_html(
451-
\sprintf(
452-
/* translators: %s: Number of blocked domains */
453-
\_n( '%s blocked domain', '%s blocked domains', $count, 'activitypub' ),
454-
\number_format_i18n( $count )
455-
)
456-
);
457-
?>
458-
</summary>
459-
<table class="widefat striped activitypub-site-blocked-domain" role="presentation" style="max-width: 500px; margin-top: 10px;">
460-
<?php foreach ( $blocked_domains as $domain ) : ?>
461-
<tr>
462-
<td><?php echo \esc_html( $domain ); ?></td>
463-
<td style="width: 80px;">
464-
<button type="button" class="button button-small remove-site-block-btn" data-type="domain" data-value="<?php echo \esc_attr( $domain ); ?>">
465-
<?php \esc_html_e( 'Remove', 'activitypub' ); ?>
466-
</button>
467-
</td>
468-
</tr>
469-
<?php endforeach; ?>
470-
</table>
471-
</details>
446+
<table class="widefat striped activitypub-site-blocked-domain" role="presentation" style="max-width: 500px; margin: 15px 0;">
447+
<?php foreach ( $blocked_domains as $domain ) : ?>
448+
<tr>
449+
<td><?php echo \esc_html( $domain ); ?></td>
450+
<td style="width: 80px;">
451+
<button type="button" class="button button-small remove-site-block-btn" data-type="domain" data-value="<?php echo \esc_attr( $domain ); ?>">
452+
<?php \esc_html_e( 'Remove', 'activitypub' ); ?>
453+
</button>
454+
</td>
455+
</tr>
456+
<?php endforeach; ?>
457+
</table>
472458
<?php endif; ?>
473459

474460
<div class="add-site-block-form" style="display: flex; max-width: 500px; gap: 8px;">
@@ -486,37 +472,23 @@ public static function render_site_blocked_domains_field() {
486472
*/
487473
public static function render_site_blocked_keywords_field() {
488474
$blocked_keywords = Moderation::get_site_blocks()['keywords'];
489-
$count = \count( $blocked_keywords );
490475
?>
491476
<p class="description"><?php \esc_html_e( 'Block ActivityPub content containing specific keywords.', 'activitypub' ); ?></p>
492477

493478
<div class="activitypub-site-block-list">
494479
<?php if ( ! empty( $blocked_keywords ) ) : ?>
495-
<details style="margin: 10px 0;">
496-
<summary style="cursor: pointer; padding: 8px 0; color: inherit;">
497-
<?php
498-
echo \esc_html(
499-
\sprintf(
500-
/* translators: %s: Number of blocked keywords */
501-
\_n( '%s blocked keyword', '%s blocked keywords', $count, 'activitypub' ),
502-
\number_format_i18n( $count )
503-
)
504-
);
505-
?>
506-
</summary>
507-
<table class="widefat striped activitypub-site-blocked-keyword" role="presentation" style="max-width: 500px; margin-top: 10px;">
508-
<?php foreach ( $blocked_keywords as $keyword ) : ?>
509-
<tr>
510-
<td><?php echo \esc_html( $keyword ); ?></td>
511-
<td style="width: 80px;">
512-
<button type="button" class="button button-small remove-site-block-btn" data-type="keyword" data-value="<?php echo \esc_attr( $keyword ); ?>">
513-
<?php \esc_html_e( 'Remove', 'activitypub' ); ?>
514-
</button>
515-
</td>
516-
</tr>
517-
<?php endforeach; ?>
518-
</table>
519-
</details>
480+
<table class="widefat striped activitypub-site-blocked-keyword" role="presentation" style="max-width: 500px; margin: 15px 0;">
481+
<?php foreach ( $blocked_keywords as $keyword ) : ?>
482+
<tr>
483+
<td><?php echo \esc_html( $keyword ); ?></td>
484+
<td style="width: 80px;">
485+
<button type="button" class="button button-small remove-site-block-btn" data-type="keyword" data-value="<?php echo \esc_attr( $keyword ); ?>">
486+
<?php \esc_html_e( 'Remove', 'activitypub' ); ?>
487+
</button>
488+
</td>
489+
</tr>
490+
<?php endforeach; ?>
491+
</table>
520492
<?php endif; ?>
521493

522494
<div class="add-site-block-form" style="display: flex; max-width: 500px; gap: 8px;">

0 commit comments

Comments
 (0)