简体   繁体   English

在header.php文件中使用nextgen变量

[英]Using nextgen variable in header.php file

In Wordpress site i got nextgen gallery plugin's variable - $gallery. 在Wordpress网站上,我得到了nextgen gallery插件的变量-$ gallery。

It holds everything i need. 它拥有我需要的一切。 It is in wp-content/plugins/nextgen folder nggfunctions.php file i think. 我认为它位于wp-content / plugins / nextgen文件夹中的nggfunctions.php文件中。

I need to use this variable in my wp-content/themes/twentyten/header.php file. 我需要在wp-content / themes / twentyten / header.php文件中使用此变量。

How do i do that? 我怎么做?

The ugly solution would be to use the global statement to promote it to your current scope. 丑陋的解决方案是使用全局语句将其提升到当前范围。 For more information check: http://nl2.php.net/manual/en/language.variables.scope.php 有关更多信息,请访问: http : //nl2.php.net/manual/en/language.variables.scope.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM