[wp-hackers] Unapproved, yet not waiting for moderation
Kitty
kitty at mookitty.co.uk
Sat Jul 24 21:16:27 UTC 2004
On Sat, 2004-07-24 at 16:45 -0400, Eric A. Meyer wrote:
> That only works for posts that actually get caught in the
> moderation queue. I'm more interested in preserving posts that got
> past the moderation filters
Gotcha, then hacks are necessary to do it that way.
> I was wondering if there is (or will be) a way for plugins to
> "de-register" existing functions and register its own functions that
> use the same names. So, for example, I'd like to be able (from
> within a plugin) to have WP ignore the 'wp_*_comment_status'
> functions found in 'functions.php' in favor of using the modified
> versions in the plugin. Can it be done? It's probably one of those
> basic "how'd he hack anything without knowing that?" questions, but
> hey, gotta learn somewhere.
There is a way to remove actions/filters, but it only works in the
context of a normal hook. Just to test I tried this from a plugin:
remove_action('wp_head', 'wp_list_cats');
function wp_list_cats()
{
return;
}
And got the error:
Fatal error: Cannot redeclare wp_list_cats()
It doesn't seem there is a plugin hook that happens 'early' enough to
catch the loading of the other files. If anyone has any ideas about
this, please speak up!
--
Cheers!
Kitty <kitty at mookitty.co.uk>
http://blog.mookitty.co.uk/
http://mookitty.co.uk/devblog/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : /pipermail/hackers_wordpress.org/attachments/20040724/376a11a7/attachment.bin
More information about the hackers
mailing list