As per issue #1150988: Block for search filters based on custom fields displaying field keys instead of labels, it would make a more robust API to allow for options to be passed the the map callback.

Comments

cpliakas’s picture

Status: Active » Needs review
StatusFileSize
new1.67 KB

The attached patch adds the functionality.

pwolanin’s picture

StatusFileSize
new1.56 KB

I came up with nearly the same myself, but not using call_user_func_array() which is a bit slower than directly invoking with the params.

pwolanin’s picture

StatusFileSize
new1.58 KB

Actually, for consistency, we should use call_user_func() both places, which allows then the callback to be an array specifying a class or instance + method.

cpliakas’s picture

Status: Needs review » Reviewed & tested by the community

#3 looks good to me. Commit when ready.

pwolanin’s picture

Status: Reviewed & tested by the community » Fixed

committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.