LLMS_Student_Dashboard::modify_dashboard_title( string $title )

Handle modification of the default dashboard title for certain pages and sub pages


Parameters Parameters

$title

(string) (Required) default title HTML


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/class.llms.student.dashboard.php

289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
    $tabs = self::get_tabs();
    if ( isset( $tabs[ $endpoint ] ) && ! empty( $tabs[ $endpoint ]['endpoint'] ) ) {
        return true;
    }
 
    return false;
 
}
 
/**
 * Handle modification of the default dashboard title for certain pages and sub pages
 *
 * @param    string $title  default title HTML
 * @return   string
 * @since    3.24.0
 * @version  3.24.0
 */
public function modify_dashboard_title( $title ) {
 
    global $wp_query;
    $tab = self::get_current_tab( 'tab' );
 
    if ( 'my-grades' === $tab && ! empty( $wp_query->query['my-grades'] ) ) {
 
        $course = get_posts(
            array(
                'name'      => $wp_query->query['my-grades'],
                'post_type' => 'course',
            )


Top ↑

Changelog Changelog

Changelog
Version Description
3.24.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.