WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
104 | $numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); |
105 | if (0 < $numcomms) $numcomms = number_format($numcomms); |
106 |
|
107 | $numcats = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories"); |
108 | if (0 < $numcats) $numcats = number_format($numcats); |
109 | ?> |
110 | <p><?php printf(__('There are currently %1$s <a href="%2$s" title="Posts">posts</a> and %3$s <a href="%4$s" title="Comments">comments</a>, contained within %5$s <a href="%6$s" title="categories">categories</a>.'), $numposts, 'edit.php', $numcomms, 'edit-comments.php', $numcats, 'categories.php'); ?></p> |
111 | </div> |
112 |
|
113 | <?php do_action('activity_box_end'); ?> |
114 | </div> |
115 |
|
116 | <h3><?php _e('Welcome to WordPress'); ?></h3> |
117 |
|
118 | <p><?php _e('Use these links to get started:'); ?></p> |
119 |
|
120 | <ul> |
121 | <li><a href="post.php"><?php _e('Write a post'); ?></a></li> |
122 | <li><a href="profile.php"><?php _e('Update your profile or change your password'); ?></a></li> |