Initial import of 404 Enhacer

This commit is contained in:
2026-11-16 12:24:05 -05:00
commit cf03c388c3
15 changed files with 1724 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
<?php
/**
* Cleans up 404 Enhancer options and transients on uninstall.
*
* @package 404_Enhancer
*/
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
$fe_options = array(
'fe_custom_message',
'fe_featured_image_id',
'fe_enabled_post_types',
'fe_featured_post_ids',
'fe_suggestions_per_page',
);
foreach ( $fe_options as $fe_option ) {
delete_option( $fe_option );
}
global $wpdb;
$wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery
$wpdb->prepare(
"DELETE FROM {$wpdb->options} WHERE option_name LIKE %s OR option_name LIKE %s",
$wpdb->esc_like( '_transient_fe_gitea_' ) . '%',
$wpdb->esc_like( '_transient_timeout_fe_gitea_' ) . '%'
)
);