0
はシナリオです:apply_filtersに引数を渡すには?ここ
if(apply_filters('example_filter', false, $type)) {
// do something
}
私はcallback_function
から// do something
ブロックまたはパス内$type
を利用できるようにしたいです。
$type = 'select';
function callback_function($bool, $type) {
return true;
}
add_filter('example_filter', 'callback_function', 10, 2);
どのように私はapply_filters
範囲内のcallback_function
からarguementを渡すことができますか?