Support » Themes and Templates » what does wp_meta do?

  • I’ve noticed this tag in the themes that ship with wordpress, but in spite of rooting through both Codex and the template function files I can’t figure out what it does and why it might be necessary. All I’ve found is this:

    Always passed 1 as a parameter. Never executes in current code.

    which leaves me none the wiser. So does anyone know why it’s there, and whether I need to include it in any themes I might make?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Since it doesn’t seem to do much of anything, I suspect it’s providing a hook for plugin developers. But don’t quote me.

    Provides a wp_meta action hook for plugin developers.

    I would suggest that you leave it there. You may in future use a plugin which needs this.

    Yup. Codex was wrong (but was coincidentally corrected not long after your post). See this section in Theme Development and the Plugin API article.

    Thanks! I have two follow-up questions:

    1. Are there any plugins that actually use this? (I know that even if there aren’t I should still include the hook in case anyone uses it in future; I’d just like to see an example of it in action.)
    2. I don’t always include a ‘meta’ section and one of the themes I’m currently working on doesn’t have sidebar.php (on account of the fact it has two sidebars). Is it OK just to insert it at the end of the sidebar, or is there some reason why it’s wp_meta rather than wp_sidebar?

    wp_meta action hook is to insert anything in the meta section specifically.

    I don’t think it is possible to state categorically whether any current plugin uses it as not all plugins are in a central repository, though efforts are being made in that direction.

    However before installing any new plugin you can always grep to see if it uses wp_meta or not.

    In any case this is not a big deal. If you don’t even have a meta section, don’t bother about this hook.

    I am finding that wp_meta displays in my pages. It looks like if I touch the options in text-control, the choices pop up.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘what does wp_meta do?’ is closed to new replies.