Changeset 17052
- Timestamp:
- 12/19/2010 04:55:46 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r16999 r17052 306 306 if ( '' !== $karma ) 307 307 $where .= $wpdb->prepare( ' AND comment_karma = %d', $karma ); 308 if ( 'comment' == $type ) 308 if ( 'comment' == $type ) { 309 309 $where .= " AND comment_type = ''"; 310 elseif ( ! empty( $type ) ) 310 } elseif( 'pings' == $type ) { 311 $where .= ' AND comment_type IN ("pingback", "trackback")'; 312 } elseif ( ! empty( $type ) ) { 311 313 $where .= $wpdb->prepare( ' AND comment_type = %s', $type ); 314 } 312 315 if ( '' !== $parent ) 313 316 $where .= $wpdb->prepare( ' AND comment_parent = %d', $parent ); … … 1760 1763 1761 1764 $pung = get_pung($post_ID); 1762 1765 var_Dump(compact('pung')); 1763 1766 // Variables 1764 1767 $ltrs = '\w'; … … 1783 1786 1784 1787 foreach ( (array) $post_links_temp[0] as $link_test ) : 1785 if ( !in_array($link_test, $pung) && (url_to_postid($link_test) != $post_ID) // If we haven't pung it already and it isn't a link to itself1788 if ( !in_array($link_test, $pung) && !in_array($link_test, $post_links) && (url_to_postid($link_test) != $post_ID) // If we haven't pung it already and it isn't a link to itself 1786 1789 && !is_local_attachment($link_test) ) : // Also, let's never ping local attachments. 1787 1790 if ( $test = @parse_url($link_test) ) { … … 1793 1796 endif; 1794 1797 endforeach; 1795 1798 var_dump(compact('post_links', 'post_links_temp')); 1796 1799 do_action_ref_array('pre_ping', array(&$post_links, &$pung)); 1797 1800 1798 1801 foreach ( (array) $post_links as $pagelinkedto ) { 1799 1802 $pingback_server_url = discover_pingback_server_uri( $pagelinkedto ); 1803 var_dump(compact('pagelinkedto', 'pingback_server_url')); 1800 1804 1801 1805 if ( $pingback_server_url ) { … … 1806 1810 // using a timeout of 3 seconds should be enough to cover slow servers 1807 1811 $client = new WP_HTTP_IXR_Client($pingback_server_url); 1808 $client->timeout = 3;1812 $client->timeout = 5; 1809 1813 $client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . $wp_version, $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom); 1810 1814 // when set to true, this outputs debug messages by itself 1811 $client->debug = false;1815 $client->debug = true; 1812 1816 1813 1817 if ( $client->query('pingback.ping', $pagelinkedfrom, $pagelinkedto) || ( isset($client->error->code) && 48 == $client->error->code ) ) // Already registered 1814 1818 add_ping( $post_ID, $pagelinkedto ); 1819 var_Dump($client); 1820 echo '<hr />'; 1815 1821 } 1816 1822 }
Note: See TracChangeset
for help on using the changeset viewer.