callouts
1 year ago
upgrade
2 years ago
widgets
2 years ago
components-admin.php
2 years ago
help-addons-row.php
2 years ago
help-addons.php
2 years ago
help.php
2 years ago
postbox-header.php
2 years ago
settings-reset.php
9 months ago
settings-settings.php
11 months ago
settings-tools.php
2 years ago
settings.php
2 years ago
setup-add.php
11 months ago
setup-edit.php
2 years ago
shortcode.php
2 years ago
view.php
2 years ago
help-addons-row.php
64 lines
| 1 | <?php |
| 2 | // Don't load directly. |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | die( '-1' ); |
| 5 | } |
| 6 | |
| 7 | /** |
| 8 | * @var array $addon |
| 9 | */ |
| 10 | |
| 11 | $first_link = null; |
| 12 | |
| 13 | foreach ( $addon['links'] as $link ) { |
| 14 | if ( __( 'Download', 'pods' ) === $link['label'] ) { |
| 15 | continue; |
| 16 | } |
| 17 | |
| 18 | $first_link = $link['url']; |
| 19 | break; |
| 20 | } |
| 21 | |
| 22 | $first_host = pods_host_from_url( $first_link ); |
| 23 | ?> |
| 24 | |
| 25 | <tr> |
| 26 | <td> |
| 27 | <a href="<?php echo esc_url( $first_link ); ?>" target="_blank" rel="noopener noreferrer" |
| 28 | title="<?php echo esc_attr( sprintf( __( 'View Plugin on %s', 'pods' ), $first_host ) ); /* translators: %s is the domain host. */ ?>"> |
| 29 | <img width="50" height="50" src="<?php echo esc_url( $addon['icon'] ); ?>" |
| 30 | class="attachment-thumbnail size-thumbnail" alt="<?php echo esc_attr( $addon['label'] ); ?>" loading="lazy" /> |
| 31 | </a> |
| 32 | </td> |
| 33 | <td> |
| 34 | <a href="<?php echo esc_url( $first_link ); ?>" target="_blank" rel="noopener noreferrer" |
| 35 | title="<?php echo esc_attr( sprintf( __( 'View Plugin on %s', 'pods' ), $first_host ) ); /* translators: %s is the domain host. */ ?>"> |
| 36 | <?php echo esc_html( $addon['label'] ); ?> |
| 37 | </a> |
| 38 | |
| 39 | <?php if ( ! empty( $addon['description'] ) ) : ?> |
| 40 | <p><?php echo esc_html( $addon['description'] ); ?></p> |
| 41 | <?php endif; ?> |
| 42 | </td> |
| 43 | <td> |
| 44 | <?php |
| 45 | $addon_links = []; |
| 46 | |
| 47 | foreach ( $addon['links'] as $link ) { |
| 48 | if ( empty( $link['title'] ) ) { |
| 49 | $link['title'] = $link['label']; |
| 50 | } |
| 51 | |
| 52 | $addon_links[] = sprintf( |
| 53 | '<a href="%1$s" title="%2$s" target="_blank" rel="noopener noreferrer">%3$s</a>', |
| 54 | esc_url( $link['url'] ), |
| 55 | esc_attr( $link['title'] ), |
| 56 | esc_html( $link['label'] ) |
| 57 | ); |
| 58 | } |
| 59 | |
| 60 | echo implode( ' | ', $addon_links ); |
| 61 | ?> |
| 62 | </td> |
| 63 | </tr> |
| 64 |