답변 2개
채택된 답변
+20 포인트
다음 코드가 도움이 될지 모르겠습니다.
Copy
<?php
include 'common.php';
function hook_fn_0() {
print('<fieldset>');
print('<legend>' . __FUNCTION__ . '</legend>');
print('</fieldset>');
}
function hook_fn_2($arg1, $arg2) {
print('<fieldset>');
print('<legend>' . __FUNCTION__ . '</legend>');
print('<pre>');
print_r(func_get_args());
print('</pre>');
print('</fieldset>');
}
add_event('foo_0', 'hook_fn_0', G5_HOOK_DEFAULT_PRIORITY, 0);
add_event('foo_2', 'hook_fn_2', G5_HOOK_DEFAULT_PRIORITY, 2);
run_event('foo_0');
run_event('foo_2', 1, 'a');
?>
답변을 작성하려면 로그인이 필요합니다.