Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness. Use llms_merge_codes_for_button instead.
_llms_add_user_info_to_merge_buttons( array[] $codes, WP_Screen|null $screen )
Add [llms-user] shortcodes to email and certificate template editor instances.
Description Description
This is a callback function for the llms_merge_codes_for_button
filter.
See also See also
Parameters Parameters
- $codes
-
(array[]) (Required) Associative array of merge codes where the array key is the merge code and the array value is a name / description of the merge code.
- $screen
-
(WP_Screen|null) (Required) The screen object from `get_current_screen().
Return Return
(array[])
Source Source
File: includes/functions/llms-functions-user-information-fields.php
function _llms_add_user_info_to_merge_buttons( $codes, $screen ) { if ( $screen && ! empty( $screen->post_type ) && in_array( $screen->post_type, array( 'llms_certificate', 'llms_email' ), true ) ) { foreach ( llms_get_user_information_fields_for_editor() as $field ) { if ( 'password' === $field['id'] ) { continue; } if ( 'llms_billing_address_2' === $field['id'] ) { $field['label'] = __( 'Address Line 2', 'lifterlms' ); } $shortcode = "[llms-user {$field['data_store_key']}]"; $codes[ $shortcode ] = $field['label']; } } return $codes; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |