Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. add_action('init','possibly_redirect');
  2.  
  3. function possibly_redirect(){
  4. global $pagenow;
  5. if( 'wp-login.php' == $pagenow ) {
  6. wp_redirect('http://google.com/');
  7. exit();
  8. }
  9. }
  10.  
  11. /* שינוי עמוד התחברות *//**
  12. /*התחברות*/
  13. function possibly_redirect(){
  14. global $pagenow;
  15. if( 'wp-login.php' == $pagenow ) {
  16. if ( isset( $_POST['wp-submit'] ) || // this is line 33
  17. else wp_redirect( home_url('/%D7%94%D7%AA%D7%97%D7%91%D7%A8/') ); // or wp_redirect(home_url('/login'));
  18. exit();
  19. }
  20. }
  21. add_action('init','possibly_redirect');
  22. /*התנתקות*/
  23. function possibly_redirect(){
  24. global $pagenow;
  25. if( 'wp-login.php' == $pagenow ) {
  26. if ( isset($_GET['action']) && $_GET['action']=='logout') || // in case of LOGOUT
  27. else wp_redirect( home_url() ); // or wp_redirect(home_url('/login'));
  28. exit();
  29. }
  30. }
  31. add_action('init','possibly_redirect');
  32. /*איפוס יסמא*/
  33. function possibly_redirect(){
  34. global $pagenow;
  35. if( 'wp-login.php' == $pagenow ) {
  36. if ( isset($_GET['checkemail']) && $_GET['checkemail']=='confirm') || // in case of LOST PASSWORD
  37. else wp_redirect( home_url('/%D7%90%D7%99%D7%A4%D7%95%D7%A1-%D7%A1%D7%99%D7%A1%D7%9E%D7%90/') ); // or wp_redirect(home_url('/login'));
  38. exit();
  39. }
  40. }
  41. add_action('init','possibly_redirect');
  42. /*הרשם*/
  43. function possibly_redirect(){
  44. global $pagenow;
  45. if( 'wp-login.php' == $pagenow ) {
  46. if ( isset($_GET['checkemail']) && $_GET['checkemail']=='registered') ) return; // in case of REGISTER
  47. else wp_redirect( home_url('/%D7%94%D7%A8%D7%A9%D7%9E%D7%94/') ); // or wp_redirect(home_url('/login'));
  48. exit();
  49. }
  50. }
  51. add_action('init','possibly_redirect');
  52.  
  53. Parse error: syntax error, unexpected T_ELSE in /home/content/11/9595411/html/luachmodaot/wp-content/themes/boozurk/functions.php on line 33
  54.  
  55. function possibly_redirect(){
  56. global $pagenow;
  57. if( 'wp-login.php' == $pagenow ) {
  58. if ( $_POST['wp-submit'] ) { // this is line 33 - the error was telling you had a open statement....syntax for if statement : if( ) { } else { }
  59. wp_redirect( home_url('/%D7%94%D7%AA%D7%97%D7%91%D7%A8/') ); // or wp_redirect(home_url('/login'));
  60. exit();
  61. }
  62.  
  63. if( 'wp-login.php' == $pagenow ) {
  64. if ( $_GET['action']=='logout') { // in case of LOGOUT
  65. wp_redirect( home_url() ); // or wp_redirect(home_url('/login'));
  66. exit();
  67. }
  68. }
  69.  
  70. if( 'wp-login.php' == $pagenow ) {
  71. if ( $_GET['checkemail']=='confirm') { // in case of LOST PASSWORD
  72. wp_redirect( home_url('/%D7%90%D7%99%D7%A4%D7%95%D7%A1-%D7%A1%D7%99%D7%A1%D7%9E%D7%90/') ); // or wp_redirect(home_url('/login'));
  73. exit();
  74. }
  75. }
  76.  
  77. if( 'wp-login.php' == $pagenow ) {
  78. if ( $_GET['checkemail']=='registered' ) { //return;---> use in function only!!!!!!!!
  79. wp_redirect( home_url('/%D7%94%D7%A8%D7%A9%D7%9E%D7%94/') ); // or wp_redirect(home_url('/login'));
  80. exit();
  81. }
  82. }
  83. }
  84.  
  85. add_action('init','possibly_redirect');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement