Someone want helping me? i want add here a link to the media uploaded file but i dont now how to be url to uploaded media file. will be domain. com /uploads/avril-lavigne.mp3
but i dont now how to make this url for homepage items ... want help me with this link?
this is code from my teheme:
public function q_item_content( $q_item ) {
$text = $q_item['raw']['content'];
$nsfw = $q_item['raw']['nsfw'];
if ( null !== $nsfw && ! qa_is_logged_in() ) {
$this->output( '<a href="' . $q_item['url'] . '" class="item-a"><span class="king-nsfw-post"><p><i class="fas fa-mask fa-2x"></i></p>' . qa_lang_html( 'misc/nsfw_post' ) . '</span></a>' );
} elseif ( ! empty( $text ) ) {
$text2 = king_get_uploads( $text );
$this->output( '<A class="item-a" HREF="' . $q_item['url'] . '">' );
here i want add a download button to the uploaded file but i dont know whow is.
"' . $q_item['media url i dont know how to make this'] . '
if ( $text2 ) {
$this->output_raw( '<span class="post-featured-img"><img class="item-img king-lazy" width="' . $text2['width'] . '" height="' . $text2['height'] . '" data-king-img-src="' . $text2['furl'] . '" alt=""/></span>' );
} else {
$this->output_raw( '<span class="post-featured-img"><img class="item-img" data-king-img-src="' . $text . '" alt=""/></span>' );
}
$this->output( '</A>' );
} else {
$this->output( '<a href="' . $q_item['url'] . '" class="king-nothumb"></a>' );
}
}