array( 'title_separator' => '-', 'title_template' => '{{title}} {{sep}} {{site_name}}', 'description_template' => '', 'default_robots' => 'index,follow', 'default_og_image' => '', 'schema_entity' => 'organization', 'org_name' => '', 'org_logo' => 0, 'org_profiles' => array(), ), 'type_settings' => array(), 'taxonomy_settings' => array(), 'archive_settings' => array( 'author_archive' => array( 'index' => null ), 'date_archive' => array( 'index' => false ), 'search' => array( 'index' => false ), 'attachment_redirect' => false, ), 'sitemap' => array( 'include_images' => false, ), ); foreach ( $defaults as $key => $value ) { if ( ! array_key_exists( $key, $settings ) ) { $settings[ $key ] = $value; } } return $settings; } /** * Adds M7 free's 'indexnow' top-level key when it doesn't already * exist -- same additive-only rule as merge_v2_defaults(). 'enabled' * defaults to false (coordinator, 2026-09-23): unlike sitemap/robots.txt, * a submission here tells a third party (indexnow.org) about every * publish/update, so an already-live site upgrading in place must not * start doing that on its own -- the same reasoning * ABDS_SEO_Noindex_Activation already applies to noindex/nofollow. The * key itself is generated immediately regardless: it's inert (never * used for anything) until 'enabled' is turned on, and always having * one avoids a separate "not generated yet" state anywhere else that * reads it (the key-file route, the REST status endpoint). * * @param array $settings Current abds_seo_settings value. * @return array The settings array with the indexnow key present. */ public static function merge_v3_defaults( array $settings ): array { if ( ! array_key_exists( 'indexnow', $settings ) ) { $settings['indexnow'] = array( 'enabled' => false, 'key' => wp_generate_password( 32, false ), ); } return $settings; } }