wp_object; $attachments = parent::get_attachment(); $attachment = array( 'type' => \esc_attr( \get_post_meta( $post->ID, 'episode_type', true ) ), 'url' => \esc_url( \get_post_meta( $post->ID, 'audio_file', true ) ), 'name' => \esc_attr( \get_the_title( $post->ID ) ), 'icon' => \esc_url( \get_post_meta( $post->ID, 'cover_image', true ) ), ); $attachment = array_filter( $attachment ); array_unshift( $attachments, $attachment ); return $attachments; } /** * Gets the object type for a podcast episode. * * Always returns 'Note' for the best possible compatibility with ActivityPub. * * @return string The object type. */ public function get_type() { return 'Note'; } /** * Returns the content for the ActivityPub Item. * * The content will be generated based on the user settings. * * @return string The content. */ public function get_content() { return generate_post_summary( $this->wp_object ); } }