diff options
| Commit | cf1261ebf098dc0e644544ca2e57ceadfe51c476 (patch) | |
|---|---|---|
| Author | 2020-07-13 19:03:33 +0300 | |
| Committer | 2020-07-13 19:03:33 +0300 | |
| Files | 83da65e5bfc806bdd311201e5cc27354612dbe04 /wp-content/plugins/dx-cars/car-info-display-callback.php | |
| tues-interns-2020-feature-users-cm.tar tues-interns-2020-feature-users-cm.tar.gz tues-interns-2020-feature-users-cm.zip | ||
| Parent | a31eb16e5edbb293e8714f70c5f88d89dcc5e29d (diff) | |
fixed saving after validation; changed file names to match proposed naming feature-users-cm
1 files changed, 27 insertions, 0 deletions
| -rw-r--r-- | wp-content/plugins/dx-cars/car-info-display-callback.php | 27 |
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> |
