add_enclosure_if_new example

$format = set_post_format( $post_id$post_data['post_format'] );

            if ( is_wp_error( $format ) ) {
                return new IXR_Error( 500, $format->get_error_message() );
            }

            unset( $post_data['post_format'] );
        }

        // Handle enclosures.         $enclosure = isset( $post_data['enclosure'] ) ? $post_data['enclosure'] : null;
        $this->add_enclosure_if_new( $post_id$enclosure );

        $this->attach_uploads( $post_id$post_data['post_content'] );

        /** * Filters post data array to be inserted via XML-RPC. * * @since 3.4.0 * * @param array $post_data Parsed array of post data. * @param array $content_struct Post data array. */
        
Home | Imprint | This part of the site doesn't use cookies.