init_hooks(); } /** * Prevent cloning */ private function __clone() {} /** * Prevent unserialization */ public function __wakeup() {} /** * Initialize WordPress hooks */ private function init_hooks() { // Admin hooks if (is_admin()) { add_action('admin_menu', [$this, 'add_admin_menu']); add_action('admin_enqueue_scripts', [$this, 'enqueue_admin_scripts']); } // Load text domain for translations add_action('init', [$this, 'load_textdomain']); } /** * Load plugin text domain for translations */ public function load_textdomain() { load_plugin_textdomain( 'tigerstyle-life9', false, dirname(plugin_basename(__FILE__)) . '/languages' ); } /** * Add admin menu with cat-themed items */ public function add_admin_menu() { // Main menu page add_menu_page( '🐾 Life Tracker Dashboard', // Page title 'TigerStyle Life9', // Menu title 'manage_options', // Capability 'tigerstyle-life9-clean', // Menu slug [$this, 'render_dashboard_page'], // Callback 'dashicons-backup', // Icon 31 // Position (different from main plugin) ); // Submenu pages with cat themes add_submenu_page( 'tigerstyle-life9-clean', '💾 Save a Life', '💾 Save a Life', 'manage_options', 'tigerstyle-life9-clean-backup', [$this, 'render_backup_page'] ); add_submenu_page( 'tigerstyle-life9-clean', '🔄 Restore a Life', '🔄 Restore a Life', 'manage_options', 'tigerstyle-life9-clean-restore', [$this, 'render_restore_page'] ); add_submenu_page( 'tigerstyle-life9-clean', '⚙️ Territory Settings', '⚙️ Territory Settings', 'manage_options', 'tigerstyle-life9-clean-settings', [$this, 'render_settings_page'] ); } /** * Enqueue admin scripts and styles */ public function enqueue_admin_scripts($hook) { // Only load on our plugin pages if (strpos($hook, 'tigerstyle-life9-clean') === false) { return; } // Add some basic styling wp_add_inline_style('admin-menu', ' .tigerstyle-life9-clean .form-table th { padding-left: 2em; } .tigerstyle-cat-message { background: #fff3cd; border-left: 4px solid #ffc107; padding: 12px; margin: 16px 0; } .tigerstyle-cat-success { background: #d1edff; border-left: 4px solid #0073aa; padding: 12px; margin: 16px 0; } .tigerstyle-cat-demo { background: #e8f5e8; border-left: 4px solid #46b450; padding: 12px; margin: 16px 0; } .tigerstyle-icon { font-size: 1.2em; margin-right: 0.5em; } '); } /** * Render dashboard page */ public function render_dashboard_page() { ?>

🐾

🐱 Welcome to your backup territory!

7

💾 🔄 ⚙️

"A cat always lands on its feet, but a server that crashes... well, that's why we have backups! Smart cats always have multiple escape routes, and smart sysadmins always have multiple backups."

- Ancient Cat Proverb (according to TigerStyle)

💾

🐾

🐱 Cat's Backup Wisdom:



🐱 Backup Tip:

🔄

🐾

🐱 Cat's Restoration Wisdom:

CatLife-2025-09-17 Today, 2 hours ago 45.2 MB 🐱🐱🐱🐱🐱 (5 cats)
CatLife-2025-09-16 Yesterday 43.8 MB 🐱🐱🐱🐱 (4 cats)
CatLife-Emergency Last week 41.5 MB 🐱🐱🐱🐱🐱🐱 (6 cats - emergency backup!)

🐱 Restore Tip:

⚙️

🐾

🐱 Cat's Organization Tip:



🐱 Settings Tip: