Skip to content

Instantly share code, notes, and snippets.

@AramZS
Created February 22, 2016 18:06
Show Gist options
  • Save AramZS/256ce6d5474cb9dbebfd to your computer and use it in GitHub Desktop.
Save AramZS/256ce6d5474cb9dbebfd to your computer and use it in GitHub Desktop.
<?php
add_action( 'wp_head', array( $this, 'pf_aggregation_forward_to_new'));
function pf_aggregation_forward_to_new(){
if(1 == get_option('pf_link_to_source',0)){
//http://webmaster.iu.edu/tools-and-guides/maintenance/redirect-meta-refresh.phtml ?
$linked = pressforward()->metas->get_post_pf_meta(get_the_ID(), 'item_link', true);
//Need syndicate tag here.
if (is_single() && ('' != $linked)){
?>
<script type="text/javascript">
window.open("<?php echo $linked ?>");
</script>
<?php
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment