af/field/before_render – Documentation is misleading
-
Hey!
In the documentation is an example how to use the filter
af/field/before_render
.function modify_field( $field, $form, $args ) { $field['label'] = 'New field label'; return $field; }
I think that’s misleading, I thought I can change the label of the field.
But that’s not possible, because the filter is called after the label is printed.
See form-rendering.php:
At line 470 is the print function for the label.
At line 480 the filters were called.I need to change label for a single field. Is this possible in anyway?
Besides the documentation for the “before_render” filter is still wrong as I mentioned here.
And another question: Do you prefer reporting issues like that here at www.ads-software.com or at Github?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘af/field/before_render – Documentation is misleading’ is closed to new replies.