📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: LiteSpeed
2026-06-29 03:31:24
📂
/ (Root)
/
home
/
apkbfjox
/
stargame.pk
/
wp-content
/
plugins
/
kadence-blocks
/
includes
/
resources
/
Optimizer
/
Database
📍 /home/apkbfjox/stargame.pk/wp-content/plugins/kadence-blocks/includes/resources/Optimizer/Database
🔄 Refresh
✏️
Editing: Optimizer_Table.php
Writable
<?php declare( strict_types=1 ); namespace KadenceWP\KadenceBlocks\Optimizer\Database; use KadenceWP\KadenceBlocks\StellarWP\DB\Database\Exceptions\DatabaseQueryException; use KadenceWP\KadenceBlocks\StellarWP\Schema\Tables\Contracts\Table; /** * The optimizer database table to store optimizer data. */ final class Optimizer_Table extends Table { public const SCHEMA_VERSION = '2.0.5'; /** * @var string The base table name. */ protected static $base_table_name = 'kb_optimizer'; /** * @var string The organizational group this table belongs to. */ protected static $group = 'kb'; /** * @var string|null The slug used to identify the custom table. */ protected static $schema_slug = 'optimizer'; /** * @var string The field that uniquely identifies a row in the table. */ protected static $uid_column = 'path_hash'; /** * Overload the update method to first drop the database as this is a temporary table. * * @throws DatabaseQueryException If any of the queries fail. * * @return string[] */ public function update() { try { if ( $this->exists() ) { $this->drop(); } } catch ( \Throwable $e ) { function_exists( 'error_log' ) && error_log( '[Kadence Blocks]: Unable to drop optimizer table during schema update: ' . $e->getMessage() ); return []; } return parent::update(); } /** * @inheritDoc */ protected function get_definition(): string { global $wpdb; $table_name = self::table_name(); $charset_collate = $wpdb->get_charset_collate(); return " CREATE TABLE `$table_name` ( path_hash CHAR(64) PRIMARY KEY COMMENT 'SHA-256 hash of the relative path of the URL used as a unique key for fast lookups', path TEXT NOT NULL COMMENT 'The relative path of the URL, stored for reference and debugging', analysis LONGTEXT NOT NULL COMMENT 'Serialized or JSON-encoded analysis data associated with the path' ) {$charset_collate}; "; } }
💾 Save Changes
❌ Cancel