| 1 |
<?php |
| 2 |
/** |
| 3 |
* Outputs a Plugin Card. |
| 4 |
* |
| 5 |
* @package WPZinc\Shared |
| 6 |
* @author WP Zinc |
| 7 |
*/ |
| 8 |
|
| 9 |
// Exit if accessed directly. |
| 10 |
if ( ! defined( 'ABSPATH' ) ) { |
| 11 |
exit; |
| 12 |
} |
| 13 |
?> |
| 14 |
<div class="plugin-card"> |
| 15 |
<div class="plugin-card-top"> |
| 16 |
<div class="name column-name"> |
| 17 |
<h3> |
| 18 |
<a href="<?php echo esc_url( $product['url'] ); ?>" target="_blank"> |
| 19 |
<?php echo esc_html( $product['name'] ); ?> |
| 20 |
<img src="<?php echo esc_url( $product['icon'] ); ?>" class="plugin-icon" alt=""> |
| 21 |
</a> |
| 22 |
</h3> |
| 23 |
</div> |
| 24 |
<div class="desc column-description"> |
| 25 |
<p><?php echo esc_html( $product['description'] ); ?></p> |
| 26 |
</div> |
| 27 |
</div> |
| 28 |
|
| 29 |
<div class="plugin-card-bottom"> |
| 30 |
<div class="vers column-rating"> |
| 31 |
<?php esc_html_e( 'from', 'wp-to-buffer' ); ?> $<?php echo esc_html( $product['price'] ); ?>/<?php esc_html_e( 'year', 'wp-to-buffer' ); ?> |
| 32 |
</div> |
| 33 |
<div class="column-updated"> |
| 34 |
<?php |
| 35 |
if ( array_key_exists( 'install_url', $product ) && ! empty( $product['install_url'] ) ) { |
| 36 |
?> |
| 37 |
<a href="<?php echo esc_url( $product['install_url'] ); ?>" class="button button-primary" target="_blank"><?php esc_html_e( 'Install', 'wp-to-buffer' ); ?></a> |
| 38 |
<?php |
| 39 |
} |
| 40 |
?> |
| 41 |
<a href="<?php echo esc_url( $product['url'] ); ?>" class="button button-secondary" target="_blank"><?php esc_html_e( 'Learn More', 'wp-to-buffer' ); ?></a> |
| 42 |
</div> |
| 43 |
</div> |
| 44 |
</div> |