Customize plugin update “new version is available” text

Since the text is processed by _() function, then, of course, you can modify it using gettext filter. function change_update_notification_msg( $translated_text, $untranslated_text, $domain ) { if ( is_admin() ) { $texts = array( ‘There is a new version of %1$s available. <a href=”https://wordpress.stackexchange.com/questions/323927/%2$s” %3$s>View version %4$s details</a>.’ => ‘My custom notification. There is a new … Read more

How to transfer a WordPress blog to a different domain?

I recommend handling the 301 redirect in your web server rather than in WordPress. mod_rewrite or RedirectMatch will be much more efficient than spinning up WordPress to deliver a Location: header. <VirtualHost *:80> ServerName busted-cheap-url.com # mod_alias RedirectMatch permanent (.*) http://great-new-url.com$1 # OR mod_rewrite RewriteEngine on RewriteRule (.*) http://great-new-url.com$1 [R=301] </VirtualHost> There are several methods … Read more

How to add option box in “Edit Post” plugin API?

Below is the example of a couple of checkboxes to set custom field values: // register the meta box add_action( ‘add_meta_boxes’, ‘my_custom_field_checkboxes’ ); function my_custom_field_checkboxes() { add_meta_box( ‘my_meta_box_id’, // this is HTML id of the box on edit screen ‘My Plugin Checkboxes’, // title of the box ‘my_customfield_box_content’, // function to be called to display … Read more

Using functions from a plugin in your theme

Yes, you can use functions from plugins in your theme. Please use the function_exists() function to make sure that the function does exit. I used the Breadcrumbs Plus in one of the themes like this: <?php if (function_exists(‘breadcrumbs_plus’)) { $breadcrumb_options = array( ‘prefix’ => ‘<div id=”breadcrumb”>’, ‘suffix’ => ‘</div>’, ‘title’ => ‘Du er her: ‘, … Read more

Inherit plugin settings to new site in Multisite

Nice Question! But I’ll leave for the asker and for the reader the task of finding the plugin options name. This can be used for any plugin/theme that relies in a single/serialized value in the wp_options table. If it’s not a single value, it’s another task… In this example, I’m using WP-Pagenavi option_name. Action hook … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)