do_all_pings()
do_all_pings() 执行所有pingback、附件、trackback并发送到pingback服务。…
do_all_pings()
执行所有pingback、附件、trackback并发送到pingback服务。
Perform all pingbacks, enclosures, trackbacks, and send to pingback services.
目录锚点:#返回#源码
返回(Return)
无返回值
源码(Source)
/** * Perform all pingbacks, enclosures, trackbacks, and send to pingback services. * * @since 2.1.0 * * @global wpdb $wpdb WordPress database abstraction object. */ function do_all_pings() { global $wpdb; // Do pingbacks while ($ping = $wpdb->get_row("SELECT ID, post_content, meta_id FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_pingme' LIMIT 1")) { delete_metadata_by_mid( 'post', $ping->meta_id ); pingback( $ping->post_content, $ping->ID ); } // Do Enclosures while ($enclosure = $wpdb->get_row("SELECT ID, post_content, meta_id FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_encloseme' LIMIT 1")) { delete_metadata_by_mid( 'post', $enclosure->meta_id ); do_enclose( $enclosure->post_content, $enclosure->ID ); } // Do Trackbacks $trackbacks = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE to_ping <> '' AND post_status = 'publish'"); if ( is_array($trackbacks) ) foreach ( $trackbacks as $trackback ) do_trackbacks($trackback); //Do Update Services/Generic Pings generic_ping(); }
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.1.0 | wp-includes/comment.php:2658 | 0 | 7 |
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。
还没有任何评论,赶紧来占个楼吧!