WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp meta

Description

Creates the wp_meta action hook, allowing functions to insert content to the sidebar.

By default, wp meta() is called immediately after wp_loginout() by sidebar.php and the Meta widget, allowing functions to add new list items to the widget.

IMPORTANT: As the get_sidebar( $name ); function has the do_action( 'get_sidebar', $name ); on top before it loads the sidebar file, this hook should be used to load stuff before the sidebar and wp_meta(); should be called at the end of the sidebar template to allow adding callbacks after the sidebar.

Usage

<?php wp_meta(); ?>

Example

Add a favourite link to the Meta widget:

<?php
function my_meta_link() {
	echo '<li><a href="http://www.example.com">My Favourite Link</a></li>';
}

add_action('wp_meta', 'my_meta_link');
?>

Change Log

Since: 1.5

Source File

wp_meta() is located in wp-includes/general-template.php