Browse: Home / Functions /

learndash_student_check_shortcode

learndash_student_check_shortcode( array $atts = array(),  string|null $content = '' )

Builds the [student] shortcode output.


Description #

Shortcode to display content to users that have access to current course ID.


Parameters #

$atts

(array) (Optional) An array of shortcode attributes.

  • 'course_id'
    (int) Course ID. Default current course ID.
  • 'user_id'
    (int) User ID. Default current user ID.
  • 'content'
    (string) The shortcode content. Default null.
  • 'autop'
    (boolean) Whether to replace linebreaks with paragraph elements. Default true.

Default value: array()

$content

(string|null) (Optional) The shortcode content. Default null

Default value: ''


Return #

(string) The student shortcode output.


Source #

File: includes/shortcodes/ld_student.php


Changelog #

Changelog
Version Description
2.1.0 Introduced.