| 1 |
<?php |
| 2 |
$premium_only = WPUltimatePostGrid::is_premium_active() ? '' : ' (' . __( 'Premium only', 'wp-ultimate-post-grid' ) . ')'; |
| 3 |
?> |
| 4 |
|
| 5 |
<input type="hidden" name="wpupg_nonce" value="<?php echo wp_create_nonce( 'grid' ); ?>" /> |
| 6 |
<table id="wpupg_form_post" class="wpupg_form"> |
| 7 |
<tr> |
| 8 |
<td><label for="wpupg_custom_link"><?php _e( 'Custom Link', 'wp-ultimate-post-grid' ); ?></label></td> |
| 9 |
<td> |
| 10 |
<input type="text" name="wpupg_custom_link" id="wpupg_custom_link" value="<?php echo esc_attr( get_post_meta( $post->ID, 'wpupg_custom_link', true ) ); ?>"/> |
| 11 |
</td> |
| 12 |
<td><?php _e( 'Override the default link for this post.', 'wp-ultimate-post-grid' ); ?></td> |
| 13 |
</tr> |
| 14 |
<tr> |
| 15 |
<td><label for="wpugpg_"><?php _e( 'Custom Link Behaviour', 'wp-ultimate-post-grid' ); ?></label></td> |
| 16 |
<td> |
| 17 |
<select name="wpupg_custom_link_behaviour" id="wpupg_custom_link_behaviour"> |
| 18 |
<?php |
| 19 |
$custom_link_behaviour_options = array( |
| 20 |
'default' => __( 'Use grid default', 'wp-ultimate-post-grid' ), |
| 21 |
'_self' => __( 'Open in same tab', 'wp-ultimate-post-grid' ), |
| 22 |
'_blank' => __( 'Open in new tab', 'wp-ultimate-post-grid' ), |
| 23 |
'none' => __( "Don't use links", 'wp-ultimate-post-grid' ), |
| 24 |
); |
| 25 |
|
| 26 |
foreach( $custom_link_behaviour_options as $custom_link_behaviour => $custom_link_behaviour_name ) { |
| 27 |
$selected = $custom_link_behaviour == get_post_meta( $post->ID, 'wpupg_custom_link_behaviour', true ) ? ' selected="selected"' : ''; |
| 28 |
echo '<option value="' . esc_attr( $custom_link_behaviour ) . '"' . $selected . '>' . $custom_link_behaviour_name . '</option>'; |
| 29 |
} |
| 30 |
?> |
| 31 |
</select> |
| 32 |
</td> |
| 33 |
<td><?php _e( 'Override the link behaviour for this item.', 'wp-ultimate-post-grid' ); ?></td> |
| 34 |
</tr> |
| 35 |
<tr> |
| 36 |
<td><label for="wpupg_custom_image"><?php _e( 'Custom Image URL', 'wp-ultimate-post-grid' ); ?></label></td> |
| 37 |
<td> |
| 38 |
<input type="text" name="wpupg_custom_image" id="wpupg_custom_image" value="<?php echo esc_attr( get_post_meta( $post->ID, 'wpupg_custom_image', true ) ); ?>"/> |
| 39 |
<input type="hidden" name="wpupg_custom_image_id" id="wpupg_custom_image_id" value="<?php echo esc_attr( get_post_meta( $post->ID, 'wpupg_custom_image_id', true ) ); ?>"/> |
| 40 |
</td> |
| 41 |
<td><input type="button" id="wpupg_add_custom_image" class="button" value="<?php _e( 'Choose from Library', 'wp-ultimate-post-grid' )?>"></td> |
| 42 |
</tr> |
| 43 |
</table> |