We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cb65ef commit 42d4279Copy full SHA for 42d4279
uninstall.php
@@ -24,6 +24,15 @@ function onedesign_plugin_deletion(): void {
24
$brand_site_post_ids = get_option( 'onedesign_brand_site_post_ids', array() );
25
if ( is_array( $brand_site_post_ids ) && ! empty( $brand_site_post_ids ) ) {
26
foreach ( $brand_site_post_ids as $post_id ) {
27
+
28
+ // delete post meta associated with the post.
29
+ $meta_keys = get_post_meta( $post_id );
30
+ if ( is_array( $meta_keys ) && ! empty( $meta_keys ) ) {
31
+ foreach ( $meta_keys as $meta_key => $meta_value ) {
32
+ delete_post_meta( $post_id, $meta_key );
33
+ }
34
35
36
wp_delete_post( $post_id, true );
37
}
38
0 commit comments