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

Yoast / duplicate-post / 21585647278

02 Feb 2026 10:03AM UTC coverage: 57.637% (+1.3%) from 56.353%
21585647278

Pull #446

github

web-flow
Merge 32577c39e into b42549481
Pull Request #446: Use a sidebar panel instead of the metabox in the block editor

68 of 86 new or added lines in 6 files covered. (79.07%)

1 existing line in 1 file now uncovered.

1517 of 2632 relevant lines covered (57.64%)

7.32 hits per line

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

0.0
/src/handlers/handler.php
1
<?php
2

3
namespace Yoast\WP\Duplicate_Post\Handlers;
4

5
use Yoast\WP\Duplicate_Post\Permissions_Helper;
6
use Yoast\WP\Duplicate_Post\Post_Duplicator;
7

8
/**
9
 * Duplicate Post handler class for duplication actions.
10
 *
11
 * @since 4.0
12
 */
13
class Handler {
14

15
        /**
16
         * Post_Duplicator object.
17
         *
18
         * @var Post_Duplicator
19
         */
20
        protected $post_duplicator;
21

22
        /**
23
         * Holds the permissions helper.
24
         *
25
         * @var Permissions_Helper
26
         */
27
        protected $permissions_helper;
28

29
        /**
30
         * The bulk actions handler.
31
         *
32
         * @var Bulk_Handler
33
         */
34
        protected $bulk_handler;
35

36
        /**
37
         * The link actions handler.
38
         *
39
         * @var Link_Handler
40
         */
41
        protected $link_handler;
42

43
        /**
44
         * The save_post action handler.
45
         *
46
         * @var Save_Post_Handler
47
         */
48
        protected $save_post_handler;
49

50
        /**
51
         * The link actions handler.
52
         *
53
         * @var Check_Changes_Handler
54
         */
55
        protected $check_handler;
56

57
        /**
58
         * The REST API handler.
59
         *
60
         * @var Rest_API_Handler
61
         */
62
        protected $rest_api_handler;
63

64
        /**
65
         * Initializes the class.
66
         *
67
         * @param Post_Duplicator    $post_duplicator    The Post_Duplicator object.
68
         * @param Permissions_Helper $permissions_helper The Permissions Helper object.
69
         */
70
        public function __construct( Post_Duplicator $post_duplicator, Permissions_Helper $permissions_helper ) {
×
71
                $this->post_duplicator    = $post_duplicator;
×
72
                $this->permissions_helper = $permissions_helper;
×
73

74
                $this->bulk_handler      = new Bulk_Handler( $this->post_duplicator, $this->permissions_helper );
×
75
                $this->link_handler      = new Link_Handler( $this->post_duplicator, $this->permissions_helper );
×
76
                $this->check_handler     = new Check_Changes_Handler( $this->permissions_helper );
×
77
                $this->save_post_handler = new Save_Post_Handler( $this->permissions_helper );
×
NEW
78
                $this->rest_api_handler  = new Rest_API_Handler( $this->permissions_helper );
×
79

80
                $this->bulk_handler->register_hooks();
×
81
                $this->link_handler->register_hooks();
×
82
                $this->check_handler->register_hooks();
×
83
                $this->save_post_handler->register_hooks();
×
NEW
84
                $this->rest_api_handler->register_hooks();
×
85
        }
86
}
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