SHARE
TWEET

redirect-shortcode-wp

tolikpunkoff Jan 20th, 2017 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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');
RAW Paste Data
Want to get better at PHP?
Learn to code PHP in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top