| Server IP : 151.101.66.159 / Your IP : 216.73.216.66 Web Server : Flywheel/5.1.0 System : Linux wordpress 6.12.113+ #1 SMP Thu Oct 22 02:38:20 UTC 2026 x86_64 User : root ( ) PHP Version : 7.4.33.18 Disable Function : disk_free_space,diskfreespace,dl,exec,fpassthru,getmypid,getmyuid,highlight_file,link,opcache_compile_file,opcache_get_configuration,opcache_is_script_cached,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifcontinued,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,phpinfo,popen,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,socket_listen,source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wp-content/plugins/wordpress-seo/src/presenters/admin/ |
Upload File : |
<?php
namespace Yoast\WP\SEO\Presenters\Admin;
use WPSEO_Shortlinker;
use Yoast\WP\SEO\Presenters\Abstract_Presenter;
/**
* Presenter class for the migration error.
*/
class Migration_Error_Presenter extends Abstract_Presenter {
/**
* Holds the migration error.
*
* The array holds the following values if filled:
* - int|false $time The timestamp.
* - string $version The Yoast SEO version.
* - string $message The error message.
*
* @var array
*/
protected $migration_error;
/**
* Migration_Error_Presenter constructor.
*
* @param array $migration_error The migration error.
*/
public function __construct( $migration_error ) {
$this->migration_error = $migration_error;
}
/**
* Presents the migration error that occurred.
*
* @return string The error HTML.
*/
public function present() {
$header = \sprintf(
/* translators: %s: Yoast SEO. */
\esc_html__( '%s is unable to create database tables', 'wordpress-seo' ),
'Yoast SEO',
);
$message = \sprintf(
/* translators: %s: Yoast SEO. */
\esc_html__( '%s had problems creating the database tables needed to speed up your site.', 'wordpress-seo' ),
'Yoast SEO',
);
$support = \sprintf(
/* translators: %1$s: link to help article about solving table issue. %2$s: is anchor closing. */
\esc_html__( 'Please read %1$sthis help article%2$s to find out how to resolve this problem.', 'wordpress-seo' ),
'<a href="' . WPSEO_Shortlinker::get( 'https://yoa.st/3-6' ) . '">',
'</a>',
);
$reassurance = \sprintf(
/* translators: %s: Yoast SEO. */
\esc_html__( 'Your site will continue to work normally, but won\'t take full advantage of %s.', 'wordpress-seo' ),
'Yoast SEO',
);
$debug_info = \sprintf(
'<details><summary>%1$s</summary><p>%2$s</p></details>',
\esc_html__( 'Show debug information', 'wordpress-seo' ),
\esc_html( $this->migration_error['message'] ),
);
return \sprintf(
'<div class="notice notice-error yoast-migrated-notice"><h4 class="yoast-notice-migrated-header">%1$s</h4><div class="notice-yoast-content"><p>%2$s</p><p>%3$s</p><p>%4$s</p>%5$s</div></div>',
$header,
$message,
$support,
$reassurance,
$debug_info,
);
}
}