is_local_attachment example


    foreach ( (array) $post_links_temp as $link_test ) {
        // If we haven't pung it already and it isn't a link to itself.         if ( ! in_array( $link_test$pung, true ) && ( url_to_postid( $link_test ) != $post->ID )
            // Also, let's never ping local attachments.             && ! is_local_attachment( $link_test )
        ) {
            $test = parse_url( $link_test );
            if ( $test ) {
                if ( isset( $test['query'] ) ) {
                    $post_links[] = $link_test;
                } elseif ( isset( $test['path'] ) && ( '/' !== $test['path'] ) && ( '' !== $test['path'] ) ) {
                    $post_links[] = $link_test;
                }
            }
        }
    }

    
Home | Imprint | This part of the site doesn't use cookies.