Facebook Widget: Linkable Title #892

Closed
kraftbj opened this Issue Jul 23, 2014 · 1 comment

Projects

None yet

4 participants

@kraftbj
Contributor
kraftbj commented Jul 23, 2014

For discussion:

The Facebook Like Widget links the widget title to the Facebook page (opening in the same window).

An user in http://wordpress.org/support/topic/jetpack-facebook-like-box-title-link-opens-in-the-same-window?replies=1 is asking to be able to open in a different window.

The majority of the widgets I've used do not have the title linked to anything. Should we continue linking the widget title?

@jeherve jeherve added a commit to jeherve/jetpack that referenced this issue Dec 4, 2014
@jeherve jeherve Facebook Like Box Widget: add filter to title
Fixes #892
a538421
@jeherve
Member
jeherve commented Dec 4, 2014

I just submitted #1366, that would be a nice way for site owners to either customize or remove the link, if we don't want to remove that link altogether.

Once the PR is merged, one could force the link to open in a new window like so:

function jeherve_custom_fb_title( $likebox_widget_title, $title, $page_url ) {

        $blank_link = '<a href="' . esc_url( $page_url ) . '" target="_blank">' . esc_html( $title ) . '</a>';

        return $blank_link;
}
add_filter( 'jetpack_facebook_likebox_title', 'jeherve_custom_fb_title', 10, 3 );
@lezama lezama closed this in #1366 Dec 4, 2014
@lezama lezama removed the in progress label Dec 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment