Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#1749 closed defect (bug) (invalid)

Global Variables are not available in Plugin functions

Reported by: mani_monaj Owned by:
Milestone: Priority: highest omg bbq
Severity: critical Version: 1.6
Component: General Keywords: Plugin, Global Variables bg|squashed
Focuses: Cc:


I've just tested out some plugins on Wordpress 1.6 that used to work in ver 1.5 , After an hour of debugging I found out that global variables are not available in plugin functions , for example

function mps_jalali_query($where) {
	global $m,$hour,$minute,$second,$year,$monthnum,$day;

but $m, $hour, $minute , etc are not available in the function , they are NULL in the function !

Change History (3)

#1 @markjaquith
13 years ago

try setting global $wp_query; and using $wp_query->query_varshour?, $wp_query->query_varsday?, etc...

#2 @markjaquith
13 years ago

  • Keywords bg|squashed added
  • Resolution set to invalid
  • Status changed from new to closed

#3 @(none)
11 years ago

  • Milestone 2.0 deleted

Milestone 2.0 deleted

Note: See TracTickets for help on using tickets.