PluginProbe
Polylang / 2.8
Polylang v2.8
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | uninstall.php +4 -12 2.7.12.8 View file →
@@ -1,5 +1,8 @@
1 1 <?php
2 +/**
3 + * @package Polylang
4 + */
2 5
3 6 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { // If uninstall not called from WordPress exit
4 7 exit;
5 8 }
@@ -46,20 +49,9 @@
46 49 */
47 50 public function uninstall() {
48 51 global $wpdb;
49 52
50 - // Executes each module's uninstall script, if it exists
51 - $pll_modules_dir = dirname( __FILE__ ) . '/modules';
52 - opendir( $pll_modules_dir );
53 - while ( ( $module = readdir() ) != false ) {
54 - if ( substr( $module, 0, 1 ) !== '.' ) {
55 - $uninstall_script = $pll_modules_dir . '/' . $module . '/uninstall.php';
56 - if ( file_exists( $uninstall_script ) ) {
57 - require $uninstall_script; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable
58 - }
59 - }
60 - }
61 - closedir();
53 + do_action( 'pll_uninstall' );
62 54
63 55 // Suppress data of the old model < 1.2
64 56 // FIXME: to remove when support for v1.1.6 will be dropped
65 57 $wpdb->termmeta = $wpdb->prefix . 'termmeta'; // registers the termmeta table in wpdb