| 1 |
<?php |
| 2 |
/** |
| 3 |
* Admin View: Displaying loop single related theme. |
| 4 |
* |
| 5 |
* @author ThimPress |
| 6 |
* @package LearnPress/Views |
| 7 |
* @version 3.0.0 |
| 8 |
*/ |
| 9 |
|
| 10 |
defined( 'ABSPATH' ) || exit(); |
| 11 |
?> |
| 12 |
|
| 13 |
<li class="plugin-card-learnpress" id="learn-press-theme-<?php echo esc_attr( $theme['id'] ); ?>"> |
| 14 |
<div class="plugin-card-top"> |
| 15 |
<div class="image-thumbnail"> |
| 16 |
<a href="<?php echo esc_url_raw( $theme['url'] ); ?>"> |
| 17 |
<img src="<?php echo esc_url_raw( $theme['previews']['landscape_preview']['landscape_url'] ); ?>" alt="<?php echo esc_attr( $theme['name'] ); ?>"> |
| 18 |
</a> |
| 19 |
</div> |
| 20 |
|
| 21 |
<div class="theme-content"> |
| 22 |
<h2 class="theme-title"> |
| 23 |
<a class="item-title" href="<?php echo esc_url_raw( $theme['url'] ); ?>"> |
| 24 |
<?php echo wp_kses_post( $theme['name'] ); ?> |
| 25 |
</a> |
| 26 |
</h2> |
| 27 |
<div class="theme-detail"> |
| 28 |
<div class="theme-price"> |
| 29 |
<?php echo sprintf( '$%s', $theme['price_cents'] / 100 ); ?> |
| 30 |
</div> |
| 31 |
<div class="number-sale"> |
| 32 |
<?php echo sprintf( '%s %s', $theme['number_of_sales'], esc_html__( ' sales', 'learnpress' ) ); ?> |
| 33 |
</div> |
| 34 |
</div> |
| 35 |
|
| 36 |
<div class="theme-description"> |
| 37 |
<?php |
| 38 |
$description = preg_replace( '~[\r\n]+~', '', $theme['description'] ); |
| 39 |
$description = preg_replace( '~\s+~', ' ', $description ); |
| 40 |
echo wp_kses_post( $description ); |
| 41 |
?> |
| 42 |
</div> |
| 43 |
<div class="theme-footer"> |
| 44 |
<?php $demo_url = isset( $theme['attributes'][4] ) ? $theme['attributes'][4]['value'] : $theme['url']; ?> |
| 45 |
<a class="button button-primary" href="<?php echo esc_url_raw( $theme['url'] ); ?>"><?php echo esc_html__( 'Get it now', 'learnpress' ); ?></a> |
| 46 |
<a class="button" href="<?php echo esc_url_raw( $demo_url ); ?>"><?php esc_html_e( 'View Demo', 'learnpress' ); ?></a> |
| 47 |
<div class="theme-rating"> |
| 48 |
<span> |
| 49 |
<?php |
| 50 |
wp_star_rating( |
| 51 |
array( |
| 52 |
'rating' => $theme['rating']['rating'], |
| 53 |
'type' => 'rating', |
| 54 |
'number' => $theme['rating']['count'], |
| 55 |
) |
| 56 |
); |
| 57 |
?> |
| 58 |
</span> |
| 59 |
<span class="count-rating">(<?php echo esc_html( $theme['rating']['count'] ); ?>)</span> |
| 60 |
</div> |
| 61 |
</div> |
| 62 |
</div> |
| 63 |
</div> |
| 64 |
</li> |
| 65 |
|