• Resolved Fiable.biz

    (@fiablebiz)


    Hello.

    Sorry for this newbie question. I’ve never been involved in a cooperative development project. I’m presently trying to find out where pods/classes/fields/text.php’s function “schema” is called. I’ve inserted

    $pisteh = wp_debug_backtrace_summary();
    $monfichierh = fopen('/path/schema.txt', 'a+');
    fputs($monfichierh, $pisteh);
    fclose($monfichierh);

    inside the function, created a new schema.txt file, given the write right to everybody, suspended SELinux, added a new pod with a text field, a content for that pod, not to avail: nothing was written in my schema.txt file.

    More generally, how to find where a function defined in pods is called?

    Thank you in advance.

    • This topic was modified 5 years, 5 months ago by Fiable.biz. Reason: spelling mistake
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hello @fiablebiz

    This is a more general PHP question and not directly Pods related.
    However, since it is about the Pods codebase.
    You can find the function call here: https://github.com/pods-framework/pods/blob/main/classes/PodsAPI.php#L7699

    Basically, this method is only used for custom tables. In any other case all field handling is done by WP metadata tables so the DB schema isn’t needed.

    Cheers, Jory

    Thread Starter Fiable.biz

    (@fiablebiz)

    Thank you very much fort your quick answer. But I’m not going to ask you each time I want to find a function call. As far as I know, there is nothing in PHP itself to find this. Isn’t there a convenient tool to find calls?

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @fiablebiz

    You could look into tools like xDebug but keep in mind that there are various ways of calling functions so getting familiar with PHP is a requirement to properly learn debugging.
    Sites like StackExchange can help you a lot when learing PHP.
    Also see the PHP documentation (https://www.php.net/) and WordPress codex (https://codex.ww.wp.xz.cn/Main_Page).
    Other than that, Google is your friend for such questions 🙂

    Cheers, Jory

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘How to track function calls’ is closed to new replies.