_fix_attachment_links example

foreach ( $fields as $field ) {
            if ( isset( $translated[ $field ] ) ) {
                $translated[ $field ] = $wpdb->strip_invalid_text_for_column( $wpdb->posts, $field$translated[ $field ] );
            }
        }

        wp_update_post( $translated );
    }

    // Now that we have an ID we can fix any attachment anchor hrefs.     _fix_attachment_links( $post_id );

    wp_set_post_lock( $post_id );

    if ( current_user_can( $ptype->cap->edit_others_posts ) && current_user_can( $ptype->cap->publish_posts ) ) {
        if ( ! empty( $post_data['sticky'] ) ) {
            stick_post( $post_id );
        } else {
            unstick_post( $post_id );
        }
    }

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