I'm trying to figure out if this is by design, a bug or a feature I should try to request. I created a plugin and added the following code:
function test_wp() {
echo '<div style="position: absolute; border: 3px solid #dcdcdc; background: #ffffff; padding: 20px; left: 200px; top: 100px; font-size: 30px; z-index: 9999;">It worked</div>';
}
add_action('wp', 'test_wp');
I'm essentially looking for instances where the 'wp' hook does/doesn't get triggered. It doesn't load on the admin dashboard, which is obvious since it's not loading any single WP object. Whenever I click into "All Posts" it does appear to get triggered. Which is what I expected to happen.
Now, when clicking edit on any existing post, it appears 'wp' hook is not getting triggered on the post editor pages. It seems to me that the 'wp' hook should be getting called here, since it's loading a post and it's respective data directly onto this page. Yet the trigger doesn't seem to load.
Am I missing some logic behind it not loading here?
I am able to trigger the 'posts_selection' hook, which according to the Action Reference list happens right before 'wp' hook runs. That said, I have no idea what 'posts_selection' is actually doing, since the documentation for it is empty.
I am currently running WordPress 3.6.1 and had the same issue in 3.6.0. I haven't tried any versions prior to 3.6.