How to parse multiple links from one variable?


So I have a Pod set up as a shortcode where it outputs the links for files a user uploads. Here is the following shortcode I made (imagine my shortcode being [getShortCode field="upload_files"]:

function pods_current_user($atts) {
      'currUser' => get_current_user_id(),
   ), $atts)); 
    'field' => "display_name",
 ), $atts)); 
    $message = do_shortcode('[pods name="user" where="ID = '.$currUser.'"] {@'.$field.'}[/pods]');
    return $message;
add_shortcode('getShortCode', 'pods_current_user'); 

At the moment what it outputs is a set of links to the uploaded files, but as a plain text, not hyperlinked. Something like the following:

(without the hyperlinks). Is there a way to be able to separate the links from my one variable into a scalable array, right in the function for my shortcode? Like maybe detect where the http is and separate the links like that? Thanks.

, Ali Mosallaei 4 years 2019-11-29T16:43:34-05:00 0 Answers 76 views 0

Leave an answer