This commit is contained in:
Javier Casares 2026-08-17 16:04:38 +00:00
commit 30451228f7
4 changed files with 50 additions and 4 deletions

View file

@ -132,6 +132,7 @@ $compat_warnings = 0;
$raw_desc = $entry['description'] ?? '';
$raw_rwp = $entry['requires_wp'] ?? '';
$raw_rphp = $entry['requires_php'] ?? '';
$raw_icon = $entry['icon_url'] ?? '';
$slug = is_string( $raw_slug ) ? $raw_slug : '';
$name = is_string( $raw_name ) ? $raw_name : $slug;
@ -143,6 +144,7 @@ $compat_warnings = 0;
$desc = is_string( $raw_desc ) ? trim( $raw_desc ) : '';
$req_wp = is_string( $raw_rwp ) ? $raw_rwp : '';
$req_php = is_string( $raw_rphp ) ? $raw_rphp : '';
$icon_url = is_string( $raw_icon ) ? esc_url_raw( $raw_icon ) : '';
$website_url = '' !== $page_url ? $page_url : $homepage;
$has_detail = ( '' !== $website_url || '' !== $desc );
@ -184,6 +186,11 @@ $compat_warnings = 0;
?>
<tr class="<?php echo esc_attr( ltrim( $row_class ) ); ?>">
<td class="robotstxt-manager-name-cell">
<?php if ( '' !== $icon_url ) : ?>
<img class="robotstxt-manager-plugin-icon" src="<?php echo esc_url( $icon_url ); ?>" alt="" width="64" height="64" loading="lazy" />
<?php else : ?>
<span class="robotstxt-manager-plugin-icon robotstxt-manager-plugin-icon--placeholder" aria-hidden="true"></span>
<?php endif; ?>
<strong><?php echo esc_html( $name ); ?></strong>
</td>
<td><?php echo '' !== $remote_v ? esc_html( $remote_v ) : '&mdash;'; ?></td>
@ -382,4 +389,20 @@ $compat_warnings = 0;
/* Detail rows (always open): muted, attached to the row above. */
.robotstxt-manager-detail-row td { border-top: none !important; padding-top: 0; }
.robotstxt-manager-detail-description { color: #50575e; }
/* Plugin icons: 64x64, 1:1, beside the name. */
.robotstxt-manager-plugin-icon {
display: inline-block;
vertical-align: middle;
width: 64px;
height: 64px;
margin-right: 10px;
border-radius: 4px;
object-fit: contain;
background: #fff;
}
.robotstxt-manager-plugin-icon--placeholder {
border: 1px solid #dcdcde;
box-sizing: border-box;
}
</style>