Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: in_plugin_update_message-{$file}

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
195      echo '<tr class="plugin-update-tr"><td colspan="3" class="plugin-update"><div class="update-message">';
196      if ( ! current_user_can('update_plugins') )
197           printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s Details</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
198      else if ( empty($r->package) )
199           printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s Details</a> <em>automatic upgrade unavailable for this plugin</em>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
200      else
201           printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s Details</a> or <a href="%5$s">upgrade automatically</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $file, 'upgrade-plugin_' . $file) );
203      do_action( "in_plugin_update_message-$file", $plugin_data, $r );
205      echo '</div></td></tr>';
206 }
208 function wp_update_plugin($plugin, $feedback = '') {
209      if ( !empty($feedback) )
210           add_filter('update_feedback', $feedback);
212      include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';