Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Tjarls.com

    (@tjarlscom)

    Ah I see. You’ve really been a great help, thank you.

    Now, I do have a final question.
    It’s about the get_header action.

    When ´do_action(get_header)´ is called, what actually happens? or does anything really happen?

    ´do_action( ‘get_header’, $name );´

    So far the only thing I’ve been able to conclude is that the get_header action is used to run functions before the header template is loaded.
    Does it have any other uses or is it just a means to add functions before the header is loaded?

    Thread Starter Tjarls.com

    (@tjarlscom)

    Thank you very much for the response 🙂

    This does make some sense now, but this leads me to a new question.

    When the function locate_template() is called $load is defined as being true

    if ('' == locate_template($templates, true))
    		load_template( get_theme_root() . '/default/header.php');

    but in locate_template() it seams that load_template() is only being called if the string in $located is not empty and equal to $load

    if ($load && '' != $located)
    		load_template($located);

    but the fact that $located is not empty should mean that it is being returned as ‘true’ right? and since $load is defined as true when the function is first called i don’t see how it can load the template.

    Did i read this wrong? or am i missing something? Really hope you can help me.

    again, thanks in advance.

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