Changeset 25313 for trunk/src/wp-includes/comment.php
- Timestamp:
- 09/10/2013 03:17:51 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r25139 r25313 1828 1828 $pung = get_pung($post_ID); 1829 1829 1830 // Variables1831 $ltrs = '\w';1832 $gunk = '/#~:.?+=&%@!\-';1833 $punc = '.:?\-';1834 $any = $ltrs . $gunk . $punc;1835 1836 1830 // Step 1 1837 1831 // Parsing the post, external links (if any) are stored in the $post_links array 1838 // This regexp comes straight from phpfreaks.com 1839 // http://www.phpfreaks.com/quickcode/Extract_All_URLs_on_a_Page/15.php 1840 preg_match_all("{\b http : [$any] +? (?= [$punc] * [^$any] | $)}x", $content, $post_links_temp); 1832 $post_links_temp = wp_extract_urls( $content ); 1841 1833 1842 1834 // Step 2. … … 1849 1841 // We don't wanna ping first and second types, even if they have a valid <link/> 1850 1842 1851 foreach ( (array) $post_links_temp [0]as $link_test ) :1843 foreach ( (array) $post_links_temp as $link_test ) : 1852 1844 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 itself 1853 1845 && !is_local_attachment($link_test) ) : // Also, let's never ping local attachments.
Note: See TracChangeset
for help on using the changeset viewer.