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

Yoast / wordpress-seo / 5066322038

pending completion
5066322038

push

github

GitHub
Merge pull request #20316 from Yoast/JRF/ghactions-run-more-selectively

2550 of 29012 relevant lines covered (8.79%)

0.32 hits per line

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

0.0
/src/integrations/estimated-reading-time.php
1
<?php
2

3
namespace Yoast\WP\SEO\Integrations;
4

5
use Yoast\WP\SEO\Conditionals\Admin\Estimated_Reading_Time_Conditional;
6

7
/**
8
 * Estimated reading time class.
9
 */
10
class Estimated_Reading_Time implements Integration_Interface {
11

12
        /**
13
         * Returns the conditionals based in which this loadable should be active.
14
         *
15
         * @return array
16
         */
17
        public static function get_conditionals() {
18
                return [ Estimated_Reading_Time_Conditional::class ];
×
19
        }
20

21
        /**
22
         * Initializes the integration.
23
         *
24
         * This is the place to register hooks and filters.
25
         *
26
         * @return void
27
         */
28
        public function register_hooks() {
29
                \add_filter( 'wpseo_metabox_entries_general', [ $this, 'add_estimated_reading_time_hidden_fields' ] );
×
30
        }
31

32
        /**
33
         * Adds an estimated-reading-time hidden field.
34
         *
35
         * @param array $field_defs The $fields_defs.
36
         *
37
         * @return array
38
         */
39
        public function add_estimated_reading_time_hidden_fields( $field_defs ) {
40
                if ( \is_array( $field_defs ) ) {
×
41
                        $field_defs['estimated-reading-time-minutes'] = [
×
42
                                'type'  => 'hidden',
×
43
                                'title' => 'estimated-reading-time-minutes',
×
44
                        ];
×
45
                }
46

47
                return $field_defs;
×
48
        }
49
}
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