*/ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } class Opalestate_Field_Adduser { /** * Current version number */ const VERSION = '1.0.0'; /** * Initialize the plugin by hooking into CMB2 */ public static function init() { add_filter( 'cmb2_render_adduser', [ __CLASS__, 'render_map' ], 10, 5 ); add_filter( 'cmb2_sanitize_adduser', [ __CLASS__, 'sanitize_map' ], 10, 4 ); } /** * Render field */ public static function render_map( $field, $field_escaped_value, $field_object_id, $field_object_type, $field_type_object ) { self::setup_admin_scripts(); $users = $field->value; echo '