I saw this message today when accessing my plugin page:
So, how do I create this if I want to update my own plugins that’s hosted on wordpress?
I saw this message today when accessing my plugin page:
So, how do I create this if I want to update my own plugins that’s hosted on wordpress?
You must be logged in to post a comment.
This message is created by
W3_Total_Cache->in_plugin_update_message()
hooked to"in_plugin_update_message-$file"
inwp_plugin_update_row()
.It does some nifties to parse readme and display info from changelog, but overall you can just echo some stuff as with any other hook.
Hook building
To make the action hook name clear:
Hooked callback function
The function itself has two
$variables
attached:$plugins_data
&$r
, which can get accessed by your plugin.Footnote:
This approach can be found in the Internal link checker plugin.
Addition:
plugin_basename(__FILE__)
can be used instead of those two lines above. Also checking if the current page is the plugin page is not really necessary as the function will only be called by that page anyway. The (very minor) benefit still is that you don’t have another callback attached. As this answer is quite old, you would, while this approach still works without a problem, now check against the object returned byget_current_screen()
.