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
159
160      echo '<tr class="plugin-update-tr"><td colspan="3" class="plugin-update"><div class="update-message">';
161      if ( ! current_user_can('update_plugins') )
162           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 );
163      else if ( empty($r->package) )
164           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 );
165      else
166           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) );
167
168      do_action( "in_plugin_update_message-$file", $plugin_data, $r );
169
170      echo '</div></td></tr>';
171 }
172 add_action( 'after_plugin_row', 'wp_plugin_update_row', 10, 2 );
173
174 function wp_update_plugin($plugin, $feedback = '') {
175
176      if ( !empty($feedback) )
177           add_filter('update_feedback', $feedback);