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

Yoast / wordpress-seo / ff7fbe548e11c03015095d039b28d1168b751857

16 Feb 2026 01:09AM UTC coverage: 52.986%. Remained the same
ff7fbe548e11c03015095d039b28d1168b751857

push

github

web-flow
Merge pull request #22987 from Yoast/JRF/modernize-use-trailing-commas-in-function-calls

Modernize: use trailing comma in multi-line function call

8482 of 15955 branches covered (53.16%)

Branch coverage included in aggregate %.

396 of 875 new or added lines in 311 files covered. (45.26%)

21 existing lines in 12 files now uncovered.

32462 of 61318 relevant lines covered (52.94%)

48791.32 hits per line

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

0.0
/src/integrations/blocks/abstract-dynamic-block.php
1
<?php
2

3
namespace Yoast\WP\SEO\Integrations\Blocks;
4

5
use Yoast\WP\SEO\Integrations\Integration_Interface;
6

7
/**
8
 * Dynamic_Block class.
9
 */
10
abstract class Dynamic_Block implements Integration_Interface {
11

12
        /**
13
         * The name of the block.
14
         *
15
         * @var string
16
         */
17
        protected $block_name;
18

19
        /**
20
         * The editor script for the block.
21
         *
22
         * @var string
23
         */
24
        protected $script;
25

26
        /**
27
         * {@inheritDoc}
28
         */
29
        public static function get_conditionals() {
×
30
                return [];
×
31
        }
32

33
        /**
34
         * {@inheritDoc}
35
         */
36
        public function register_hooks() {
×
37
                \add_action( 'init', [ $this, 'register_block' ], 11 );
×
38
        }
39

40
        /**
41
         * Registers the block.
42
         *
43
         * @return void
44
         */
45
        public function register_block() {
×
46
                \register_block_type(
×
47
                        'yoast-seo/' . $this->block_name,
×
48
                        [
×
49
                                'editor_script'   => $this->script,
×
50
                                'render_callback' => [ $this, 'present' ],
×
51
                                'attributes'      => [
×
52
                                        'className' => [
×
53
                                                'default' => '',
×
54
                                                'type'    => 'string',
×
55
                                        ],
×
56
                                ],
×
NEW
57
                        ],
×
58
                );
×
59
        }
60

61
        /**
62
         * Presents the block output. This is abstract because in the loop we need to be able to build the data for the
63
         * presenter in the last moment.
64
         *
65
         * @param array $attributes The block attributes.
66
         *
67
         * @return string The block output.
68
         */
69
        abstract public function present( $attributes );
70
}
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