| 1 |
<?php |
| 2 |
// Grid should never be null. Construct just allows easy access to WPUPG_Grid functions in IDE. |
| 3 |
if( is_null( $grid ) ) $grid = new WPUPG_Grid(0); |
| 4 |
$premium_only = WPUltimatePostGrid::is_premium_active() ? '' : ' (' . __( 'Premium only', 'wp-ultimate-post-grid' ) . ')'; |
| 5 |
?> |
| 6 |
|
| 7 |
<input type="hidden" name="wpupg_nonce" value="<?php echo wp_create_nonce( 'grid' ); ?>" /> |
| 8 |
<table id="wpupg_form_general" class="wpupg_form"> |
| 9 |
<tr> |
| 10 |
<td><label for="wpupg_type"><?php _e( 'Type', 'wp-ultimate-post-grid' ); ?></label></td> |
| 11 |
<td> |
| 12 |
<select name="wpupg_type" id="wpupg_type" class="wpupg-select2"> |
| 13 |
<?php |
| 14 |
$grid_type_options = array( |
| 15 |
'posts' => __( 'Grid of Posts or Pages', 'wp-ultimate-post-grid' ), |
| 16 |
'terms' => __( 'Grid of Category or Taxonomy Terms', 'wp-ultimate-post-grid' ) . $premium_only, |
| 17 |
); |
| 18 |
|
| 19 |
foreach( $grid_type_options as $grid_type => $grid_type_name ) { |
| 20 |
$selected = $grid_type == $grid->type() ? ' selected="selected"' : ''; |
| 21 |
echo '<option value="' . esc_attr( $grid_type ) . '"' . $selected . '>' . $grid_type_name . '</option>'; |
| 22 |
} |
| 23 |
?> |
| 24 |
</select> |
| 25 |
</td> |
| 26 |
<td><?php _e( 'Type of grid to use.', 'wp-ultimate-post-grid' ); ?></td> |
| 27 |
</tr> |
| 28 |
</table> |