PluginProbe
WP Ultimate Post Grid / 3.5.0
WP Ultimate Post Grid v3.5.0
4.1.1 trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.8 1.9 2.0 2.1 2.2 2.3 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 2.8.2 3.0.0 3.3.0 3.4.0 3.5.0 3.6.0 3.7.0 All 32 releases
wp-ultimate-post-grid / templates / admin / meta-box.php

meta-box.php in WP Ultimate Post Grid 3.5.0, at templates/admin/meta-box.php

50 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Template for the grid Meta Box.
4 *
5 * @link https://bootstrapped.ventures
6 * @since 3.0.0
7 *
8 * @package WP_Ultimate_Post_Grid
9 * @subpackage WP_Ultimate_Post_Grid/templates/admin
10 */
11 ?>
12 <input type="hidden" name="wpupg_nonce" value="<?php echo wp_create_nonce( 'grid' ); ?>" />
13 <table id="wpupg_form_post" class="wpupg_form">
14 <tr>
15 <td><label for="wpupg_custom_link"><?php _e( 'Custom Link', 'wp-ultimate-post-grid' ); ?></label></td>
16 <td>
17 <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 ) ); ?>"/>
18 </td>
19 <td><?php _e( 'Override the default link for this post.', 'wp-ultimate-post-grid' ); ?></td>
20 </tr>
21 <tr>
22 <td><label for="wpugpg_"><?php _e( 'Custom Link Behaviour', 'wp-ultimate-post-grid' ); ?></label></td>
23 <td>
24 <select name="wpupg_custom_link_behaviour" id="wpupg_custom_link_behaviour">
25 <?php
26 $custom_link_behaviour_options = array(
27 'default' => __( 'Use grid default', 'wp-ultimate-post-grid' ),
28 '_self' => __( 'Open in same tab', 'wp-ultimate-post-grid' ),
29 '_blank' => __( 'Open in new tab', 'wp-ultimate-post-grid' ),
30 'none' => __( "Don't use links", 'wp-ultimate-post-grid' ),
31 );
32
33 foreach( $custom_link_behaviour_options as $custom_link_behaviour => $custom_link_behaviour_name ) {
34 $selected = $custom_link_behaviour == get_post_meta( $post->ID, 'wpupg_custom_link_behaviour', true ) ? ' selected="selected"' : '';
35 echo '<option value="' . esc_attr( $custom_link_behaviour ) . '"' . $selected . '>' . $custom_link_behaviour_name . '</option>';
36 }
37 ?>
38 </select>
39 </td>
40 <td><?php _e( 'Override the link behaviour for this item.', 'wp-ultimate-post-grid' ); ?></td>
41 </tr>
42 <tr>
43 <td><label for="wpupg_custom_image"><?php _e( 'Custom Image URL', 'wp-ultimate-post-grid' ); ?></label></td>
44 <td>
45 <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 ) ); ?>"/>
46 <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 ) ); ?>"/>
47 </td>
48 <td><input type="button" id="wpupg_add_custom_image" class="button" value="<?php _e( 'Choose from Library', 'wp-ultimate-post-grid' )?>"></td>
49 </tr>
50 </table>