rebase on oct-10-2023
This commit is contained in:
@@ -441,7 +441,6 @@ class WPSEO_Upgrade {
|
||||
// Move one XML sitemap setting, then delete the option.
|
||||
$this->save_option_setting( $wpseo_xml, 'enablexmlsitemap', 'enable_xml_sitemap' );
|
||||
|
||||
|
||||
// Move the RSS settings to the search appearance settings, then delete the RSS option.
|
||||
$this->save_option_setting( $wpseo_rss, 'rssbefore' );
|
||||
$this->save_option_setting( $wpseo_rss, 'rssafter' );
|
||||
@@ -1427,8 +1426,8 @@ class WPSEO_Upgrade {
|
||||
|
||||
// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- Reason: Too hard to fix.
|
||||
if ( empty( $included_post_types ) ) {
|
||||
$delete_query =
|
||||
"DELETE FROM $indexable_table
|
||||
$delete_query = "
|
||||
DELETE FROM $indexable_table
|
||||
WHERE object_type = 'post'
|
||||
AND object_sub_type IS NOT NULL";
|
||||
}
|
||||
@@ -1509,8 +1508,8 @@ class WPSEO_Upgrade {
|
||||
|
||||
$indexable_table = Model::get_table_name( 'Indexable' );
|
||||
|
||||
$query =
|
||||
"SELECT
|
||||
$query = "
|
||||
SELECT
|
||||
MAX(id) as newest_id,
|
||||
object_id,
|
||||
object_type
|
||||
@@ -1574,7 +1573,7 @@ class WPSEO_Upgrade {
|
||||
// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- Reason: No user input, just a table name.
|
||||
// phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery -- Reason: Most performant way.
|
||||
// phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason: No relevant caches.
|
||||
$delete_query = $wpdb->query(
|
||||
$wpdb->query(
|
||||
"DELETE FROM $indexable_table
|
||||
WHERE post_status = 'unindexed'
|
||||
AND object_type NOT IN ( 'home-page', 'date-archive', 'post-type-archive', 'system-page' )
|
||||
|
||||
Reference in New Issue
Block a user