Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: delete_postmeta

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1211
1212      preg_match_all( "{\b http : [$any] +? (?= [$punc] * [^$any] | $)}x", $content, $post_links_temp );
1213
1214      debug_fwrite( $log, 'Post contents:' );
1215      debug_fwrite( $log, $content . "\n" );
1216
1217      foreach ( $pung as $link_test ) {
1218           if ( !in_array( $link_test, $post_links_temp[0] ) ) { // link no longer in post
1219                $mid = $wpdb->get_col( $wpdb->prepare("SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE (%s)", $post_ID, like_escape( $link_test ) . '%') );
1220                do_action( 'delete_postmeta', $mid );
1221                $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_id IN(%s)", implode( ',', $mid ) ) );
1222                do_action( 'deleted_postmeta', $mid );
1223           }
1224      }
1225
1226      foreach ( (array) $post_links_temp[0] as $link_test ) {
1227           if ( !in_array( $link_test, $pung ) ) { // If we haven't pung it already
1228                $test = @parse_url( $link_test );
1229                if ( false === $test )