LLMS_Admin_User_Custom_Fields::__construct()

Constructor


Description Description


Source Source

File: includes/admin/class.llms.admin.user.custom.fields.php

	public function __construct() {

		// output custom fields on edit screens
		$field_actions = array(
			'show_user_profile',
			'edit_user_profile',
			'user_new_form',
		);
		foreach ( $field_actions as $action ) {
			add_action( $action, array( $this, 'output_custom_fields' ), 10, 1 );
			add_action( $action, array( $this, 'output_instructors_assistant_fields' ), 10, 1 );
		}

		// allow errors to be output before saving field data
		// save the data if no errors are encountered
		add_action( 'user_profile_update_errors', array( $this, 'add_errors' ), 10, 3 );

		// save data when a new user is created
		add_action( 'edit_user_created_user', array( $this, 'save' ) );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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