How to Add Custom Footer and Version Text in WordPress Admin Dashboard?

With the code below, we can customize the WordPress admin dashboard by replacing the default footer text and version text with any custom messages.

/**
 * Custom footer text.
 *
 * @return string The custom footer text.
 */
function ts_prefix_custom_admin_footer_text() {
    return 'Custom Footer Text';
}
add_filter( 'admin_footer_text', 'ts_prefix_custom_admin_footer_text' );
 
/**
 * Custom version text.
 *
 * @return string The custom version text.
 */
function ts_prefix_custom_admin_version_text() {
    return 'Custom Version Text';
}
add_filter( 'update_footer', 'ts_prefix_custom_admin_version_text', 20 );