Using nextgen variable in header.php file

316 Views Asked by At

In Wordpress site i got nextgen gallery plugin's variable - $gallery.

It holds everything i need. It is in wp-content/plugins/nextgen folder nggfunctions.php file i think.

I need to use this variable in my wp-content/themes/twentyten/header.php file.

How do i do that?

1

There are 1 best solutions below

1
On

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