Skip to main content

PHP Function Output

This field available in PRO version only.

Examples

How to get output of php function without arguments.

query {
user_logged_in: php_function_output(function: "is_user_logged_in")
}

How to get output of php function with static arguments.

query {
some_user_meta: php_function_output(function: "get_user_meta", arguments: [1, "some_key", true])
}

How to get output of php function with arguments based on global data variables.

query {
some_user_meta: php_function_output(function: "get_user_meta", arguments: [1, "[[[some_data_variable]]]", true])
}

How to get output of php function with arguments based on local data variables.

query {
queried_post{
ID @private
some_meta: php_function_output(function: "get_post_meta", arguments: ["{{{ID}}}", "some_meta_key", true])
}
}