gwycon.com
Silverlight, WPF and C# .NET development
User NamePassword

19
Mar

I noticed from the documentation that you are supposed to be able to hook into the new WordPress 2.7 admin short cuts menu (but it doesn’t say how)!

Ok, so after a little digging around in the WordPress core, the admin-header.php file (in the wp-admin folder) contains the code for the admin header.

In the admin-header.php file there is a section of code:

1
2
3
4
5
6
7
8
<div id="wphead-info">
 <div id="user_info">
  <p>< ?php printf(__('Howdy, <a href="%1$s" title="Edit your profile">%2$s'), 'profile.php', $user_identity) ?>
  < ?php if ( ! $is_opera ) { ?><span class="turbo-nag hidden"> | <a href="tools.php">< ?php _e('Turbo') ?></a></span>< ?php } ?> |
  <a href="<?php echo wp_logout_url() ?>" title="< ?php _e('Log Out') ?>">< ?php _e('Log Out'); ?></a></p>
 </div>
 < ?php favorite_actions(); ?>
</div>

continue

Category : WordPress Plugins | Blog
6
Mar

It has been an enjoyable experience delving into the inner workings of WordPress of late. And it has been during the development of one of our recent projects, the ‘WP Content Filter’, our first WordPress Plugin by the way :) , that we have come across some unanticipated subtleties.

For instance, any WordPress Plugin is free to access hooks that are exposed by the core WordPress code. Well, this is the whole point isn’t it? To be able to customise the functionality of your blog site over the default WordPress installation.

However, what happens when two Plugins access the same filter hook to, say, do some custom formatting of post comments. If there is an overlap in two (or more) Plugins functionality then it is likely they will all want to access a common WordPress Plugin hook. In this case which one is run first? Is there anyway to force you Plugins code to run before (or after) any others? Would that even be ethical. Or, is it completely ambiguous and decided by the Plugin attributes (such as the order that Plugins were installed on your WordPress blog).

As far as I am aware there are no hooks exposed by WordPress to control this. Perhaps more unpredictable is the behaviour resulting from action Plugin hooks. Plugin code running on a WordPress ‘event’ for more than one Plugin could have very strange results, and the likely culprit for conflicts between Plugins.

Perhaps in the future of WordPress there could be some way to allow the user of Plugins (i.e. site administrators) to be able to set which Plugins have priority over other Plugins. This could be handled in two ways: continue

Category : WordPress Plugins | Blog