description.php
63 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @var FS_Plugin $plugin |
| 4 | */ |
| 5 | $plugin = $VARS['plugin']; |
| 6 | |
| 7 | if ( ! empty( $plugin->info->selling_point_0 ) || |
| 8 | ! empty( $plugin->info->selling_point_1 ) || |
| 9 | ! empty( $plugin->info->selling_point_2 ) |
| 10 | ) : ?> |
| 11 | <div class="fs-selling-points"> |
| 12 | <ul> |
| 13 | <?php for ( $i = 0; $i < 3; $i ++ ) : ?> |
| 14 | <?php if ( ! empty( $plugin->info->{'selling_point_' . $i} ) ) : ?> |
| 15 | <li><i class="dashicons dashicons-yes"></i> |
| 16 | |
| 17 | <h3><?php echo $plugin->info->{'selling_point_' . $i} ?></h3></li> |
| 18 | <?php endif ?> |
| 19 | <?php endfor ?> |
| 20 | </ul> |
| 21 | </div> |
| 22 | <?php endif ?> |
| 23 | <div> |
| 24 | <?php |
| 25 | echo wp_kses( $plugin->info->description, array( |
| 26 | 'a' => array( 'href' => array(), 'title' => array(), 'target' => array() ), |
| 27 | 'b' => array(), |
| 28 | 'i' => array(), |
| 29 | 'p' => array(), |
| 30 | 'blockquote' => array(), |
| 31 | 'h2' => array(), |
| 32 | 'h3' => array(), |
| 33 | 'ul' => array(), |
| 34 | 'ol' => array(), |
| 35 | 'li' => array() |
| 36 | ) ); |
| 37 | ?> |
| 38 | </div> |
| 39 | <?php if ( ! empty( $plugin->info->screenshots ) ) : ?> |
| 40 | <?php $screenshots = $plugin->info->screenshots ?> |
| 41 | <div class="fs-screenshots clearfix"> |
| 42 | <h2><?php _efs( 'screenshots' ) ?></h2> |
| 43 | <ul> |
| 44 | <?php $i = 0; |
| 45 | foreach ( $screenshots as $s => $url ) : ?> |
| 46 | <?php |
| 47 | // Relative URLs are replaced with WordPress.org base URL |
| 48 | // therefore we need to set absolute URLs. |
| 49 | $url = 'http' . ( WP_FS__IS_HTTPS ? 's' : '' ) . ':' . $url; ?> |
| 50 | <li class="<?php echo ( 0 === $i % 2 ) ? 'odd' : 'even' ?>"> |
| 51 | <style> |
| 52 | #section-description .fs-screenshots .fs-screenshot-<?php echo $i ?> |
| 53 | { |
| 54 | background-image: url('<?php echo $url ?>'); |
| 55 | } |
| 56 | </style> |
| 57 | <a href="<?php echo $url ?>" title="<?php printf( __fs( 'view-full-size-x' ), $i ) ?>" |
| 58 | class="fs-screenshot-<?php echo $i ?>"></a> |
| 59 | </li> |
| 60 | <?php $i ++; endforeach ?> |
| 61 | </ul> |
| 62 | </div> |
| 63 | <?php endif ?> |