Browse: Home / Functions /

learndash_usermeta_shortcode

learndash_usermeta_shortcode( $attr = array(),  string $content = '' )

Builds the [usermeta] shortcode output.


Description #

This shortcode takes a parameter named field, which is the name of the user meta data field to be displayed. Example: [usermeta field="display_name"] would display the user’s Display Name.


Parameters #

$atts

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

  • 'field'
    (string) The usermeta field to show
  • 'user_id'
    (int) User ID. Default current user ID.

$content

(string) (Optional) The shortcode content.

Default value: ''


Return #

(string) output of shortcode


Source #

File: includes/shortcodes/ld_usermeta.php


Changelog #

Changelog
Version Description
2.1.0 Introduced.