Advertisement
tolikpunkoff

redirect-shortcode-wp

Jan 20th, 2017
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.26 KB | None | 0 0
  1. function redirect_shortcode($atts)
  2. {
  3.     extract(shortcode_atts(array(
  4.               'address' => 'http://tolik-punkoff.com',
  5.               'code'=> '302',            
  6.         ), $atts));
  7.     wp_redirect( $address, $code );
  8.     die();
  9. }
  10.  
  11. add_shortcode ('redirect','redirect_shortcode');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement