Skip to content
This repository was archived by the owner on Dec 2, 2022. It is now read-only.

Commit 7a9f1de

Browse files
committed
Fully functional select2 with class callback now.
1 parent cd6951c commit 7a9f1de

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

redux-core/inc/classes/class-redux-wordpress-data.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,10 +474,9 @@ private function get_data( $type, $args, $current_value ) {
474474
break;
475475

476476
case 'callback':
477-
if ( ! is_array( $args ) ) {
478-
$args = array( $args );
477+
if ( ! empty( $args ) ) {
478+
$data = call_user_func( $args, $current_value );
479479
}
480-
$data = call_user_func( $args[0], $current_value );
481480
break;
482481
}
483482

0 commit comments

Comments
 (0)