- WordPress core y plugins - Tema Twenty Twenty-Four configurado - Plugin allow-unfiltered-html.php simplificado - .gitignore configurado para excluir wp-config.php y uploads 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
106 lines
4.0 KiB
PHP
Executable File
106 lines
4.0 KiB
PHP
Executable File
<!-- PREPARE DATA -->
|
|
<?php
|
|
|
|
ob_start();
|
|
require plugin_dir_path( __DIR__ ) . 'components/wp-database-tools-admin-component-item-general.php';
|
|
$item = ob_get_clean();
|
|
|
|
$list_data = array();
|
|
foreach ( $this->database->get_general_data() as $key => $data ) {
|
|
|
|
$user_options_general = get_option( WPDBT_PREFIX . 'user_options_general' );
|
|
$days = isset( $user_options_general[ $key ]['days'] ) ? $user_options_general[ $key ]['days'] : 0;
|
|
$has_clean_tables = $data['count'] > 0;
|
|
$is_days = $data['is-days'];
|
|
$details_url = '&details=' . $key;
|
|
|
|
// ATRIBUTES
|
|
$format_data['name'] = $data['label'];
|
|
$format_data['count'] = $data['count'];
|
|
$format_data['key'] = $key;
|
|
|
|
// EXTRA
|
|
$format_data['class-active'] = $has_clean_tables ? 'active' : 'inactive';
|
|
$format_data['class-opacity-see'] = $has_clean_tables ? 'normal' : 'opacity';
|
|
$format_data['class-opacity-delete'] = $has_clean_tables ? 'normal' : 'opacity';
|
|
$format_data['class-opacity-edit'] = $is_days ? '' : 'opacity';
|
|
$format_data['class-opacity-cron'] = '';
|
|
$format_data['is-days'] = $is_days ? 'yes' : 'no';
|
|
$format_data['label-days'] = ! $is_days ? 'N/A' : $days;
|
|
$format_data['icon-see'] = $settings_page['admin_url'] . 'img/icon-see.svg';
|
|
$format_data['icon-delete'] = $settings_page['admin_url'] . 'img/icon-delete.svg';
|
|
$format_data['icon-edit'] = $is_days ? $settings_page['admin_url'] . 'img/icon-edit.svg' : '';
|
|
$format_data['icon-cron'] = $settings_page['admin_url'] . 'img/icon-cron.svg';
|
|
$format_data['onclick-see'] = $has_clean_tables ? "location.href='" . admin_url( sprintf( basename( $_SERVER['REQUEST_URI'] ) ) ) . $details_url . "'" : '';
|
|
$format_data['onclick-delete'] = $has_clean_tables ? 'showModal(this)' : '';
|
|
$format_data['onclick-edit'] = $is_days ? 'showModal(this)' : '';
|
|
$format_data['onclick-cron'] = $settings_page['admin_url'];
|
|
|
|
// SAVE ARRAY
|
|
array_push( $list_data, $format_data );
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
<script>
|
|
var item = <?php echo json_encode( $item ); ?>;
|
|
var values = <?php echo json_encode( $list_data ); ?>;
|
|
</script>
|
|
|
|
<div id="list-display">
|
|
|
|
<!-- SEARCH-->
|
|
<?php require plugin_dir_path( __DIR__ ) . 'components/list/wp-database-tools-component-list-search.php'; ?>
|
|
|
|
|
|
<div class="mt-10">
|
|
|
|
<!-- BULK ACTIONS -->
|
|
<?php require plugin_dir_path( __DIR__ ) . 'components/wp-database-tools-admin-component-bulk-actions.php'; ?>
|
|
|
|
<div class="d-flex-between">
|
|
|
|
<!-- BULK ACTIONS SELECTIONS-->
|
|
<?php require plugin_dir_path( __DIR__ ) . 'components/wp-database-tools-admin-component-bulk-actions-selectors.php'; ?>
|
|
|
|
<div class="d-flex-between">
|
|
<!-- SELECT PAGINATION -->
|
|
<?php require plugin_dir_path( __DIR__ ) . 'components/wp-database-tools-admin-component-pagination-select.php'; ?>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<!-- HEADER TABLE -->
|
|
<div class="d-flex-between bg-light-blue-color-x2 px-20">
|
|
<div class="w-60p d-flex-start align-items-center">
|
|
<input id="check-typebox-all" class="m-0" type="checkbox" onchange="checkAll(this)" >
|
|
<p class="m-0 ml-10 font-bold"><?php echo __( 'Name', $this->plugin_name ); ?></p>
|
|
</div>
|
|
<p class="w-10p text-align-center font-bold"><?php echo __( 'Totals', $this->plugin_name ); ?></p>
|
|
<p class="w-10p text-align-center font-bold"><?php echo __( 'Keep', $this->plugin_name ); ?></p>
|
|
<p class="w-10p text-align-center font-bold"><?php echo __( 'Actions', $this->plugin_name ); ?></p>
|
|
</div>
|
|
|
|
<!-- NOT RESULTS -->
|
|
<div id="container_list_not_found" style="display: none;">
|
|
<?php require plugin_dir_path( __DIR__ ) . 'components/wp-database-tools-admin-component-not-found.php'; ?>
|
|
</div>
|
|
|
|
<!-- LOADER -->
|
|
<div id="container_list_loader">
|
|
<?php require plugin_dir_path( __DIR__ ) . 'components/wp-database-tools-admin-component-loader.php'; ?>
|
|
</div>
|
|
|
|
<div id="container_list_display" style="display: none;">
|
|
<ul class="list m-0">
|
|
</ul>
|
|
<!-- PAGINATION -->
|
|
<?php require plugin_dir_path( __DIR__ ) . 'components/wp-database-tools-admin-component-pagination.php'; ?>
|
|
</div>
|
|
</div>
|