WordPress.org

Ready to get started?Download WordPress

Forums

what does wp_meta do? (7 posts)

  1. notthatugly
    Member
    Posted 9 years ago #

    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:

    wp_meta
    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?

  2. Kafkaesqui

    Posted 9 years ago #

    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.

  3. angsuman
    Member
    Posted 9 years ago #

    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.

  4. Michael Adams (mdawaffe)
    Member
    Posted 9 years ago #

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

  5. notthatugly
    Member
    Posted 9 years ago #

    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?
  6. angsuman
    Member
    Posted 9 years ago #

    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.

  7. paul
    Member
    Posted 9 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.