PluginProbe
Polylang / 3.1
Polylang v3.1
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 +1 -20 2.83.1 View file →
@@ -51,20 +51,8 @@
51 51 global $wpdb;
52 52
53 53 do_action( 'pll_uninstall' );
54 54
55 - // Suppress data of the old model < 1.2
56 - // FIXME: to remove when support for v1.1.6 will be dropped
57 - $wpdb->termmeta = $wpdb->prefix . 'termmeta'; // registers the termmeta table in wpdb
58 -
59 - // Do nothing if the termmeta table does not exists
60 - if ( count( $wpdb->get_results( "SHOW TABLES LIKE '$wpdb->termmeta'" ) ) ) {
61 - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_translations'" );
62 - $wpdb->query( "DELETE FROM $wpdb->termmeta WHERE meta_key = '_language'" );
63 - $wpdb->query( "DELETE FROM $wpdb->termmeta WHERE meta_key = '_rtl'" );
64 - $wpdb->query( "DELETE FROM $wpdb->termmeta WHERE meta_key = '_translations'" );
65 - }
66 -
67 55 // Need to register the taxonomies
68 56 $pll_taxonomies = array( 'language', 'term_language', 'post_translations', 'term_translations' );
69 57 foreach ( $pll_taxonomies as $taxonomy ) {
70 58 register_taxonomy( $taxonomy, null, array( 'label' => false, 'public' => false, 'query_var' => false, 'rewrite' => false ) );
@@ -95,15 +83,9 @@
95 83 foreach ( $ids as $id ) {
96 84 wp_delete_post( $id, true );
97 85 }
98 86
99 - // Delete the strings translations ( <1.2 )
100 - // FIXME: to remove when support for v1.1.6 will be dropped
101 - foreach ( $languages as $lang ) {
102 - delete_option( 'polylang_mo' . $lang->term_id );
103 - }
104 -
105 - // Delete the strings translations 1.2+
87 + // Delete the strings translations.
106 88 register_post_type( 'polylang_mo', array( 'rewrite' => false, 'query_var' => false ) );
107 89 $ids = get_posts(
108 90 array(
109 91 'post_type' => 'polylang_mo',
@@ -145,9 +127,8 @@
145 127 delete_option( 'pll_dismissed_notices' );
146 128
147 129 // Delete transients
148 130 delete_transient( 'pll_languages_list' );
149 - delete_transient( 'pll_upgrade_1_4' );
150 131 }
151 132 }
152 133
153 134 new PLL_Uninstall();