Fixing Share link for Flatfull’s Musik Theme

Hey G33ks,

So today I joined DevineHQ and opened it with a nice Makina & Powerstomp mix.

But when I wanted to share it to my facebook, I noticed something:
When I hit share, it would open the Facebook share dialog in the SAME tab as DevineHQ, and after sharing, it would close the tab.
Now this is quite an issue when you having that jam, and you hit share.

So after a big search, I (together with CpT Retarted who helped me search for the buggy code) managed to fix it.
And since I can’t hop on the Github, and patch the issue for them on the theme (as you need to purchase the frigging theme), I decided to share the fix here:

First, you have to go to Appearance -> Editor and select the Musik theme as theme to edit.
Now open up helper.php
Once you’ve done that, scroll down a little and you will find the following block of code:
foreach ( $actions as $action ) {
$out .= '<li>&lt;a href="' . $action['href'] . '" title="' . esc_attr( $action['title'] ) . '" >' . $action['text'] . '</a></li>';
}

Simply replace that with this code and you’re all set!
foreach ( $actions as $action ) {
$out .= '<li>&lt;a href="' . $action['href'] . '" title="' . esc_attr( $action['title'] ) . '" target="_blank">' . $action['text'] . '</a></li>';
}

What it does is open a new tab so you don’t have to close your current tab at all!
Simple fix, yet quite effective!

I hope one of you was able to use it, if so, smack that Like button!

G33k Out!

Leave a reply