PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / trunk
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages vtrunk
3.4.1 3.4.0 3.3.9 3.3.8 3.3.7 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 2.3.1 2.3.2 2.3.3 All 194 releases
← All changes | uninstall.php +15 -0 3.3.5trunk View file →
@@ -15,8 +15,23 @@
15 15 // Only WordPress and PHP methods can be used. Plugin classes and methods
16 16 // are not reliably available due to the Plugin being deactivated and going
17 17 // through deletion now.
18 18
19 +// Delete the log file from the uploads directory.
20 +// The Plugin's own directory is deleted by WordPress once this routine completes,
21 +// so any historic log file stored there doesn't need deleting here.
22 +// This mirrors ConvertKit_Log::get_log_file_name() in the Kit WordPress Libraries,
23 +// which we can't call as the Plugin's classes aren't reliably available.
24 +$upload_dir = wp_upload_dir();
25 +if ( empty( $upload_dir['error'] ) && ! empty( $upload_dir['basedir'] ) ) {
26 + $log_slug = sanitize_key( basename( __DIR__ ) );
27 + $log_file = trailingslashit( $upload_dir['basedir'] ) . 'kit-logs/' . $log_slug . '-' . wp_hash( $log_slug ) . '.log';
28 +
29 + if ( file_exists( $log_file ) ) {
30 + wp_delete_file( $log_file );
31 + }
32 +}
33 +
19 34 // Get settings.
20 35 $settings = get_option( '_wp_convertkit_settings' );
21 36
22 37 // Bail if no settings exist.