From 2127b1bdd73ecd2423e443992da4b442f5a3c1a3 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 04 Feb 2026 21:19:25 +0000
Subject: [PATCH] =Major overhaul of MetaManager.php -> Meta.php and RestRouteManager.php -> Rest.php. Seems to work for JakeVan
---
activate.php | 31 ++++++++-----------------------
1 files changed, 8 insertions(+), 23 deletions(-)
diff --git a/activate.php b/activate.php
index 83ce7d5..88932bc 100644
--- a/activate.php
+++ b/activate.php
@@ -12,7 +12,6 @@
function jvbActivatePlugin():void
{
- ob_start();
$validator = new JVBase\utility\Validator();
$validation = $validator->validateAll();
error_log('Validation result: '.print_r($validation, true));
@@ -49,23 +48,9 @@
error_log('Adding Umami tables');
Umami::createTables();
}
+
+ JVB()->directories()->activate();
error_log('Activation done! Huzzah!');
-
- $output = ob_get_clean();
- if ( $output ) {
- // Grab a backtrace to see what caused the output
- $trace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS );
- $formatted = [];
- foreach ( $trace as $step ) {
- if ( isset( $step['file'], $step['line'] ) ) {
- $formatted[] = $step['file'] . ':' . $step['line'];
- }
- }
-
- error_log( "⚠️ Plugin activation produced unexpected output (" . strlen( $output ) . " chars)" );
- error_log( "Output: " . trim( $output ) );
- error_log( "Backtrace: " . implode( ' <- ', $formatted ) );
- }
}
function jvbAddAdminCaps()
@@ -218,6 +203,7 @@
ARRAY_FILTER_USE_KEY
);
foreach ($options as $key => $value) {
+ error_log('Deleting Option'.$key);
delete_option($key);
}
}
@@ -240,14 +226,13 @@
$pages = new WP_Query([
'post_type' => BASE.'directory',
'posts_per_page' => -1,
- 'post_status' => 'any',
+ 'post_status' => ['publish', 'draft','trash'],
'fields' => 'ids'
]);
- if ($pages->have_posts()) {
- foreach ($pages->posts as $ID) {
- wp_delete_post($ID, true);
- }
- }
+ foreach ($pages->posts as $ID) {
+ wp_delete_post($ID, true);
+ }
+
}
function jvbClearSchedules()
{
--
Gitblit v1.10.0