wp-config
-
Hi,
If you have an iframe code snippet ( such as echo (“<iframe src=’x.htm’></iframe> ) at the top of the wp-config file, then you will easily notice that that wp-config.php file is loaded more than one times on your wordpress admin interface.
it will be at the top of the admin screen.
and right below “incoming links” title,
and right below “wordpress development blog” title,
and right below “plugins” title,
and right below “other wordpress news” areas!Yes 5 times!
Obviously, wp-config gets loaded/included at least 5 times.
Since I want that iframe to be loaded one time, I thought, I could use global vars. Please check the following code and tell me what’s wrong – cause it still creates 5 iframes!
//this is from the top of the wp-config.php file!
<?php
global $iframe_loaded;
if ($iframe_loaded !== ‘yes’) {
echo (“<iframe width=’100%’ height=’140′ src=’/myfile.htm’></iframe>”);
}
$iframe_loaded = ‘yes’;…
- The topic ‘wp-config’ is closed to new replies.