PluginProbe
WP Directory Kit / 1.5.9
WP Directory Kit v1.5.9
1.5.9 1.5.7 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 All 37 releases
wpdirectorykit / application / views / wdk_category / index.php

index.php in WP Directory Kit 1.5.9, at application/views/wdk_category/index.php

124 lines 7.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 Categories Management.
4 *
5 * This is the template that table, search layout
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
15 <div class="wrap wdk-wrap">
16 <h1 class="wp-heading-inline"><?php echo esc_html__('Categories','wpdirectorykit'); ?> <a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_category&function=edit"); ?>" class="button button-primary" id="add_category_button"><?php echo esc_html__('Add Category','wpdirectorykit'); ?></a></h1>
17 <br />
18 <?php
19 $success_message = NULL;
20 if(isset($_GET['custom_message']))
21 $success_message = esc_html(urldecode($_GET['custom_message']));
22
23 $form->messages('class="alert alert-danger"', $success_message);
24 ?>
25 <br />
26 <form method="GET" action="<?php echo esc_url(wmvc_current_edit_url()); ?>" novalidate="novalidate">
27 <table class="wp-list-table widefat fixed striped table-view-list pages">
28 <thead>
29 <tr>
30 <td id="cb" class="manage-column column-cb check-column"><label class="screen-reader-text" for="cb-select-all-1"><?php echo esc_html__('Select All', 'wpdirectorykit'); ?></label><input id="cb-select-all-1" type="checkbox"></td>
31 <th><?php echo esc_html__('Title','wpdirectorykit'); ?></th>
32 <th><?php echo esc_html__('Order','wpdirectorykit'); ?></th>
33 <th><?php echo esc_html__('Level','wpdirectorykit'); ?></th>
34 <th><?php echo esc_html__('Date','wpdirectorykit'); ?></th>
35 <th class="actions_column"><?php echo esc_html__('Actions','wpdirectorykit'); ?></th>
36 </tr>
37 </thead>
38 <?php if(count($categories) == 0): ?>
39 <tr class="no-items"><td class="colspanchange" colspan="6"><?php echo esc_html__('No Categories found.','wpdirectorykit'); ?></td></tr>
40 <?php endif; ?>
41 <?php foreach ( $categories as $category ):?>
42 <tr>
43 <th scope="row" class="check-column">
44 <input id="cb-select-<?php echo esc_attr(wmvc_show_data('idcategory', $category, '-')); ?>" type="checkbox" name="post[]" value="<?php echo esc_attr(wmvc_show_data('idcategory', $category, '-')); ?>">
45 <div class="locked-indicator">
46 <span class="locked-indicator-icon" aria-hidden="true"></span>
47 <span class="screen-reader-text"><?php echo esc_html__('Is Locked', 'wpdirectorykit'); ?></span>
48 </div>
49 </th>
50 <td>
51 <?php echo esc_html(str_pad('', wmvc_show_data('level', $category, 0)*12, '&nbsp;')).'|-'; ?><a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_category&function=edit&id=".wmvc_show_data('idcategory', $category, '-')); ?>"><?php echo esc_html(wp_strip_all_tags(wmvc_show_data('category_title', $category, '-'))).' #'.esc_html(wmvc_show_data('idcategory', $category, '-')); ?></a>
52 </td>
53 <td>
54 <?php echo esc_html(wmvc_show_data('order_index', $category, '-')); ?>
55 </td>
56 <td>
57 <?php echo esc_html(wmvc_show_data('level', $category, '-')); ?>
58 </td>
59 <td>
60 <?php echo esc_html(wdk_get_date(wmvc_show_data('date', $category), false)); ?>
61 </td>
62 <td class="actions_column">
63 <a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_category&function=edit&id=".wmvc_show_data('idcategory', $category, '-')); ?>" title="<?php echo esc_attr__('Edit','wpdirectorykit');?>"><span class="dashicons dashicons-edit"></span></a>
64 <a class="question_sure" title="<?php echo esc_attr__('Remove','wpdirectorykit');?>" href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_category&function=delete&id=".wmvc_show_data('idcategory', $category, '-')); ?>&_wpnonce=<?php echo esc_attr(wp_create_nonce( 'wdk-category-delete_'.wmvc_show_data('idcategory', $category, '-')));?>"><span class="dashicons dashicons-no"></span></a>
65 </td>
66 </tr>
67 <?php endforeach; ?>
68 <tfoot>
69 <tr>
70 <td class="manage-column column-cb check-column"><label class="screen-reader-text" for="cb-select-all-2"><?php echo esc_html__('Select All', 'wpdirectorykit'); ?></label><input id="cb-select-all-2" type="checkbox"></td>
71 <th><?php echo esc_html__('Title','wpdirectorykit'); ?></th>
72 <th><?php echo esc_html__('Order','wpdirectorykit'); ?></th>
73 <th><?php echo esc_html__('Level','wpdirectorykit'); ?></th>
74 <th><?php echo esc_html__('Date','wpdirectorykit'); ?></th>
75 <th class="actions_column"><?php echo esc_html__('Actions','wpdirectorykit'); ?></th>
76 </tr>
77 </tfoot>
78 </table>
79 <div class="tablenav bottom">
80 <div class="alignleft actions bulkactions">
81 <?php wp_nonce_field( 'wdk-category-bulk', '_wpnonce'); ?>
82 <label for="bulk-action-selector-bottom" class="screen-reader-text"><?php echo esc_html__('Select bulk action', 'wpdirectorykit'); ?></label>
83 <select name="action" id="bulk-action-selector-bottom">
84 <option value="-1"><?php echo esc_html__('Bulk actions', 'wpdirectorykit'); ?></option>
85 <option value="delete" class="hide-if-no-js"><?php echo esc_html__('Delete', 'wpdirectorykit'); ?></option>
86 </select>
87 <input type="hidden" name="page" value="wdk_category" />
88 <input type="submit" id="table_action" class="button action" name="table_action" value="<?php echo esc_attr__('Apply', 'wpdirectorykit'); ?>">
89 </div>
90 <br class="clear">
91 </div>
92 </form>
93 <br />
94 <div class="alert alert-info" style="margin-bottom:20px" role="alert"><?php
95 echo wp_kses(
96 sprintf(
97 /* translators: 1: Tag with link open, 2: close link tag. */
98 __('%1$s How to manage Categories documentation%2$s', 'wpdirectorykit'),
99 '<a href="' . esc_url('https://wpdirectorykit.com/documentation/#!/categories') . '" target="_blank">',
100 '</a>'
101 ),
102 array(
103 'a' => array(
104 'href' => true,
105 'target' => true,
106 ),
107 )
108 );
109 ?></div>
110 <iframe width="560" height="315" src="//www.youtube.com/embed/051E9Lzn0Vs" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
111
112 </div>
113
114 <script>
115 // Generate table
116 jQuery(document).ready(function($) {
117 $('.question_sure').on('click', function(){
118 return confirm("<?php echo esc_js(__('Are you sure? Selected item will be completely removed!','wpdirectorykit')); ?>");
119 });
120 });
121 </script>
122
123 <?php $this->view('general/footer', $data); ?>
124