Browse: Home / Functions /

learndash_student_check_shortcode

learndash_student_check_shortcode( array $atts = array(),  string $content = '',  string $shortcode_slug = 'student' )

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 line breaks with paragraph elements. Default true.

Default value: array()

$content

(string) (Optional) The shortcode content.

Default value: ''

$shortcode_slug

(string) (Optional) The shortcode slug.

Default value: 'student'


Return #

(string) The student shortcode output.


Source #

File: includes/shortcodes/ld_student.php


Changelog #

Changelog
Version Description
2.1.0 Introduced.