How do I modify the individual links on comments (reply, delete, any others I add in Flags, etc...)? I'm in my sub theme's comment.tpl.php, and I have print render($content['links']) - how do I access the individual links within that?  I tried doing a print_r to see if it was a bunch of nested arrays - it appears it is(?) - but I can't seem to dig into those arrays to get the individual links?  I tried $content['links']['comment']['#links']['comment-reply'] for example (based on the structure returned form the print_r) to get just the reply link, but I get nothing.

Ultimately what I'm trying to do: Due to various modules and some flags I have 5 links on every comment: reply, delete, edit, flag, and like.  I want to group edit, delete, and flag (and any other future miscellaneous) into a little dropdown menu at the top of the comment.  Then put reply and like in individual styled buttons at the bottom.  I was planning to just handle the menu and buttons using Bootstrap since that's my theme base, but I can't "get to" the individual links to add the classes and markup I need.  Additionally I want to change the displayed text, capitalize Reply for example and add some inline icons for edit, delete, etc.

I've come across theme_links, but that page is over my head.  Sounds like maybe I need to understand this?  If so I don't even understand where to start to apply it - I searched across all files in my base theme (Bootstrap) and found nothing with that name to start from?

Where and how should I be trying to do all this?
thanks to your link to the theme_links i managed to solve my problems, so here's how i would solve yours.

the idea is to split the links in two parts, one to print before and the other after the content.

$group = $content['links']['comment']['#links'];
$plain = array();

if( isset($group['comment-like']))
{
    $plain['comment-like'] = $group['comment-like'];
    unset($group['comment-like']);
}
if( isset($group['comment-reply']))
{
    $plain['comment-reply'] = $group['comment-reply'];
    unset($group['comment-reply']);
}

$first = $content['links'];
$first['links']['comment']['#links'] = $group;
$second = $content['links'];
$second['links']['comment']['#links'] = $plain;

//before the print render( $content);
//note: apparently, you can't add a class to the &lt;ul&gt; element from here, so you should manually wrap it and fix your css accordingly
print '&lt;wrapp class="something"&gt;'.render($first).'&lt;/wrapp&gt;';

//after
print render($second);