Merged in feature/MAW-855-import-code-into-aws (pull request #2)

code import from pantheon

* code import from pantheon
This commit is contained in:
Tony Volpe
2023-12-04 23:08:14 +00:00
parent 8c9b1312bc
commit 8f4b5efda6
4766 changed files with 185592 additions and 239967 deletions

View File

@@ -106,6 +106,11 @@ class Indexable_Attachment_Watcher implements Integration_Interface {
\delete_transient( Indexable_Post_Indexation_Action::UNINDEXED_COUNT_TRANSIENT );
\delete_transient( Indexable_Post_Indexation_Action::UNINDEXED_LIMITED_COUNT_TRANSIENT );
// Set this core option (introduced in WP 6.4) to ensure consistency.
if ( \get_option( 'wp_attachment_pages_enabled' ) !== false ) {
\update_option( 'wp_attachment_pages_enabled', (int) ! $new_value['disable-attachment'] );
}
switch ( $new_value['disable-attachment'] ) {
case false:
$this->indexing_helper->set_reason( Indexing_Reasons::REASON_ATTACHMENTS_MADE_ENABLED );