• LifterLMS
  • Knowledge Base
  • Academy
  • Blog
  • Podcast
  • Contributors
  • My Account

LifterLMS LifterLMS

  • Code Reference
  • REST API
  • LLMS-CLI
  • Changelog Subscribe

Code Reference

Skip to content
Filter by type:
Search
Browse: Home / Code Reference / Classes / LLMS_Shortcode_User_Info / LLMS_Shortcode_User_Info::set_attributes()

LLMS_Shortcode_User_Info::set_attributes( array $atts = array() )

Merge user attributes with default attributes.

Contents

  • Parameters
  • Return
  • Source
  • Related
    • Uses
  • Changelog
  • User Contributed Notes

Parameters #Parameters

$atts

(array) (Optional) User-submitted shortcode attributes.

Default value: array()


Top ↑

Return #Return

(array)


Top ↑

Source #Source

File: includes/shortcodes/class-llms-shortcode-user-info.php

	protected function set_attributes( $atts = array() ) {

		// Allow `key` attribute to be submitted without a key, eg: [llms-user first_name].
		if ( isset( $atts[0] ) ) {
			$atts['key'] = $atts[0];
			unset( $atts[0] );
		}

		return parent::set_attributes( $atts );

	}

Expand full source code Collapse full source code View on GitHub


Top ↑

Related #Related

Uses #Uses

Uses
Uses Description
includes/abstracts/abstract.llms.shortcode.php: LLMS_Shortcode::set_attributes()

Merge user attributes with default attributes.


Top ↑

Changelog #Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes #User Contributed Notes

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

© 2014 - 2025 LifterLMS · Privacy Policy · Terms and Conditions

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.