Last active
March 10, 2022 18:21
-
-
Save danielcharrua/7619e022c0ae8ef5c9a7ebb5937ee34b to your computer and use it in GitHub Desktop.
Change default LearDash tooltip message on lesson when course is closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Change lesson tooltip | |
* https://themespirit.com/kb/learndash-changing-tooltips/ | |
*/ | |
add_filter( 'learndash_lesson_row_atts', function( $data_tooltip, $lesson_id, $course_id, $user_id ) { | |
if ( ! empty( $data_tooltip ) ) { | |
$data_tooltip = 'data-ld-tooltip="' . esc_html__( "Actualmente no tienes acceso a este contenido. Por favor canjea el código.", 'learndash' ) . '"'; | |
} | |
return $data_tooltip; | |
}, 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment