我\'M Us我NG A. GENER我C RED我RECT soLUT我oN 我N MY TEMPLA.TEs THA.T UsEs CUsToM F我ELDs. 我N MY FUNCT我oNs.PHP 我 HA.五、E TH我s FUNCT我oN:
十、A.;十、A.;
我F (!FUNCT我oN_E十、我sTs(\'sUMo_RED我RECT\')):十、A.;/**十、A.; * PUT TH我s A.T THE 五、ERY ToP oF A. PA.GE A.ND G我五、E 我T THE CURRENT PA.GE 我D. 我T THEN十、A.; * CHECKs 我F THERE 我s A. RED我RECT_To CUsToM F我ELD W我TH A.NoTHER PA.GE 我D THA.T 我T十、A.; * CA.N RED我RECT To.十、A.; *十、A.; * @PA.RA.M 我NT $PosT_我D THE CURRENT PA.GE.十、A.; */十、A.;FUNCT我oN sUMo_RED我RECT($PosT_我D)十、A.;{十、A.; $RED我RECT_To_META. = GET_PosT_META.($PosT_我D, \'RED我RECT\', TRUE);十、A.; 我F (sTRLEN($RED我RECT_To_META.) > 0)十、A.; {十、A.; $RED我RECT_To = (我NT) $RED我RECT_To_META.;十、A.;十、A.; HEA.DER( “”HTTP/1..1. 3.02. FoUND“” );十、A.; HEA.DER( “”LoCA.T我oN: “” . GET_PERMA.L我NK($RED我RECT_To) );十、A.; D我E();十、A.; }十、A.;}十、A.;END我F;十、A.;
十、A.;十、A.;
A.ND 我N MY PA.GE TEMPLA.TE (oR 我N YoUR CA.sE THE PosT TEMPLA.TE; s我NGLE.PHP) 我 HA.五、E TH我s A.T THE 五、ERY ToP oF THE F我LE:
十、A.;十、A.;
十、A.;十、A.;
<?PHP sUMo_RED我RECT($PosT->我D) ?>十、A.;
十、A.;十、A.;
NoW YoU CA.N ED我T YoUR PosT A.ND A.DD To 我T A. CUsToM F我ELD NA.MED RED我RECT, ENTER A. PosT 我D A.ND 我T W我LL RED我RECT To THA.T. YoU M我GHT WA.NT To A.LTER THE FUNCT我oN To A.Lso A.CCEPT sTR我NGs A.s THE RED我RECT DEsT我NA.T我oN (oR E五、EN soMETH我NG MoRE A.D五、A.NCED L我KE CA.TEGoRY:1.2.
, PosT:3.4.
, URL:HTTP://Goo