Website Summary Files Commits Branches @commit @diff @stats
path: root / wp-content / plugins / dx-cars / car-info-display-callback.php
diff options
context:
space:
mode:
1 files changed, 27 insertions, 0 deletions
-rw-r--r--wp-content/plugins/dx-cars/car-info-display-callback.php27
diff --git a/wp-content/plugins/dx-cars/car-info-display-callback.php b/wp-content/plugins/dx-cars/car-info-display-callback.php
new file mode 100644
index 0000000..b8931aa
--- /dev/null
+++ b/wp-content/plugins/dx-cars/car-info-display-callback.php
@@ -0,0 +1,27 @@
+<table>
+ <tr>
+ <td><?php _e( 'Year:' ) ?></td>
+ <td><input type="text" name="car-year" value="<?php echo( sanitize_text_field( get_post_meta( get_the_ID(), __( 'car-year' ), true ) ) ) ?>"></td>
+ </tr>
+ <tr>
+ <td><?php _e( 'Millage:' ) ?></td>
+ <td><input type="text" name="car-millage" value="<?php echo( sanitize_text_field( get_post_meta( get_the_ID(), __( 'car-millage' ), true ) ) ) ?>"></td>
+ </tr>
+ <tr>
+ <td><?php _e( 'Price:' ) ?></td>
+ <td><input type="text" name="car-price" value="<?php echo( sanitize_text_field( get_post_meta( get_the_ID(), __( 'car-price' ), true ) ) ) ?>"></td>
+ </tr>
+ <tr>
+ <td><?php _e( 'Photo:' ) ?></td>
+ <td><input type="file" name="car-images[]" value="" multiple></td>
+ </tr>
+ <tr>
+ <td><?php _e( 'Uploaded photo<br>(might need page refresh):' ) ?></td>
+ <?php
+ $images = ( array )json_decode( get_post_meta( get_the_ID(), __( 'car-images' ), true ) );
+ foreach ( $images as $image ) {
+ echo( '<td> <img src="' . $image . '" alt=""></td>' );
+ }
+ ?>
+ </tr>
+</table>