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

Yoast / wordpress-seo / 6987097851

25 Nov 2023 04:49AM UTC coverage: 49.206% (-0.1%) from 49.302%
6987097851

push

github

web-flow
Merge pull request #20878 from Yoast/JRF/ghactions-minor-tweak

GH Actions: update a few links in inline comments

15305 of 31104 relevant lines covered (49.21%)

4.03 hits per line

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

92.86
/src/presenters/admin/migration-error-presenter.php
1
<?php
2

3
namespace Yoast\WP\SEO\Presenters\Admin;
4

5
use WPSEO_Shortlinker;
6
use Yoast\WP\SEO\Presenters\Abstract_Presenter;
7

8
/**
9
 * Presenter class for the migration error.
10
 */
11
class Migration_Error_Presenter extends Abstract_Presenter {
12

13
        /**
14
         * Holds the migration error.
15
         *
16
         * The array holds the following values if filled:
17
         * - int|false $time    The timestamp.
18
         * - string    $version The Yoast SEO version.
19
         * - string    $message The error message.
20
         *
21
         * @var array
22
         */
23
        protected $migration_error;
24

25
        /**
26
         * Migration_Error_Presenter constructor.
27
         *
28
         * @param array $migration_error The migration error.
29
         */
30
        public function __construct( $migration_error ) {
×
31
                $this->migration_error = $migration_error;
×
32
        }
33

34
        /**
35
         * Presents the migration error that occurred.
36
         *
37
         * @return string The error HTML.
38
         */
39
        public function present() {
2✔
40
                $message = \sprintf(
2✔
41
                        /* translators: %s: Yoast SEO. */
42
                        \esc_html__( '%s had problems creating the database tables needed to speed up your site.', 'wordpress-seo' ),
2✔
43
                        'Yoast SEO'
2✔
44
                );
1✔
45
                $support = \sprintf(
2✔
46
                        /* translators: %1$s: link to help article about solving table issue. %2$s: is anchor closing. */
47
                        \esc_html__( 'Please read %1$sthis help article%2$s to find out how to resolve this problem.', 'wordpress-seo' ),
2✔
48
                        '<a href="' . WPSEO_Shortlinker::get( 'https://yoa.st/3-6' ) . '">',
2✔
49
                        '</a>'
2✔
50
                );
1✔
51
                $reassurance = \sprintf(
2✔
52
                        /* translators: %s: Yoast SEO. */
53
                        \esc_html__( 'Your site will continue to work normally, but won\'t take full advantage of %s.', 'wordpress-seo' ),
2✔
54
                        'Yoast SEO'
2✔
55
                );
1✔
56

57
                $debug_info = \sprintf(
2✔
58
                        '<details><summary>%1$s</summary><p>%2$s</p></details>',
2✔
59
                        \esc_html__( 'Show debug information', 'wordpress-seo' ),
2✔
60
                        \esc_html( $this->migration_error['message'] )
2✔
61
                );
1✔
62

63
                return \sprintf(
2✔
64
                        '<div class="notice notice-error"><p>%1$s</p><p>%2$s</p><p>%3$s</p>%4$s</div>',
2✔
65
                        $message,
2✔
66
                        $support,
2✔
67
                        $reassurance,
2✔
68
                        $debug_info
2✔
69
                );
1✔
70
        }
71
}
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

© 2025 Coveralls, Inc