Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. <form name="loginform" id="loginform" action="<?php echo site_url('/wp-login.php') ?>" method="post">
  2. <table class="logtable">
  3. <tr>
  4. <td class="first"><label for="user_login"><?php _e('Username:','your-theme') ?></label></td>
  5. <td class="second"><input type="text" name="log" id="user_login" class="input" value="" size="20"></td>
  6. </tr>
  7. <tr>
  8. <td class="first"><label for="user_pass"><?php _e('Password:','your-theme') ?></label></td>
  9. <td class="second"><input type="password" name="pwd" id="user_pass" class="input" value="" size="20"></td>
  10. </tr>
  11. <tr>
  12. <td class="remember" colspan="2">
  13. <label><input name="rememberme" type="checkbox" id="rememberme" value="forever"> <?php _e('Remember me','your-theme') ?></label>
  14. </td>
  15. </tr>
  16. <tr>
  17. <td class="submit" colspan="2">
  18. <input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php _e('Log in','your-theme') ?>">
  19. <input type="hidden" name="redirect_to" value="<?php echo home_url() ?>">
  20. </td>
  21. </tr>
  22. </table>
  23. </form>
  24.  
  25. function blockDashboard() {
  26. $file = basename($_SERVER['PHP_SELF']);
  27. if (is_user_logged_in() && is_admin() && !current_user_can('administrator') && $file != 'admin-ajax.php'){
  28. wp_redirect( home_url() );
  29. exit();
  30. }
  31. }
  32. add_action('init', 'blockDashboard' );
  33.  
  34. <p class="logout">
  35. <?php wp_loginout( home_url() ) ?>
  36. </p>
  37.  
  38. <?php
  39. add_action('login_header', function () {
  40. wp_dequeue_style('login');
  41. wp_deregister_style('login');
  42. ?>
  43. <!doctype html>
  44. <html <?php language_attributes();?>>
  45. <?php get_template_part('templates/head');?>
  46. <body <?php body_class();?>>
  47. <!--[if IE]>
  48. <div class="alert alert-warning">
  49. <?php _e('You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.', 'sage');?>
  50. </div>
  51. <![endif]-->
  52. <div class="container-fluid">
  53. <div class="row">
  54. <?php
  55. do_action('get_header');
  56. get_template_part('templates/header');
  57. ?>
  58. </div>
  59. </div>
  60. <div class="wrap container w-75" role="document">
  61. <div class="content row">
  62. <main class="main">
  63. <?php
  64. });
  65.  
  66. add_action('login_footer', function () {
  67. ?>
  68. </main><!-- /.main -->
  69. </div><!-- /.content -->
  70. </div><!-- /.wrap -->
  71. <script type="text/javascript">
  72. jQuery("body").addClass("custom-background");
  73. //jQuery("#login-css").remove();
  74. </script>
  75. <?php
  76. do_action('get_footer');
  77. get_template_part('templates/footer');
  78. wp_footer();
  79. ?>
  80. </body>
  81. </html><?php
  82. });
  83.  
  84. jQuery("#login-css").remove();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement