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
184
185      echo '<tr class="plugin-update-tr"><td colspan="3" class="plugin-update"><div class="update-message">';
186      if ( ! current_user_can('update_plugins') )
187           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 );
188      else if ( empty($r->package) )
189           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 );
190      else
191           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) );
192
193      do_action( "in_plugin_update_message-$file", $plugin_data, $r );
194
195      echo '</div></td></tr>';
196 }
197
198 function wp_update_plugin($plugin, $feedback = '') {
199
200      if ( !empty($feedback) )
201           add_filter('update_feedback', $feedback);
202