# wpdirectorykit/1.5.9/application/views/wdk_location/index.php

WP Directory Kit, version 1.5.9. 127 lines.

- Page: https://pluginprobe.com/plugins/wpdirectorykit/1.5.9/code/application/views/wdk_location/index.php
- Raw: https://pluginprobe.com/plugins/wpdirectorykit/1.5.9/raw/application/views/wdk_location/index.php
- Modified: 2026-10-04T19:48:12+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wpdirectorykit/1.5.9/code/application/views/wdk_location/index.php#L10-L20`.

```php
<?php
/**
 * The template for Locations Management.
 *
 * This is the template that table, search layout
 *
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}
?>
<!-- This file should primarily consist of HTML with a little bit of PHP. -->

<div class="wrap wdk-wrap">
    <h1 class="wp-heading-inline"><?php echo esc_html__('Locations','wpdirectorykit'); ?> <a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_location&function=edit"); ?>" class="button button-primary" id="add_location_button"><?php echo esc_html__('Add location','wpdirectorykit'); ?></a></h1>
    <br />
    <?php
        $success_message = NULL;
        if(isset($_GET['custom_message']))
            $success_message = esc_html(urldecode($_GET['custom_message']));

        $form->messages('class="alert alert-danger"', $success_message);
    ?>
    <br />
    <form method="GET" action="<?php echo esc_url(wmvc_current_edit_url()); ?>" novalidate="novalidate">
        <table class="wp-list-table widefat fixed striped table-view-list pages">
            <thead>
                <tr>
                    <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>
                    <th><?php echo esc_html__('Title','wpdirectorykit'); ?></th>
                    <th><?php echo esc_html__('Order','wpdirectorykit'); ?></th>
                    <th><?php echo esc_html__('Level','wpdirectorykit'); ?></th>
                    <th><?php echo esc_html__('Date','wpdirectorykit'); ?></th>
                    <th class="actions_column"><?php echo esc_html__('Actions','wpdirectorykit'); ?></th>
                </tr>
            </thead>

            <?php if(count($locations) == 0): ?>
                <tr class="no-items"><td class="colspanchange" colspan="6"><?php echo esc_html__('No Locations found.','wpdirectorykit'); ?></td></tr>
            <?php endif; ?>

            <?php foreach ( $locations as $location ):?>
                <tr>
                    <th scope="row" class="check-column">
                        <input id="cb-select-<?php echo esc_attr(wmvc_show_data('idlocation', $location, '-')); ?>" type="checkbox" name="post[]" value="<?php echo esc_attr(wmvc_show_data('idlocation', $location, '-')); ?>">
                        <div class="locked-indicator">
                            <span class="locked-indicator-icon" aria-hidden="true"></span>
                            <span class="screen-reader-text"><?php echo esc_html__('Is Locked', 'wpdirectorykit'); ?></span>
                        </div>
                    </th>
                    <td>
                        <?php echo esc_html(str_pad('', wmvc_show_data('level', $location, 0)*12, '&nbsp;')).'|-'; ?><a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_location&function=edit&id=".wmvc_show_data('idlocation', $location, '-')); ?>"><?php echo esc_html(wp_strip_all_tags(wmvc_show_data('location_title', $location, '-'))).' #'.esc_html(wmvc_show_data('idlocation', $location, '-')); ?></a>
                    </td>
                    <td>
                        <?php echo esc_html(wmvc_show_data('order_index', $location, '-')); ?>
                    </td>
                    <td>
                        <?php echo esc_html(wmvc_show_data('level', $location, '-')); ?>
                    </td>
                    <td>
                        <?php echo esc_html(wdk_get_date(wmvc_show_data('date', $location), false)); ?>
                    </td>

                    <td class="actions_column">
                        <a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_location&function=edit&id=".wmvc_show_data('idlocation', $location, '-')); ?>" title="<?php echo esc_attr__('Edit','wpdirectorykit');?>"><span class="dashicons dashicons-edit"></span></a>
                        <a class="question_sure" href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_location&function=delete&id=".wmvc_show_data('idlocation', $location, '-')."&_wpnonce=".wp_create_nonce( 'wdk-location-delete_'.wmvc_show_data('idlocation', $location, '-')));?>" title="<?php echo esc_attr__('Remove','wpdirectorykit');?>"><span class="dashicons dashicons-no"></span></a>
                    </td>
                </tr>
            <?php endforeach; ?>

            <tfoot>
                <tr>
                    <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>
                    <th><?php echo esc_html__('Title','wpdirectorykit'); ?></th>
                    <th><?php echo esc_html__('Order','wpdirectorykit'); ?></th>
                    <th><?php echo esc_html__('Level','wpdirectorykit'); ?></th>
                    <th><?php echo esc_html__('Date','wpdirectorykit'); ?></th>
                    <th class="actions_column"><?php echo esc_html__('Actions','wpdirectorykit'); ?></th>
                </tr>
            </tfoot>
        </table>
        <div class="tablenav bottom">
            <div class="alignleft actions bulkactions">
                <?php wp_nonce_field( 'wdk-location-bulk', '_wpnonce'); ?>
                <label for="bulk-action-selector-bottom" class="screen-reader-text"><?php echo esc_html__('Select bulk action', 'wpdirectorykit'); ?></label>
                <select name="action" id="bulk-action-selector-bottom">
                    <option value="-1"><?php echo esc_html__('Bulk actions', 'wpdirectorykit'); ?></option>
                    <option value="delete" class="hide-if-no-js"><?php echo esc_html__('Delete', 'wpdirectorykit'); ?></option>
                </select>
                <input type="hidden" name="page" value="wdk_location" />
                <input type="submit" id="table_action" class="button action" name="table_action" value="<?php echo esc_attr__('Apply', 'wpdirectorykit'); ?>">
            </div>
            <br class="clear">
        </div>
    </form>
    <br />
    <div class="alert alert-info" style="margin-bottom:20px" role="alert"><?php
        echo wp_kses(
            sprintf(
                /* translators: 1: Tag with link open, 2: close link tag. */
                __('%1$s How to manage Locations documentation%2$s', 'wpdirectorykit'),
                '<a href="' . esc_url('https://wpdirectorykit.com/documentation/#!/locations') . '" target="_blank">',
                '</a>'
            ),
            array(
                'a' => array(
                    'href'   => true,
                    'target' => true,
                ),
            )
        );
    ?></div>
    <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>
</div>

<script>
    // Generate table
    jQuery(document).ready(function($) {
        $('.question_sure').on('click', function(){
            return confirm("<?php echo esc_js(__('Are you sure? Selected item will be completely removed!','wpdirectorykit')); ?>");
        });
    });
</script>

<?php $this->view('general/footer', $data); ?>

```
