- made hooks documentation;

- some optimizations and make single functions for some hooks;
This commit is contained in:
nikitozzzzzzz
2018-03-02 09:55:49 +02:00
parent 6fc6db7886
commit 3d19aa00b8
64 changed files with 7287 additions and 1790 deletions
+22
View File
@@ -148,6 +148,28 @@ if ( ! defined( 'ABSPATH' ) ) exit;
}
}
/**
* UM hook
*
* @type filter
* @title um_get_custom_field_array
* @description Extend custom field data on submit form error
* @input_vars
* [{"var":"$array","type":"array","desc":"Field data"},
* {"var":"$fields","type":"array","desc":"All fields"}]
* @change_log
* ["Since: 2.0"]
* @usage
* <?php add_filter( 'um_get_custom_field_array', 'function_name', 10, 2 ); ?>
* @example
* <?php
* add_filter( 'um_get_custom_field_array', 'my_get_custom_field_array', 10, 2 );
* function my_get_custom_field_array( $array, $fields ) {
* // your code here
* return $array;
* }
* ?>
*/
$array = apply_filters( 'um_get_custom_field_array', $array, $fields );
if ( ! empty( $array['conditions'] ) ) {