function prepare_items()
 {
     $current_page = $this->get_pagenum();
     $per_page = get_option('wdtTablesPerPage') ? get_option('wdtTablesPerPage') : 10;
     $columns = $this->get_columns();
     $hidden = array();
     $sortable = $this->get_sortable_columns();
     $this->_column_headers = array($columns, $hidden, $sortable);
     $this->set_pagination_args(array('total_items' => wdt_get_table_count(), 'per_page' => $per_page));
     $this->items = wdt_get_all_tables();
 }
Exemplo n.º 2
0
            <span><div class="dashicons dashicons-admin-generic"></div> Dynamanic Tables Settings</span>
            <div class="pull-right" style="margin-right: 5px">
                <button class="button-primary save_dt_btn"><?php 
_e('Save Dynamic Table Settings');
?>
</button>
            </div>
        </h3>
        <div class="inside">
            <div class="dt_full">
                <label for="dt_child_table"><?php 
_e('Select Child Table');
?>
                    <select name="dt_child_table" id="dt_child_table">
                        <?php 
$tables_options = wdt_get_all_tables();
?>
                        <?php 
$configuration = (array) json_decode(get_option('dt_configuration', array()), true);
?>
                        <?php 
foreach ($tables_options as $table) {
    ?>
                            <?php 
    if ($table['table_type'] == 'mysql') {
        ?>
                                <option value="<?php 
        echo $table['id'];
        ?>
"
                                    <?php