From e803b1d3d6489fe2063a301c862778d16f8c7f11 Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Sat, 21 Nov 2015 18:37:14 +0800 Subject: [PATCH] Added field type and select options filter hooks --- core/um-fields.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/um-fields.php b/core/um-fields.php index 5e803a9a..71067263 100644 --- a/core/um-fields.php +++ b/core/um-fields.php @@ -919,6 +919,8 @@ class UM_Fields { } } + $type = apply_filters("um_hook_for_field_{$type}", $type ); + /* Begin by field type */ switch( $type ) { @@ -1459,6 +1461,8 @@ class UM_Fields { if (!isset($options)){ $options = $ultimatemember->builtin->get ( 'countries' ); } + + // role field if ( $form_key == 'role' ) { @@ -1476,6 +1480,8 @@ class UM_Fields { $options = $new_roles; } + $options = apply_filters("um_multiselect_options_{$data['type']}", $options, $data ); + // add an empty option! $output .= '';