The power of filters in WordPress

Filters in WordPress are used to add or override the core functions return. Usually filters come at the end on a script just before it returns the result. A filter send a variable to a range of registered functions that will modify it and return the new variable.

The good thing is that you can have more than one function per filter but also that you can add you own function to existing filters very easily. Continue reading “The power of filters in WordPress”

Brainstorming over blind includes from plugins

In a previous article about mistakes people do when writing plugin I said one of them was to input css/javascript even on pages where they are not needed.

This started a quick discussion on the comments about the possibility of intercepting plugins wp_head call to remove unnecessary inclusion of stuff in the header.

The first solution should be to contact the plugin creator and ask him to make his plugin. This is open source after all and contributions should drive fix and innovation.

But when you don’t get any reply?

I’ve looked at a few possibilities and the easiest seems to use the remove_filter function to manually remove each hooks one by one. The down side is that you need to know the name of the hook to remove which will have you opening the plugin and looking for the it in the code.

function removePluginHooks(){
	remove_filter('wp_head', 'cforms_style');
}
add_action('init','removePluginHooks');

Not ideal for people who don’t know anything about code.

Then you would have to manually call the hook on the needed page/post, which again is not easy.

I thought about making a plugin with all the major plugins hook in it and make an admin page to choose where you want to include each hook back. But it is a lot of work and there might be a way to do this more efficiently.

So what do you guys think of this? Anyone has got a better idea?

Add a dashboard widget in WordPress admin panel

With wordpress 2.7 came the dashboard widgets that you can easily customize, add or remove. Now lets say you have a great plugin that gets some kind of stats. Wouldn’t it be nice to display them on the dashboard so you can view them in one swift eye move rather than going in you plugin pages?

Alright you guessed, I am a lazy one. The less I click the better I feel. So here is how to add a widget on your blog dashboard.

Continue reading “Add a dashboard widget in WordPress admin panel”

Mapped images and CSS Sprites

I like maps as you can tell, or to be perfectly honest, I work with maps quite often at the moment. And when I find something interesting it usually end up here, so I can share it but also find it later on for other projects.

Today we’re talking about mapped images. Image mapping is an html way to have links on a picture by specifying clickable areas on the picture. Continue reading “Mapped images and CSS Sprites”

Links of interest

Free Women’s clothing & fashion vector

A nice vector collection from blog.spoongraphics on the Women’s fashion theme. Files available in .ia and .eps format. Very handy if you need dresses, sun glasses and other stuff.

Nice t-shirt gallery

Nothing complicated here but a great idea to display t-shirts on a e-shop. Worth a look.

Table are getting a lift

Html tables generally miss some interactivity but some javascript frameworks/plugin can sort that out for you: http://www.ultimatesmashing.com/coding/tables-javascript-frameworks-libraries/

Post sharing tooltip

Awesome use of jQuery and css to make a “share this post” tooltip. Will definitely use this very soon.

Simple Modal + Google map, easy modal map boxes with jQuery

If you don’t know what Modal box is referring to, think about Lightbox. That’s it, the ‘new way’ (rather old now) of displaying pop-up boxes. Their are many scripts to add modal boxes to your content. Some very fancy, with loads of options and effects, others very simple and light.

I needed to display  Google maps for a client in one of those modal box. After 5 min searching I stumbled across SimpleModal, a jQuery plugin that works quite well and is very light-weight.

The brief is as follow: I’ve got a link that point to a google map on google’s site. I want that in a modal box displayed when a user click on a link. Continue reading “Simple Modal + Google map, easy modal map boxes with jQuery”

Related Items and Services:
Fashion Jewellery that stands out!
Theme Forest ad
Wordpress Themes Collection ad
Woothemes

Poll

How do you start your WordPress plugins development projects?

View Results

Loading ... Loading ...