Created
February 22, 2016 18:06
-
-
Save AramZS/256ce6d5474cb9dbebfd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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