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 |
---|---|
1667 | break; |
1668 | case 'server': |
1669 | $lastpostdate = $wpdb->get_var("SELECT DATE_ADD(post_date_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date_gmt DESC LIMIT 1"); |
1670 | break; |
1671 | } |
1672 | $cache_lastpostdate[$blog_id][$timezone] = $lastpostdate; |
1673 | } else { |
1674 | $lastpostdate = $cache_lastpostdate[$blog_id][$timezone]; |
1675 | } |
1676 | return apply_filters( 'get_lastpostdate', $lastpostdate ); |
1677 | } |
1678 |
|
1679 | function get_lastpostmodified($timezone = 'server') { |
1680 | global $cache_lastpostmodified, $pagenow, $wpdb, $blog_id; |
1681 | $add_seconds_blog = get_option('gmt_offset') * 3600; |
1682 | $add_seconds_server = date('Z'); |
1683 | if ( !isset($cache_lastpostmodified[$blog_id][$timezone]) ) { |
1684 | switch(strtolower($timezone)) { |
1685 | case 'gmt': |