Forums

Hooks: I can't find the correct ones (2 posts)

  1. JacoboPolavieja
    Member
    Posted 1 year ago #

    Hello all,

    I'm trying to develop my first plugin, which is just a custom post type with some additional fields and custom taxonomies.

    Following codex sample code of 'register_post_type' (http://codex.wordpress.org/Function_Reference/register_post_type) in the "Example" section's code, after registering the post type it puts an "add_filter" function like:
    add_filter('post_updated_messages', 'book_updated_messages');

    Looking at 'add_filter' function reference, it seems like the first parameter stands for "The name of the filter to hook the $function_to_add to". If don't understand bad, it's a WP hook that when it's called, it will trigger my own function passed as the second parameter.
    The problem is I can't find the 'post_updated_messages' hook anywhere in Filter Reference, nor Action Reference.

    Even more, when looking at another plugin, I see it calls the 'manage_edit-new_columns' hook through add_filter after registering the new post type. And I can't find that hook neither.

    So I assume I may be missing something... and any guidance in this would be great.

    Thanks for helping!

  2. vtxyzzy
    Member
    Posted 1 year ago #

    I can't find any documentation on post_updated_messages either, but it is applied in wp-admin/edit-form-advanced.php. I don't see where it is added or removed.

    manage_edit-new_columns is added and removed in wp-admin/includes/meta-boxes.php, but I can't find where it is applied.

Topic Closed

This topic has been closed to new replies.

About this Topic