Skip to content

Instantly share code, notes, and snippets.

@iamcanadian1973
Created December 16, 2019 19:53
Show Gist options
  • Save iamcanadian1973/d8e51bf327218059d481ce4e28e3bf26 to your computer and use it in GitHub Desktop.
Save iamcanadian1973/d8e51bf327218059d481ce4e28e3bf26 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'wpfront_notification_bar_message', function( $message ) {
$message = apply_filters( 'wpml_translate_single_string', $message, 'admin_texts_wpfront-notification-bar-options', '[wpfront-notification-bar-options]message', apply_filters( 'wpml_current_language', NULL ) );
return $message;
});
add_filter( 'wpfront_notification_bar_button_text', function( $button_text ) {
$button_text = apply_filters( 'wpml_translate_single_string', $button_text, 'admin_texts_wpfront-notification-bar-options', '[wpfront-notification-bar-options]button_text', apply_filters( 'wpml_current_language', NULL ) );
return $button_text;
});
add_filter( 'wpfront_notification_bar_button_action_url', function( $button_action_url ) {
$button_action_url = apply_filters( 'wpml_translate_single_string', $button_action_url, 'admin_texts_wpfront-notification-bar-options', '[wpfront-notification-bar-options]button_action_url', apply_filters( 'wpml_current_language', NULL ) );
return $button_action_url;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment