LLMS_Admin_User_Custom_Fields::__construct()

Constructor


Description Description


Return Return

(void)


Top ↑

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' ) );

		// Add personal options.
		add_action( 'personal_options', array( $this, 'output_personal_options' ) );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
4.14.0 Add personal options hook.
3.13.0 Unknown.
2.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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