从core调用api。wordpress。组织(wp 3.2.1)
From the phpDoc blocks:
内部封头
wp_update_themes()
: “
中安装的所有主题的列表已发送给WP。”
- Themes
/wp-includes/update.php > line 261-267, called on line 280
[1] 。 - Plugins
/wp-includes/update.php > line 166-172, called on line 184
- Core
/wp-includes/update.php > starting on line 22
[3]
[1]
$options = array(
\'timeout\' => ( ( defined(\'DOING_CRON\') && DOING_CRON ) ? 30 : 3),
\'body\' => array( \'themes\' => serialize( $themes ) ),
\'user-agent\' => \'WordPress/\' . $wp_version . \'; \' . get_bloginfo( \'url\' )
);
$raw_response = wp_remote_post( \'http://api.wordpress.org/themes/update-check/1.0/\', $options );
set_site_transient( \'update_themes\', $new_update );
[2]
$options = array(
\'timeout\' => ( ( defined(\'DOING_CRON\') && DOING_CRON ) ? 30 : 3),
\'body\' => array( \'plugins\' => serialize( $to_send ) ),
\'user-agent\' => \'WordPress/\' . $wp_version . \'; \' . get_bloginfo( \'url\' )
);
$raw_response = wp_remote_post(\'http://api.wordpress.org/plugins/update-check/1.0/\', $options);
[3] $options = array(
\'timeout\' => ( ( defined(\'DOING_CRON\') && DOING_CRON ) ? 30 : 3 ),
\'user-agent\' => \'WordPress/\' . $wp_version . \'; \' . home_url( \'/\' ),
\'headers\' => array(
\'wp_install\' => $wp_install,
\'wp_blog\' => home_url( \'/\' )
)
);
$response = wp_remote_get($url, $options);