PluginProbe
WP Directory Kit / 1.3.1
WP Directory Kit v1.3.1
1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 1.4.0 1.4.1 All 35 releases
wpdirectorykit / application / views / wdk_messages / edit.php

edit.php in WP Directory Kit 1.3.1, at application/views/wdk_messages/edit.php

88 lines 5.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The template for Edit Messages.
4 *
5 * This is the template that form edit
6 *
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly.
11 }
12 ?>
13 <!-- This file should primarily consist of HTML with a little bit of PHP. -->
14 <div class="wrap wdk-wrap">
15 <h1 class="wp-heading-inline"><?php echo __('View/Edit Messages', 'wpdirectorykit'); ?></h1>
16 <br /><br />
17 <div class="wdk-body">
18 <form method="post" action="<?php echo esc_url(wmvc_current_edit_url()); ?>" enctype="multipart/form-data" novalidate="novalidate">
19 <?php wp_nonce_field( 'wdk-messages-edit_'.wmvc_show_data('idmessage', $db_data, 0), '_wpnonce'); ?>
20 <div class="postbox" style="display: block;">
21 <div class="postbox-header">
22 <h3><?php echo __('Main Data', 'wpdirectorykit'); ?></h3>
23 </div>
24 <div class="inside">
25 <?php
26 $form->messages('class="alert alert-danger"', __('Successfully saved', 'wpdirectorykit'));
27 ?>
28 <table class="form-table" role="presentation">
29 <tbody>
30 <tr>
31 <th scope="row"><label for="input_post_id"><?php echo __('Listing id', 'wpdirectorykit'); ?></label></th>
32 <td>
33 <input name="post_id" type="text" id="input_post_id" value="<?php echo wmvc_show_data('post_id', $db_data, ''); ?>" placeholder="<?php echo esc_html__('Post Id', 'wpdirectorykit');?>" class="regular-text">
34 </td>
35 </tr>
36 <tr>
37 <th scope="row"><label for="input_date"><?php echo __('Date', 'wpdirectorykit'); ?></label></th>
38 <td>
39 <input name="date" type="text" id="input_date" value="<?php echo wmvc_show_data('date', $db_data, ''); ?>" placeholder="<?php echo esc_html__('Address', 'wpdirectorykit');?>" class="regular-text">
40 </td>
41 </tr>
42 <tr>
43 <th scope="row"><label for="message"><?php echo __('Message', 'wpdirectorykit'); ?></label></th>
44 <td>
45 <?php wp_editor(wmvc_show_data('message', $db_data, ''), 'message', array('media_buttons' => FALSE)); ?>
46 </td>
47 </tr>
48 <tr>
49 <th scope="row"><label for="is_readed"><?php echo __('Make as read', 'wpdirectorykit'); ?></label></th>
50 <td>
51 <input name="is_readed" type="checkbox" id="is_featured" value="1" <?php echo !empty(wmvc_show_data('is_readed', $db_data, ''))?'checked':''; ?>> <?php echo __('Mark it as readed','wpdirectorykit'); ?>
52 </td>
53 </tr>
54 <?php
55 $json_data = wmvc_show_data('json_object', $db_data, '');
56 if(!empty($json_data)) :
57 $json_data = json_decode($json_data);
58 ?>
59 <tr>
60 <th scope="row"><label for="is_readed"><?php echo __('Full Message Data', 'wpdirectorykit'); ?></label></th>
61 <td>
62 <span class="regular-span" style="">
63
64 <?php foreach ($json_data as $key => $value) : ?>
65 <?php if($key == 'element_id' || $key == 'eli_id' || $key == 'action') continue;?>
66 <?php if (!empty($value)) : ?>
67 <p>
68 <?php if(filter_var($value, FILTER_VALIDATE_URL ) || strpos( $value, 'http' ) !== FALSE):?>
69 <strong><?php echo esc_html(ucfirst(str_replace('_', ' ', $key))); ?>:</strong> <a href="<?php echo esc_url($value);?>"><?php echo wp_kses_post($value); ?></a><br />
70 <?php else : ?>
71 <strong><?php echo esc_html(ucfirst(str_replace('_', ' ', $key))); ?>:</strong> <?php echo wp_kses_post($value); ?><br />
72 <?php endif; ?>
73 </p>
74 <?php endif; ?>
75 <?php endforeach; ?>
76 </span>
77 </td>
78 </tr>
79 <?php endif;?>
80 </tbody>
81 </table>
82 </div>
83 </div>
84 <input type="submit" name="submit" id="submit" class="button button-primary" value="<?php echo esc_html__('Save Changes','wpdirectorykit'); ?>">
85 </form>
86 </div>
87 </div>
88 <?php $this->view('general/footer', $data); ?>