tec_automator_show_fail_message( $message = null )
Shows a message to indicate the plugin cannot be loaded due to missing requirements.
Source
File: src/functions/load.php
function tec_automator_show_fail_message() {
if ( ! current_user_can( 'activate_plugins' ) ) {
return;
}
tec_automator_load_text_domain();
$url_tec = 'plugin-install.php?tab=plugin-information&plugin=the-events-calendar&TB_iframe=true';
$url_et = 'plugin-install.php?tab=plugin-information&plugin=event-tickets&TB_iframe=true';
$message = sprintf(
'%1s <a href="%2s" class="thickbox" title="%3s">%3$s</a> or <a href="%4s" class="thickbox" title="%5s">%5$s</a>.',
esc_html_x(
'To begin using Event Automator, please install the latest version of',
'Instructions displayed when missing a required plugin for Event Automator to work.',
'event-automator'
),
esc_url( $url_tec ),
esc_html_x( 'The Events Calendar', 'Name of one of the required plugins for Event Automator to work.','event-automator' ),
esc_url( $url_et ),
esc_html_x( 'Event Tickets', 'Name of one of the required plugins for Event Automator to work.','event-automator' )
);
// The message HTML is escaped in the line above.
// phpcs:ignore
echo '<div class="error"><p>' . $message . '</p></div>';
}
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Include message as a param. |
| 1.0.0 | Introduced. |