Post.php
25 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\TableScreen\TableRows; |
| 6 | |
| 7 | use AC\Request; |
| 8 | use AC\TableScreen\TableRows; |
| 9 | |
| 10 | final class Post extends TableRows |
| 11 | { |
| 12 | public function register(): void |
| 13 | { |
| 14 | add_action('edit_posts_per_page', [$this, 'handle_request']); |
| 15 | } |
| 16 | |
| 17 | public function handle_request(): void |
| 18 | { |
| 19 | remove_action('edit_posts_per_page', [$this, __FUNCTION__]); |
| 20 | |
| 21 | parent::handle(new Request()); |
| 22 | } |
| 23 | |
| 24 | } |
| 25 |