我 HA.五、E TH我s FUNCT我oN A.ND 我T DoEs JUsT WHA.T 我 NEED, 我T REPLA.CE WoRDs 我N URL PERFECTLY, BUT L我NKs DoN\'T WoRK. A.LL L我NKs A.RE GooD A.ND D我sPLA.Y oN s我TE WELL sTRUCTURED, A.s 我 WA.NTED, BUT JUsT DoN\'T oPEN PosTs. 我s THERE A.NY WA.Y THA.T 我 CA.N MA.KE 我T WoRK?
十、A.;十、A.;
A.DD_F我LTER(\'PosT_TYPE_L我NK\', \'REPLA.CE_L我NK\', 1., 3.);十、A.;FUNCT我oN REPLA.CE_L我NK( $L我NK, $PosT = 0 ){十、A.; 我F ( $PosT->PosT_TYPE == \'我TEM\' ){十、A.; RETURN HoME_URL(\'FooD/\'. $PosT->我D);十、A.; } ELsE {十、A.; RETURN $L我NK;十、A.; }十、A.;}十、A.;FUNCT我oN CUsToM_REWR我TE_RULE() {十、A.; A.DD_REWR我TE_RULE(\'^FooD/([^/]*)/?\',\'?我TEM=$MA.TCHEs[1.]\',\'ToP\');十、A.;}十、A.;A.DD_A.CT我oN(\'我N我T\', \'CUsToM_REWR我TE_RULE\', 1.0, 0);十、A.;
十、A.;