티스토리 뷰

워드프레스에서 add_filter( )와 apply_filter( ) 차이


Filter Hook인 'auth_cookie_expiration'에 대해 검색하다 보니 검색결과로 'apply_filters( 'auth_cookie_expiration', int $length, int $user_id, bool $remember )'를 나왔다. 잉? apply_filter ? add_filter와 apply_filter 차이가 무엇인지 궁금해졌다.


add_filter는 Filter Hook에 사용자 정의 함수를 거는(Hook)[연결하는] 것이고 apply_fitler는 Filter Hook에 이미 걸려 있는 함수를 호출하는 것이다.


참고 자료




공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2026/08   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
글 보관함