WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
356 | if ( $counts['wordpress'] ) |
357 | $titles['wordpress'] = sprintf( __( '%d WordPress Update'), $counts['wordpress'] ); |
358 | if ( $counts['plugins'] ) |
359 | $titles['plugins'] = sprintf( _n( '%d Plugin Update', '%d Plugin Updates', $counts['plugins'] ), $counts['plugins'] ); |
360 | if ( $counts['themes'] ) |
361 | $titles['themes'] = sprintf( _n( '%d Theme Update', '%d Theme Updates', $counts['themes'] ), $counts['themes'] ); |
362 |
|
363 | $update_title = $titles ? esc_attr( implode( ', ', $titles ) ) : ''; |
364 |
|
365 | return apply_filters( 'wp_get_update_data', array( 'counts' => $counts, 'title' => $update_title ), $titles ); |
366 | } |
367 |
|
368 | function _maybe_update_core() { |
369 | include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version |
370 |
|
371 | $current = get_site_transient( 'update_core' ); |
372 |
|
373 | if ( isset( $current->last_checked ) && |
374 | 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) && |