FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sdk-wordpress/uninstall.php at main · RoxyAPI/sdk-wordpress · GitHub
RoxyAPI
/
sdk-wordpress
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
14
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
sdk-wordpress
/
uninstall.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (29 loc) · 1.2 KB
Breadcrumbs
sdk-wordpress
/
uninstall.php
Copy path
File metadata and controls
33 lines (29 loc) · 1.2 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Uninstall handler for RoxyAPI.
*
* Runs when the user deletes the plugin from the WordPress admin Plugins screen.
* Removes plugin options and cached transients. Leaves user data alone.
*
* @package RoxyAPI
*/
if
( !
defined
(
'
WP_UNINSTALL_PLUGIN
'
) ) {
exit
;
}
delete_option
(
'
roxyapi_settings
'
);
// The cache epoch is the token folded into every response-cache key. Dropping
// it with the rest means a reinstall starts on a fresh namespace instead of
// adopting entries the sweep below cannot reach, such as those held by a
// persistent object cache.
delete_option
(
'
roxyapi_cache_epoch
'
);
global
$
wpdb
;
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- uninstall cleanup, no persistent caching needed.
$
wpdb
->
query
(
"
DELETE FROM
{
$
wpdb
->
options
}
WHERE option_name LIKE '_transient_roxyapi_%'
OR option_name LIKE '_transient_timeout_roxyapi_%'
"
);
// Bulk delete the dismiss-notice user meta in one query without enumerating
// users first. The earlier get_users + foreach approach OOMs on sites with
// many users; delete_metadata( ..., true ) issues a single DELETE.
delete_metadata
(
'
user
'
,
0
,
'
roxyapi_dismissed_setup
'
,
''
,
true
);
Back
|
FazBrowse Home
|
New Git URL