'keywords' => [ 'type' => 'string', 'localized' => true ] ] ] ); $this->defaults['searchAppearance']['archives'][ $postType['name'] ] = $defaultOptions; } } /** * Returns the search appearance options for dynamic objects. * * @since 4.1.4 * * @return array The default options. */ protected function getDefaultSearchAppearanceOptions() { return [ // phpcs:disable WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound 'show' => [ 'type' => 'boolean', 'default' => true ], 'advanced' => [ 'robotsMeta' => [ 'default' => [ 'type' => 'boolean', 'default' => true ], 'noindex' => [ 'type' => 'boolean', 'default' => false ], 'nofollow' => [ 'type' => 'boolean', 'default' => false ], 'noarchive' => [ 'type' => 'boolean', 'default' => false ], 'noimageindex' => [ 'type' => 'boolean', 'default' => false ], 'notranslate' => [ 'type' => 'boolean', 'default' => false ], 'nosnippet' => [ 'type' => 'boolean', 'default' => false ], 'noodp' => [ 'type' => 'boolean', 'default' => false ], 'maxSnippet' => [ 'type' => 'number', 'default' => -1 ], 'maxVideoPreview' => [ 'type' => 'number', 'default' => -1 ], 'maxImagePreview' => [ 'type' => 'string', 'default' => 'large' ] ], 'showDateInGooglePreview' => [ 'type' => 'boolean', 'default' => true ], 'showPostThumbnailInSearch' => [ 'type' => 'boolean', 'default' => true ], 'showMetaBox' => [ 'type' => 'boolean', 'default' => true ] ] ]; // phpcs:enable WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound } /** * Sets the dynamic social settings for a given post type or taxonomy. * * @since 4.1.4 * * @param string $objectType Whether the object belongs to the dynamic "postTypes" or "taxonomies". * @param string $objectName The object name. * @return void */ protected function setDynamicSocialOptions( $objectType, $objectName ) { $defaultOptions = [ 'objectType' => [ 'type' => 'string', 'default' => 'article' ] ]; $this->defaults['social']['facebook']['general'][ $objectType ][ $objectName ] = $defaultOptions; } /** * Sets the dynamic sitemap settings for a given post type or taxonomy. * * @since 4.1.4 * * @param string $objectType Whether the object belongs to the dynamic "postTypes" or "taxonomies". * @param string $objectName The object name. * @return void */ protected function setDynamicSitemapOptions( $objectType, $objectName ) { $this->defaults['sitemap']['priority'][ $objectType ][ $objectName ] = [ 'priority' => [ 'type' => 'string', 'default' => '{"label":"default","value":"default"}' ], 'frequency' => [ 'type' => 'string', 'default' => '{"label":"default","value":"default"}' ] ]; } }