array(
'href' => true,
'title' => true,
),
'br',
'i',
);
/**
* Admin notice when the ActivityPub plugin is not enabled.
*
* @return string
*/
public static function get_admin_notice_activitypub_plugin_not_enabled(): string {
return sprintf(
/* translators: 1: the name of the event plugin a admin notice is shown. 2: The name of the ActivityPub plugin. */
_x(
'For the ActivityPub Event Extensions to work, you will need to install and activate the ActivityPub plugin.',
'admin notice',
'activitypub-event-extensions'
),
esc_html( self::ACTIVITYPUB_PLUGIN_URL ),
admin_url( 'options-general.php?page=activitypub&tab=settings' )
);
}
/**
* Warning that no supported event plugin can be found.
*
* @return string
*/
public static function get_admin_notice_no_supported_event_plugin_active(): string {
return sprintf(
/* translators: 1: the name of the event plugin a admin notice is shown. 2: The name of the ActivityPub plugin. */
_x(
'The Plugin ActivityPub Event Extensions is of no use, because you do not have installed and activated a supported Event Plugin.
For a list of supported Event Plugins see here.',
'admin notice',
'activitypub-event-extensions'
),
esc_html( self::ACTIVITYPUB_EVENT_EXTENSIONS_SUPPORTED_EVENT_PLUGINS_URL ),
admin_url( 'options-general.php?page=activitypub&tab=settings' )
);
}
/**
* Warning if the plugin is Active and the ActivityPub plugin is not.
*
* @return void
*/
public static function activitypub_plugin_not_enabled(): void {
$notice = self::get_admin_notice_activitypub_plugin_not_enabled();
echo '
' . \wp_kses( $notice, self::ALLOWED_HTML ) . '
' . \wp_kses( $notice, self::ALLOWED_HTML ) . '