Jump to content

re calling a function without including file


ltoso

Recommended Posts

Hi,

i am new to programming in php, i was just checking the wordpress code and found out in the wordpress code they are calling the function get_header(); at the top of every page but above calling this function their is no file included file, how is it possible, how can a function work without function defination.

 

Please recommend

Regards

Ltoso

Link to comment
Share on other sites

hi,

just download latest.tar.gz from the wordpress.org and then go into wp-content/themes/header.php

 

you'll see that they don't have any file included into the php file and still they have used the get_header(); function

 

Regards

ltoso

Link to comment
Share on other sites

hi,

but there is no include or require directive before the function call you can yourself download code and check it.

 

ltoso

 

Yes, the current page you are viewing is a file to be included. If it isn't defined then this is obviously so.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.