mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Filter to Enable options pair for Select fields
This commit is contained in:
@@ -2369,7 +2369,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
$output .= $this->field_error( $this->show_error( $key ) );
|
||||
}
|
||||
$output .= '</div>';
|
||||
|
||||
|
||||
break;
|
||||
|
||||
/* Select dropdown */
|
||||
@@ -2581,6 +2581,18 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
|
||||
$field_value = '';
|
||||
|
||||
/**
|
||||
* UM hook
|
||||
*
|
||||
* @type filter
|
||||
* @title um_select_option_value
|
||||
* @description Enable options pair by field $data
|
||||
* @input_vars
|
||||
* [{"var":"$options_pair","type":"null","desc":"Enable pairs"},
|
||||
* {"var":"$data","type":"array","desc":"Field Data"}]
|
||||
*/
|
||||
$options_pair = apply_filters( "um_select_options_pair", null, $data );
|
||||
|
||||
// switch options pair for custom options from a callback function
|
||||
if ( ! empty( $data['custom_dropdown_options_source'] ) ) {
|
||||
$options_pair = true;
|
||||
|
||||
Reference in New Issue
Block a user