Remove rss_gc(). see #11644

git-svn-id: http://svn.automattic.com/wordpress/trunk@12849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-01-26 18:47:34 +00:00
parent 5d2365a499
commit 2df0c3eabe
1 changed files with 0 additions and 15 deletions

View File

@ -1981,21 +1981,6 @@ function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) {
return false; return false;
} }
if ( !function_exists('rss_gc') ) :
function rss_gc() {
global $wpdb;
// Garbage Collection
$rows = $wpdb->get_results( "SELECT meta_key FROM {$wpdb->sitemeta} WHERE meta_key LIKE 'rss\_%\_ts' AND meta_value < unix_timestamp( date_sub( NOW(), interval 7200 second ) )" );
if ( is_array( $rows ) ) {
foreach ( $rows as $row ) {
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->sitemeta} WHERE meta_key = %s", $row->meta_key ) );
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->sitemeta} WHERE meta_key = %s", str_replace( '_ts', '', $row->meta_key ) ) );
}
}
}
endif;
add_action( 'wp_rss_gc', 'rss_gc' );
function retrieve_password_sitename( $title ) { function retrieve_password_sitename( $title ) {
global $current_site; global $current_site;
return sprintf( __( '[%s] Password Reset' ), $current_site->site_name ); return sprintf( __( '[%s] Password Reset' ), $current_site->site_name );