Fix plugin grid layout, add More Details links, and improve Go Pro button styling

This commit is contained in:
Marcus Quinn
2025-03-16 04:40:39 +00:00
parent 0985f31014
commit 3429700e2b
2 changed files with 47 additions and 1 deletions

View File

@ -10,6 +10,14 @@
margin: 0;
}
/* Filter Bar */
#wpa-plugin-filters.wp-filter {
margin-left: 0;
margin-right: 0;
width: 100%;
box-sizing: border-box;
}
/* Plugin Cards */
.plugin-card {
width: calc(50% - 16px);
@ -347,6 +355,41 @@
margin-top: 0;
}
/* Pro Buttons */
.go-pro-button {
background: #ff8c00;
border-color: #ff7b00;
color: #fff;
box-shadow: 0 1px 0 #ff7b00;
text-shadow: 0 -1px 1px #ff7b00, 1px 0 1px #ff7b00, 0 1px 1px #ff7b00, -1px 0 1px #ff7b00;
}
.go-pro-button:hover,
.go-pro-button:focus {
background: #ff9d1c;
border-color: #ff7b00;
color: #fff;
}
/* More Details Link */
.more-details {
display: inline-block;
margin-top: 5px;
text-decoration: none;
color: #2271b1;
}
.more-details:hover,
.more-details:focus {
color: #135e96;
text-decoration: underline;
}
.plugin-action-buttons .more-details {
display: block;
text-align: right;
}
/* Responsive Adjustments */
@media only screen and (max-width: 1120px) {
.plugin-card {

View File

@ -347,10 +347,13 @@ function wp_allstars_generate_plugin_cards($plugins) {
$pro_plugins = wp_allstars_get_pro_plugins_config();
foreach ($pro_plugins as $pro_plugin) {
if (isset($pro_plugin['free_slug']) && $pro_plugin['free_slug'] === $plugin->slug) {
echo '<li><a class="button button-primary" href="' . esc_url($pro_plugin['url']) . '" target="_blank">' . esc_html__('Go Pro', 'wp-allstars') . '</a></li>';
echo '<li><a class="button go-pro-button" href="' . esc_url($pro_plugin['url']) . '" target="_blank">' . esc_html__('Go Pro', 'wp-allstars') . '</a></li>';
break;
}
}
// Add "More Details" link
echo '<li><a class="more-details" href="' . esc_url(admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin->slug . '&TB_iframe=true&width=600&height=550')) . '" class="thickbox open-plugin-details-modal" aria-label="' . esc_attr(sprintf(__('More information about %s'), $plugin->name)) . '">' . __('More Details') . '</a></li>';
?>
</ul>
</div>