← All changes
|
includes/api/class-content-type-matrix-endpoint.php
+7
-0
2.11.0
→
2.14.0
View file →
| @@ -130,8 +130,14 @@ | ||
| 130 | 130 | |
| 131 | 131 | $entity['values'] = $values; |
| 132 | 132 | $entity['robots_meta_enabled'] = !empty($stored['robots_meta_enabled']); |
| 133 | 133 | $entity['robots_meta'] = Content_Type_Settings::resolve_robots_meta($entity['key']); |
| 134 | + // What the row falls back to with the pin off, so the matrix can | |
| 135 | + // label its Inherit option per row rather than guessing. It is not | |
| 136 | + // the same for every row: search and 404 default to noindex (#838). | |
| 137 | + $entity['default_noindex'] = !empty( | |
| 138 | + Content_Type_Settings::default_robots_meta($entity['key'])['noindex'] | |
| 139 | + ); | |
| 134 | 140 | $entity['sitemap_include'] = $entity['supports_sitemap'] |
| 135 | 141 | ? Content_Type_Settings::is_included_in_sitemap($entity['group'], $entity['object'], $sitemap_settings) |
| 136 | 142 | : null; |
| 137 | 143 | |
| @@ -220,8 +226,9 @@ | ||
| 220 | 226 | array_flip(Content_Type_Settings::FEATURES) |
| 221 | 227 | ), |
| 222 | 228 | 'robots_meta_enabled' => !empty(Content_Type_Settings::get_entity_settings($entity_key)['robots_meta_enabled']), |
| 223 | 229 | 'robots_meta' => Content_Type_Settings::resolve_robots_meta($entity_key), |
| 230 | + 'default_noindex' => !empty(Content_Type_Settings::default_robots_meta($entity_key)['noindex']), | |
| 224 | 231 | 'sitemap_include' => $descriptor['supports_sitemap'] |
| 225 | 232 | ? Content_Type_Settings::is_included_in_sitemap($descriptor['group'], $descriptor['object'], $sitemap_settings) |
| 226 | 233 | : null, |
| 227 | 234 | ], |