![]() |
Condition Functions
How I can create new condition functions as in_array() is_array() is_numeric() isset() empty() defined() array() can_moderate() can_moderate_calendar() exec_switch_bg() is_browser() is_member_of() ??
|
Huh? Perhaps the manual will help - Using PHP Functions in Template Conditionals
|
Yes, I know it, thanks. But how can I create a new function as isset() that do what I want?
|
What do you mean create a new function? You just write one and add it (via a plugin is usually the easy way).
hook_location "whatever": PHP Code:
|
If I understand you correctly, you want to add your own function to the allowed functions list?
|
exatly
|
Use the hook template_safe_functions, and add to the $safe_functions array. Note that should not be used excessively, and should only be used if absolutely required.
|
All times are GMT. The time now is 01:42 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|