Tagged: documents wall
Hi there:
Since upgrading to v 1.3.3 I can now open a doc as a link.
However I would like the link to open in a new window (target=”_blank”)Can anyone provide a solution for this?
Thanks
Hi David,
Please copywp-content/plugin/mediapress/templates/mediapress/default/buddypress/activity/views/grid-doc.php to
YourThem or Child theme/mediapress/default/buddypress/activity/views/grid-doc.php
and in the line
<a href="<?php echo esc_url( $url ); ?>" class="mpp-media mpp-activity-media mpp-activity-media-doc <?php echo $class;?>" data-mpp-activity-id="<?php echo $activity_id; ?>" data-mpp-media-id="<?php mpp_media_id(); ?>" > <img src="<?php mpp_media_src( 'thumbnail' ); ?>" class='mpp-attached-media-item' title="<?php echo esc_attr( mpp_get_media_title() ); ?>"/> </a>
add
<a href="<?php echo esc_url( $url ); ?>" target="_new" class="mpp-media mpp-activity-media mpp-activity-media-doc <?php echo $class;?>" data-mpp-activity-id="<?php echo $activity_id; ?>" data-mpp-media-id="<?php mpp_media_id(); ?>" > <img src="<?php mpp_media_src( 'thumbnail' ); ?>" class='mpp-attached-media-item' title="<?php echo esc_attr( mpp_get_media_title() ); ?>"/> </a>
We are adding the target attribute.
Hope that helps.
Regards
BrajeshHi Brajesh:
Thanks for getting back to me..
Will this be clobbered if we update the plugin?
Or are you saying this will be implemented in the next release so we shouldn’t worry?Thx
Hi David,
I can certainly add an option for the same.Also, if you keep a file in your themes directory, It will never be overwritten in plugin update.
Current method is suitable if you want the feature right now.
Regards
Brajesh
The topic ‘ [Resolved] Setting document in new window’ is closed to new replies.