Skip to content

Instantly share code, notes, and snippets.

@wbcomdev
Created September 16, 2024 14:04
Show Gist options
  • Select an option

  • Save wbcomdev/067fac13e7ff296f6c73caffe1a4b4b2 to your computer and use it in GitHub Desktop.

Select an option

Save wbcomdev/067fac13e7ff296f6c73caffe1a4b4b2 to your computer and use it in GitHub Desktop.
change-ld-dashboard-in-loggedout-mode.php
<?php
add_filter('gettext', 'remove_admin_stuff', 20, 3);
/**
* Remove the text at the bottom of the Custom fields box in WordPress Post/Page Editor.
*
* @link https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function remove_admin_stuff( $translated_text, $untranslated_text, $domain ) {
$ld_dashboard_logout_message = 'Please try to login to website to access dashboard. Dashboard are disabled for logout members. ';
if ( 'ld-dashboard' === $domain && $untranslated_text == $ld_dashboard_logout_message ) {
$translated_text = ' Your message goes here';
}
return $translated_text;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment