[wp-hackers] Help for Plugin Noob

Eric Hochberger mailinglists at yournextbroker.com
Thu Feb 2 20:18:51 GMT 2006


Jamie,

Wow so that did reveal one problem -- there's already a /directory/?$  
rewrite.  I've changed mine to /resources/

However, I tried dumping the entire rules array and I don't even see  
my new rule I added.  Any idea why it would not be adding my rule?

Thanks,
Eric

On Jan 28, 2006, at 4:42 AM, Jamie Talbot wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Eric Hochberger wrote:
>> Hey guys,
>>
>> Also, when I type in the query ?ld_home=1, the template does load  
>> correctly.  It's just the mod
>> rewrite that is not working.
>>
>> Code to at the bottom:
>>
>> Thanks, Eric
>
>> function ld_rewrite_rules($old_rules) {
>> $my_rules['directory/'] = '/index.php?ld_home=1';
>>
>> return array_merge($my_rules, $old_rules); }
>> add_filter('rewrite_rules_array','ld_rewrite_rules');
>
>
> Have you tried dumping out the rewrite rules to check the order  
> that they are being applied in?
>
> You can print_r the result of your array_merge() to check that  
> they're in the correct order.
>
> Also, you could try this:
>
> echo "Match: " ; print_r($match);
>
> after the line $this->matched= $match; in classes.php on or about  
> line 1545.
>
> Which will tell you what rule is being matched.  That might give  
> you a bit more information to help
> you debug.
>
> Cheers,
>
> Jamie.
>
> - --
> http://jamietalbot.com
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.5 (MingW32)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFD2zxqrovxfShShFARAikDAKCAPUfk7mHS6p5ziEE94Yhp9vUsxQCfSnfo
> 5VcFcVpjVbqtQwEBm4+fqfY=
> =p8A1
> -----END PGP SIGNATURE-----
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list