b882092f5d
These changes were applied DIRECTLY to the production cPanel server via Fileman/save_file_content API calls between ~10:30 PT and 14:44 PT today. None of them were committed or pushed at the time, violating the Software → Repo rule (CLAUDE.md, added 2026-05-18). Captured by Claude (VSCode-side) at Sami request so the changes can be reviewed/cherry-picked instead of being silently lost. Notable concerns: - class-beep.php shrank from 3387 → 1395 bytes (likely truncation, not edit) - beep.css shrank from 35431 → 22948 bytes (-12.5 KB; ~half the file gone) - class-replies.php shrank from 8793 → 6406 bytes - 3 new files (class-magic-links.php, class-follows.php, create_poll_tables.php) were created server-only with no repo presence Source: live cPanel snapshot at /tmp/beep-snapshot-2026-05-20/
53 lines
1.4 KiB
PHP
Executable File
53 lines
1.4 KiB
PHP
Executable File
<?php
|
|
if (!defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
class Beep_Plugin {
|
|
|
|
public static function init() {
|
|
Beep_CPT::init();
|
|
Beep_Likes::init();
|
|
Beep_Replies::init();
|
|
Beep_Moderation::init();
|
|
Beep_Polls::init();
|
|
Beep_Shortcode::init();
|
|
|
|
add_action('wp_enqueue_scripts', [__CLASS__, 'enqueue_assets']);
|
|
}
|
|
|
|
public static function activate() {
|
|
Beep_CPT::register();
|
|
Beep_Likes::create_table();
|
|
Beep_Polls::create_tables();
|
|
Beep_Magic_Links::create_table();
|
|
flush_rewrite_rules();
|
|
}
|
|
|
|
public static function deactivate() {
|
|
flush_rewrite_rules();
|
|
}
|
|
|
|
public static function enqueue_assets() {
|
|
wp_enqueue_style(
|
|
'beep',
|
|
BEEP_URL . 'assets/beep.css',
|
|
[],
|
|
BEEP_VERSION
|
|
);
|
|
wp_enqueue_script(
|
|
'beep',
|
|
BEEP_URL . 'assets/beep.js',
|
|
[],
|
|
BEEP_VERSION,
|
|
true
|
|
);
|
|
wp_localize_script('beep', 'BeepConfig', [
|
|
'restUrl' => esc_url_raw(rest_url('beep/v1/')),
|
|
'nonce' => wp_create_nonce('wp_rest'),
|
|
'charLimit' => BEEP_CHAR_LIMIT,
|
|
'loginUrl' => esc_url_raw(wp_login_url(is_singular() ? get_permalink() : home_url('/'))),
|
|
'isLoggedIn' => is_user_logged_in(),
|
|
]);
|
|
}
|
|
} |