diff --git a/readme.txt b/readme.txt index 052737a..d3464c9 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://www.kobzarev.com/donate/ Tags: indexnow, yandex, bing, google, seo Requires at least: 6.0 Tested up to: 6.5 -Stable tag: 0.1.2 +Stable tag: 0.1.2.1 Requires PHP: 7.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html diff --git a/recrawler.php b/recrawler.php index c618c4c..703989e 100644 --- a/recrawler.php +++ b/recrawler.php @@ -2,7 +2,7 @@ /** * Plugin Name: ReCrawler * Description: ReCrawler is a small WordPress Plugin for quickly notifying search engines whenever their website content is created, updated, or deleted. - * Version: 0.1.2 + * Version: 0.1.2.1 * Author: Mikhail Kobzarev * Author URI: https://www.kobzarev.com/ * Plugin URI: https://wordpress.org/plugins/recrawler/ @@ -22,7 +22,7 @@ exit; } -define( 'RECRAWLER_VERSION', '0.1.2' ); +define( 'RECRAWLER_VERSION', '0.1.2.1' ); define( 'RECRAWLER_SLUG', 'recrawler' ); define( 'RECRAWLER_PREFIX', 'recrawler' ); define( 'RECRAWLER_NAME', 'ReCrawler' ); diff --git a/src/Migrations/Migrations.php b/src/Migrations/Migrations.php index fff939a..7955a07 100644 --- a/src/Migrations/Migrations.php +++ b/src/Migrations/Migrations.php @@ -56,8 +56,6 @@ public function setup_hooks() { public function migrate() { $migrated = (array) get_option( self::MIGRATED_VERSIONS_OPTION_NAME, [] ); - //$this->check_plugin_update( $migrated ); - $migrations = array_filter( get_class_methods( $this ), static function ( $migration ) { @@ -70,8 +68,6 @@ static function ( $migration ) { foreach ( $migrations as $migration ) { $upgrade_version = $this->get_upgrade_version( $migration ); - - $upgrade_versions[] = $upgrade_version; if ( @@ -127,19 +123,6 @@ public function is_allowed(): bool { return wp_doing_cron() || is_admin() || ( defined( 'WP_CLI' ) && constant( 'WP_CLI' ) ); } - /** - * Check if the plugin was updated. - * - * @param array $migrated Migrated versions. - * - * @return void - */ - private function check_plugin_update( array $migrated ) { - if ( isset( $migrated[ self::PLUGIN_VERSION ] ) ) { - return; - } - } - /** * Get an upgrade version from the method name. * @@ -252,11 +235,11 @@ protected function migrate_0_1_2() { foreach ( $sites as $site_id ) { switch_to_blog( $site_id ); - $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}recrawler_log" ); // phpcs:ignore + $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}mihdan_index_now_log" ); // phpcs:ignore restore_current_blog(); } } else { - $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}recrawler_log" ); // phpcs:ignore + $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}mihdan_index_now_log" ); // phpcs:ignore } return true;