| 1 |
<?php |
| 2 |
/** |
| 3 |
* This template contains info for a plugin. |
| 4 |
* |
| 5 |
* @version 1.0 |
| 6 |
* @package Friends |
| 7 |
*/ |
| 8 |
|
| 9 |
$api = $args['api']; |
| 10 |
$more_info_url = $api->more_info; |
| 11 |
|
| 12 |
?><div class="plugin-card plugin-card-<?php echo esc_attr( $api->slug ); ?>"> |
| 13 |
<div class="plugin-card-top"> |
| 14 |
<div class="name column-name"> |
| 15 |
<h3> |
| 16 |
<a class="thickbox open-plugin-details-modal" href="<?php echo esc_url( $more_info_url ); ?>"><?php echo esc_html( $api->name ); ?> <?php echo esc_html( $api->version ); ?></a> |
| 17 |
</h3> |
| 18 |
</div> |
| 19 |
|
| 20 |
<div class="desc column-description"> |
| 21 |
<p><?php echo esc_html( $api->short_description ); ?></p> |
| 22 |
<?php if ( isset( $api->comment ) ) : ?> |
| 23 |
<p> |
| 24 |
<strong><?php esc_html_e( 'Comment from the author of the Friends Plugin', 'friends' ); ?></strong><br/> |
| 25 |
<?php echo esc_html( $api->comment ); ?> |
| 26 |
</p> |
| 27 |
<?php endif; ?> |
| 28 |
<p class="authors"> |
| 29 |
<cite> |
| 30 |
<?php |
| 31 |
echo wp_kses( |
| 32 |
sprintf( |
| 33 |
// translators: %s is a plugin author. |
| 34 |
__( 'By %s' ), // phpcs:ignore WordPress.WP.I18n.MissingArgDomain |
| 35 |
$api->author |
| 36 |
), |
| 37 |
array( 'a' => array( 'href' => array() ) ) |
| 38 |
); |
| 39 |
?> |
| 40 |
</cite> |
| 41 |
</p> |
| 42 |
</div> |
| 43 |
</div> |
| 44 |
|
| 45 |
<div class="plugin-card-bottom"> |
| 46 |
<a class="<?php echo esc_attr( $args['button_classes'] ); ?>" data-slug="<?php echo esc_attr( $api->slug ); ?>" data-name="<?php echo esc_attr( $api->name ); ?>" href="<?php echo esc_url( $args['install_url'] ); ?>" aria-label="<?php echo /* translators: %1$s is a plugin name, %2$s is a plugin version. */ esc_html( sprintf( __( 'Install %1$s %2$s now', 'friends' ), $api->name, $api->version ) ); ?>"><?php echo esc_html( $args['button_text'] ); ?></a> |
| 47 |
|
| 48 |
<a class="button details thickbox open-plugin-details-modal" href="<?php echo esc_url( $more_info_url ); ?>" aria-label="<?php /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain */ echo /* translators: %s is a plugin name. */ esc_html( sprintf( __( 'More information about %s' ), $api->name ) ); ?>" data-title="<?php echo esc_attr( $api->name ); ?>"><?php esc_html_e( 'More Details' ); ?></a> |
| 49 |
|
| 50 |
<a class="button deactivate <?php echo esc_attr( $args['deactivate_button_class'] ); ?>" |
| 51 |
data-slug="<?php echo esc_attr( $api->slug ); ?>" |
| 52 |
data-name="<?php echo esc_attr( $api->name ); ?>" |
| 53 |
href="<?php echo esc_url( $args['install_url'] ); ?>"> |
| 54 |
<?php |
| 55 |
echo esc_html( |
| 56 |
sprintf( |
| 57 |
// translators: %s: Plugin name. |
| 58 |
_x( 'Deactivate %s', 'plugin' ), // phpcs:ignore WordPress.WP.I18n.MissingArgDomain |
| 59 |
$api->name |
| 60 |
) |
| 61 |
); |
| 62 |
?> |
| 63 |
</a> |
| 64 |
|
| 65 |
</div> |
| 66 |
</div> |
| 67 |
|