Warning Message For Self Customized Plugins

Now and then you have to modify an existing Plugin for your own special needs. But you still get a message if an update exists for the original Plugin. If you modified the Plugin several month ago and you forgot about it, so you update the Plugin and all your modifications are gone. Most of the time you have a backup, but even though it's annoying to upload the customized Plugin again after you realized the original Plugin is not exactly what you want. Therefore you can paste a little function in the specified Plugin to display a warning right after the update message. So you won't forget, that you modified this Plugin a while ago.


function my_update_notice() {
	$info = __( 'ATTENTION! Plugin was modified.', MY_TEXTDOMAIN );
	echo '<span class="spam">' . strip_tags( $info, '<br><a><b><i><span>' ) . '</span>';

if ( is_admin() )
	add_action( 'in_plugin_update_message-' . plugin_basename(__FILE__), 'my_update_notice' );

Related Posts on Category

It's not easy to keep your readers on your website. It's a challenge to provide new readers valid information, even though they were written a while ago but still up to date. A good idea is to provide posts from the same category as the post, the reader is reading currently. You can create a little function, which is listing related posts based on the category ID.
Continue reading …

Recents Drafts All Authors

It's not uncommon that a blog runs by different authors, so it may be useful if you can have a quick look at the drafts of all authors. In our joint blog WP Engineer we created a feed, which keeps us up to date if a new draft of all authors were created.

The work of every author is different and the dashboard is the center of information. Therefore we have decided to supplement a widget in the Dashboard, which shows the last five drafts of all authors. I enhanced the existing Plugin Draft Feed.

  • It provides a feed of all drafts
  • And the last 5 drafts of all authors in the Dashboard.

Continue reading …

Ping Problem?

Since version 2.7 of WordPress, there have been several issues that Pingbacks in WordPress don't work. WordPress works with it in the request-function (wp-includes/cron.php), not to be confused with the wp-cron.php. There is a time limit of 0:01 seconds set, which is not sufficient under all conditions. It is known and the developers of WordPress have not changed the entry intentionally, with the reference that it runs smoothly under many configurations, see Trac ticket 8923.

This problem in 2.8 continues to be an issue in various installations. Who wants to change the value should set it to 1, and should no longer have problems. All other users can only hope that it will be changed in 2.8.1.

Original code in WordPress 2.8

$cron_url = get_option( 'siteurl' ) . '/wp-cron.php?doing_wp_cron';
wp_remote_post( $cron_url, array('timeout' => 0.01, 'blocking' => false, 'sslverify' => apply_filters('https_local_ssl_verify', true)) );

after change the value

$cron_url = get_option( 'siteurl' ) . '/wp-cron.php?doing_wp_cron';
wp_remote_post( $cron_url, array('timeout' => 1, 'blocking' => false, 'sslverify' => apply_filters('https_local_ssl_verify', true)) );

Define Your Own WordPress Action Hooks

WordPress is based on the so-called Hook-System. This serves WordPress, and all extensions to involve functions in a certain place. The Hooks are not only to hook, but can also be used in custom extensions and thus create a better overview and offer additional interfaces for more possibilities to develop. Especially the second option is interesting when you create a theme, which aims to offer a variety of interfaces, or create a Plugin which can be expand by other authors or serve as a framework.
Continue reading …