background preloader

Plugins

Facebook Twitter

Been giving a lot of thought to how… « WordPress Development Updates. Been giving a lot of thought to how to give plugin authors more control over their plugin pages.

Been giving a lot of thought to how… « WordPress Development Updates

In WordPress custom headers have been hugely beneficial in people’s ability to make a theme their own without having to be a designer. (And designers can make them really sing.) As an experiment we’ve turned on custom headers for the plugin directory. If you’d like to try out this feature: Make a 772×250 pixel jpeg or png. For an example of this in action, check out Hello Dolly, natch. Final note: this is just an experiment, and there is a 98.254% chance the dimensions, placement, and text overlay for this header will change in the future, or the idea might not work at all.

Easier Plugin Development by Moving Plugin Directory. If you're a experienced programmer you're testing your programs not only with the latest version of WordPress but also with some older versions since there are many dated installations.

Easier Plugin Development by Moving Plugin Directory

So you have several versions installed on your development server and want to test your newly created code with every single version. You could copy your plugin files to all installed version's plugin directory manually every time you change the code... but you're a programmer, so this is no option, is it? If your dev server works under a *nix system you probably have tried to use symbolic links but it didn't work. This is not a bug of WordPress but of PHP.

So this does not work either. Fortunately WordPress defines two constants which can help you to simplify things nonetheless: WP_PLUGIN_DIR and WP_PLUGIN_URL. Define( 'WP_PLUGIN_DIR', '/var/www/plugins' ); // or with XAMPP C:/xampp/htdocs/plugins define( 'WP_PLUGIN_URL', ' ); (Thanks to John Blackbourn on the wp-hackers list for having the idea.)

Add Icon to Site Link in the WordPress Admin Bar. Each button in the Admin bar has a self-defining and space-saving icon.

Add Icon to Site Link in the WordPress Admin Bar

But the link to the blog frontend (which is represented as a blog title), has no icon. If you want, you can change it quickly - here is a small solution. The following code belongs in the functions.php of the Theme, or better, in a Plugin. It adds the current favicon before the blog title. And to fit the image into the overall picture of the admin bar, we darkened it and and gave it a round shape. Guest Post This post is written by Sergej Müller wpseo.de, who created the popular WordPress Plugin to optimize your SEO. Thank you very much from our part to Sergej. If you also like to have your interesting post published on our website, please let us know on our contact page. WordPress hooks database - action and filter hooks for wp plugin developers.

What is a hook?

WordPress hooks database - action and filter hooks for wp plugin developers

In brief, WordPress hooks enable you to change how WordPress behaves without editing any core files. Because you leave the WordPress files untouched, you can painlessly upgrade your blog with each new version of WordPress. It's this hooks architecture that makes WordPress the best blogging solution. If you don't know what WordPress hooks are for, read the Plugin API or this tutorial. If you're new to web design, you might also enjoy my easy PHP tutorial. What is this directory? If you're a plugin or theme developer, you know how difficult it can be to figure out which hooks are available. What is this good for? See what new hooks are available with each new version of WordPress See which hooks have been deprecated or renamed (use the "view all hooks" option) Easily learn exactly which WP file(s) use each hook.

How to help? Update and improve the official action and filter references. Plugin API. Plugin API Languages: বাংলা • English • Español • Français • 日本語 • 한국어 • Português do Brasil • ไทย • 中文(简体) • Русский • (Add your language) Introduction This page documents the API (Application Programming Interface) hooks available to WordPress plugin developers, and how to use them.

Plugin API

This article assumes you have already read Writing a Plugin, which gives an overview (and many details) of how to develop a plugin. This article is specifically about the API of "Hooks", also known as "Filters" and "Actions", that WordPress uses to set your plugin in motion. These hooks may also be used in themes, as described here. Hooks, Actions and Filters Hooks are provided by WordPress to allow your plugin to 'hook into' the rest of WordPress; that is, to call functions in your plugin at specific times, and thereby set your plugin in motion. You can sometimes accomplish the same goal with either an action or a filter. Function Reference Actions Modify database data. Create an Action Function.