learndash_usermeta_shortcode( array $attr = array(), string $content = '', string $shortcode_slug = 'usermeta' )
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 #
- $attr
-
(array) (Optional) An array of shortcode attributes.
- 'field'
(string) The usermeta field to show - 'user_id'
(int) User ID. Default current user ID.
Default value: array()
- 'field'
- $content
-
(string) (Optional) The shortcode content.
Default value: ''
- $shortcode_slug
-
(string) (Optional) The shortcode slug.
Default value: 'usermeta'
Return #
(string) output of shortcode
Source #
Changelog #
Version | Description |
---|---|
2.1.0 | Introduced. |