• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / b51d845f89fe206089fb5db4f0ce36d8be6498bf

17 Feb 2026 11:03AM UTC coverage: 53.676%. First build
b51d845f89fe206089fb5db4f0ce36d8be6498bf

push

github

web-flow
Merge pull request #22973 from Yoast/feature/schema_aggregator

Merges `feature/schema-aggregation` to `trunk`

8863 of 16393 branches covered (54.07%)

Branch coverage included in aggregate %.

763 of 1164 new or added lines in 65 files covered. (65.55%)

33819 of 63125 relevant lines covered (53.57%)

47395.23 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/schema-aggregator/infrastructure/schema_map/schema-map-config.php
1
<?php
2
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
3
namespace Yoast\WP\SEO\Schema_Aggregator\Infrastructure\Schema_Map;
4

5
/**
6
 * Configuration for the Schema Map.
7
 */
8
class Schema_Map_Config {
9

10
        private const ALLOWED_FREQUENCIES = [
11
                'always',
12
                'hourly',
13
                'daily',
14
                'weekly',
15
                'monthly',
16
                'yearly',
17
                'never',
18
        ];
19

20
        /**
21
         * Get changefreq value from configuration
22
         *
23
         * @return string Valid changefreq value (always|hourly|daily|weekly|monthly|yearly|never).
24
         */
NEW
25
        public function get_changefreq(): string {
×
NEW
26
                $changefreq = \apply_filters( 'wpseo_schema_aggregator_schemamap_changefreq', 'daily' );
×
27

NEW
28
                if ( ! \in_array( $changefreq, self::ALLOWED_FREQUENCIES, true ) ) {
×
NEW
29
                        return 'daily';
×
30
                }
31

NEW
32
                return $changefreq;
×
33
        }
34

35
        /**
36
         * Get priority value from configuration
37
         *
38
         * @return string Priority value as string (float between 0.0 and 1.0).
39
         */
NEW
40
        public function get_priority(): string {
×
NEW
41
                $priority = \apply_filters( 'wpseo_schema_aggregator_schemamap_priority', '0.8' );
×
42

NEW
43
                $priority_float = \is_numeric( $priority ) ? (float) $priority : 0.8;
×
44

NEW
45
                if ( $priority_float < 0.0 || $priority_float > 1.0 ) {
×
NEW
46
                        return '0.8';
×
47
                }
48

NEW
49
                return \number_format( $priority_float, 1, '.', '' );
×
50
        }
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc