• 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/presentations/indexable-static-posts-page-presentation.php
1
<?php
2

3
namespace Yoast\WP\SEO\Presentations;
4

5
use Yoast\WP\SEO\Helpers\Pagination_Helper;
6

7
/**
8
 * Class Indexable_Static_Posts_Page_Presentation.
9
 *
10
 * Presentation object for indexables.
11
 */
12
class Indexable_Static_Posts_Page_Presentation extends Indexable_Post_Type_Presentation {
13

14
        use Archive_Adjacent;
15

16
        /**
17
         * The pagination helper.
18
         *
19
         * @var Pagination_Helper
20
         */
21
        protected $pagination;
22

23
        /**
24
         * Generates the canonical.
25
         *
26
         * @return string The canonical.
27
         */
28
        public function generate_canonical() {
29
                if ( $this->model->canonical ) {
×
30
                        return $this->model->canonical;
×
31
                }
32

33
                $current_page = $this->pagination->get_current_archive_page_number();
×
34

35
                if ( $current_page > 1 ) {
×
36
                        return $this->pagination->get_paginated_url( $this->permalink, $current_page );
×
37
                }
38

39
                return $this->permalink;
×
40
        }
41

42
        /**
43
         * Generates the Open Graph URL.
44
         *
45
         * @return string The Open Graph URL.
46
         */
47
        public function generate_open_graph_url() {
48
                return $this->permalink;
×
49
        }
50
}
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