Skip Navigation

[Resolved] CRED api question

This support ticket is created 8 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 8 years, 8 months ago.

Assigned support staff: Luo Yang.

Author
Posts
#276436

add_filter('cred_form_validate','my_validation',10,2);
add_action('cred_save_data', 'my_save_data_action',10,2);
add_action('cred_before_save_data', 'my_before_save_data_action',10,1);
add_filter('cred_success_redirect', 'custom_redirect',10,3);

What are these numbers represent?
10,2
10,1
10,3

#276705

They mean "priority" and "accepted_args", see the document:

http://codex.wordpress.org/Function_Reference/add_filter

$priority
(integer) (optional) Used to specify the order in which the functions associated with a particular action are executed. Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the filter.
Default: 10
$accepted_args
(integer) (optional) The number of arguments the function(s) accept(s). In WordPress 1.5.1 and newer hooked functions can take extra arguments that are set when the matching apply_filters() call is run.
Default: 1