Rest_Api::notice()
HTML for the notice when we have blocked REST API endpoints.
Return
(false|string)
Source
File: src/Events/Admin/Notice/Rest_Api.php
public function notice() {
if ( ! current_user_can( 'activate_plugins' ) ) {
return false;
}
$output = sprintf(
/* translators: %1$s and %2$s - opening and closing strong tags, respectively. */
__( '%1$sWarning%2$s: The Events Calendar REST API endpoints are not accessible! This may be due to a server configuration or another plugin blocking access to the REST API.', 'the-events-calendar' ),
'<strong>',
'</strong>'
);
$output .= '<br />';
$output .= __( 'Please check with your hosting provider or system administrator to ensure that the below is accessible:', 'the-events-calendar' );
$output .= '<br />';
$output .= '<a href="' . $this->blocked_endpoint . '" target="_blank">' . $this->blocked_endpoint . '</a>';
return $output;
}
Changelog
| Version | Description |
|---|---|
| 6.5.0 | Introduced. |