Author Topic: shortcode without visible link? possible?  (Read 2003 times)

a--to--b

  • Newbie
  • Posts: 1
shortcode without visible link? possible?
« on: January 31, 2010, 08:54:35 am »
with the powerpress setting for "no links option" checked, but shortcode used in a post, the links DO show up. is there any way around this? what would be a sensible short term hack of the plugin?

angelo

  • CIO, RawVoice
  • Administrator
  • Hero Member
  • *****
  • Posts: 4483
Re: shortcode without visible link? possible?
« Reply #1 on: February 02, 2010, 09:35:58 am »
This appears to be a bug. This bug will be fixed in the next release of PowerPress.

To fix your own copy, go to about line 1566 (may be off by a line or two) that has this line:

Code: [Select]
$return .= powerpress_get_player_links($post->ID, $feed_slug, $EpisodeData );

Comment out this line by placing to forward slashes in the front of the line:

Code: [Select]
//$return .= powerpress_get_player_links($post->ID, $feed_slug, $EpisodeData );

Add a new line just below the }, and paste the following:

Code: [Select]
if( !isset($EpisodeData['no_links']) )
{
$return .= powerpress_get_player_links($post->ID, $feed_slug, $EpisodeData );
}


The final code should look like this (excluding the ...):

Code: [Select]
...
if( !isset($EpisodeData['no_player']) )
{
$return .= apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), array('feed'=>$feed_slug, 'image'=>$image_current, 'type'=>$EpisodeData['type']) );
//$return .= powerpress_get_player_links($post->ID, $feed_slug, $EpisodeData );
}
if( !isset($EpisodeData['no_links']) )
{
$return .= powerpress_get_player_links($post->ID, $feed_slug, $EpisodeData );
}
...