Skip to content

Instantly share code, notes, and snippets.

@KnowTheCodePro
Created March 25, 2016 02:57
Show Gist options
  • Save KnowTheCodePro/bb08bd942c7e0fdd54d0 to your computer and use it in GitHub Desktop.
Save KnowTheCodePro/bb08bd942c7e0fdd54d0 to your computer and use it in GitHub Desktop.
apply_filters - Callback Loop
do {
foreach ( (array) current( $wp_filter[$tag] ) as $the_ ) {
if ( ! is_null( $the_['function'] ) ) {
$args[1] = $value;
$value = call_user_func_array( $the_['function'], array_slice( $args, 1, (int) $the_['accepted_args'] ) );
}
}
} while ( next( $wp_filter[$tag] ) !== false );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment