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

Yoast / wordpress-seo / 6987097851

25 Nov 2023 04:49AM UTC coverage: 49.206% (-0.1%) from 49.302%
6987097851

push

github

web-flow
Merge pull request #20878 from Yoast/JRF/ghactions-minor-tweak

GH Actions: update a few links in inline comments

15305 of 31104 relevant lines covered (49.21%)

4.03 hits per line

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

0.0
/src/config/schema-types.php
1
<?php
2

3
namespace Yoast\WP\SEO\Config;
4

5
/**
6
 * Class Schema_Types.
7
 */
8
class Schema_Types {
9

10
        /**
11
         * Holds the possible schema page types.
12
         *
13
         * Capitalized in this way so the value can be directly used in the schema output.
14
         *
15
         * @var string[]
16
         */
17
        const PAGE_TYPES = [
18
                'WebPage'           => '',
19
                'ItemPage'          => '',
20
                'AboutPage'         => '',
21
                'FAQPage'           => '',
22
                'QAPage'            => '',
23
                'ProfilePage'       => '',
24
                'ContactPage'       => '',
25
                'MedicalWebPage'    => '',
26
                'CollectionPage'    => '',
27
                'CheckoutPage'      => '',
28
                'RealEstateListing' => '',
29
                'SearchResultsPage' => '',
30
        ];
31

32
        /**
33
         * Holds the possible schema article types.
34
         *
35
         * Capitalized in this way so the value can be directly used in the schema output.
36
         *
37
         * @var string[]
38
         */
39
        const ARTICLE_TYPES = [
40
                'Article'                  => '',
41
                'BlogPosting'              => '',
42
                'SocialMediaPosting'       => '',
43
                'NewsArticle'              => '',
44
                'AdvertiserContentArticle' => '',
45
                'SatiricalArticle'         => '',
46
                'ScholarlyArticle'         => '',
47
                'TechArticle'              => '',
48
                'Report'                   => '',
49
                'None'                     => '',
50
        ];
51

52
        /**
53
         * Gets the page type options.
54
         *
55
         * @return array[] The schema page type options.
56
         */
57
        public function get_page_type_options() {
×
58
                return [
59
                        [
60
                                'name'  => \__( 'Web Page', 'wordpress-seo' ),
×
61
                                'value' => 'WebPage',
×
62
                        ],
63
                        [
64
                                'name'  => \__( 'Item Page', 'wordpress-seo' ),
×
65
                                'value' => 'ItemPage',
×
66
                        ],
67
                        [
68
                                'name'  => \__( 'About Page', 'wordpress-seo' ),
×
69
                                'value' => 'AboutPage',
×
70
                        ],
71
                        [
72
                                'name'  => \__( 'FAQ Page', 'wordpress-seo' ),
×
73
                                'value' => 'FAQPage',
×
74
                        ],
75
                        [
76
                                'name'  => \__( 'QA Page', 'wordpress-seo' ),
×
77
                                'value' => 'QAPage',
×
78
                        ],
79
                        [
80
                                'name'  => \__( 'Profile Page', 'wordpress-seo' ),
×
81
                                'value' => 'ProfilePage',
×
82
                        ],
83
                        [
84
                                'name'  => \__( 'Contact Page', 'wordpress-seo' ),
×
85
                                'value' => 'ContactPage',
×
86
                        ],
87
                        [
88
                                'name'  => \__( 'Medical Web Page', 'wordpress-seo' ),
×
89
                                'value' => 'MedicalWebPage',
×
90
                        ],
91
                        [
92
                                'name'  => \__( 'Collection Page', 'wordpress-seo' ),
×
93
                                'value' => 'CollectionPage',
×
94
                        ],
95
                        [
96
                                'name'  => \__( 'Checkout Page', 'wordpress-seo' ),
×
97
                                'value' => 'CheckoutPage',
×
98
                        ],
99
                        [
100
                                'name'  => \__( 'Real Estate Listing', 'wordpress-seo' ),
×
101
                                'value' => 'RealEstateListing',
×
102
                        ],
103
                        [
104
                                'name'  => \__( 'Search Results Page', 'wordpress-seo' ),
×
105
                                'value' => 'SearchResultsPage',
×
106
                        ],
107
                ];
108
        }
109

110
        /**
111
         * Gets the article type options.
112
         *
113
         * @return array[] The schema article type options.
114
         */
115
        public function get_article_type_options() {
×
116
                /**
117
                 * Filter: 'wpseo_schema_article_types_labels' - Allow developers to filter the available article types and their labels.
118
                 *
119
                 * Make sure when you filter this to also filter `wpseo_schema_article_types`.
120
                 *
121
                 * @api array $schema_article_types_labels The available schema article types and their labels.
122
                 */
123
                return \apply_filters(
×
124
                        'wpseo_schema_article_types_labels',
×
125
                        [
126
                                [
127
                                        'name'  => \__( 'Article', 'wordpress-seo' ),
×
128
                                        'value' => 'Article',
×
129
                                ],
130
                                [
131
                                        'name'  => \__( 'Blog Post', 'wordpress-seo' ),
×
132
                                        'value' => 'BlogPosting',
×
133
                                ],
134
                                [
135
                                        'name'  => \__( 'Social Media Posting', 'wordpress-seo' ),
×
136
                                        'value' => 'SocialMediaPosting',
×
137
                                ],
138
                                [
139
                                        'name'  => \__( 'News Article', 'wordpress-seo' ),
×
140
                                        'value' => 'NewsArticle',
×
141
                                ],
142
                                [
143
                                        'name'  => \__( 'Advertiser Content Article', 'wordpress-seo' ),
×
144
                                        'value' => 'AdvertiserContentArticle',
×
145
                                ],
146
                                [
147
                                        'name'  => \__( 'Satirical Article', 'wordpress-seo' ),
×
148
                                        'value' => 'SatiricalArticle',
×
149
                                ],
150
                                [
151
                                        'name'  => \__( 'Scholarly Article', 'wordpress-seo' ),
×
152
                                        'value' => 'ScholarlyArticle',
×
153
                                ],
154
                                [
155
                                        'name'  => \__( 'Tech Article', 'wordpress-seo' ),
×
156
                                        'value' => 'TechArticle',
×
157
                                ],
158
                                [
159
                                        'name'  => \__( 'Report', 'wordpress-seo' ),
×
160
                                        'value' => 'Report',
×
161
                                ],
162
                                [
163
                                        'name'  => \__( 'None', 'wordpress-seo' ),
×
164
                                        'value' => 'None',
×
165
                                ],
166
                        ]
167
                );
168
        }
169

170
        /**
171
         * Gets the values of the article type options.
172
         *
173
         * @deprecated 19.12
174
         * @codeCoverageIgnore
175
         *
176
         * @return array[] The values of the Schema article type options.
177
         */
178
        public function get_article_type_options_values() {
179
                \_deprecated_function( __METHOD__, 'Yoast SEO 19.12' );
180
                $article_types       = $this->get_article_type_options();
181
                $article_type_values = [];
182

183
                foreach ( $article_types as $type ) {
184
                        $article_type_values[] = $type['value'];
185
                }
186

187
                return $article_type_values;
188
        }
189
}
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