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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
//Automatically login a single WordPress user upon arrival to a specific page. | |
//Redirect to home page once logged in and prevent viewing of the login page. | |
//Tested with WP 3.9.1. Used in functions.php | |
//Updated 2014-07-18 to resolve WP_DEBUG notice: "get_userdatabylogin is deprecated since version 3.3! Use get_user_by('login') instead." | |
//From http://tourkick.com/2014/wordpress-demo-multisite-db-reset/ | |
function auto_login() { | |
//change these 2 items | |
$loginpageid = '1234'; //Page ID of your login page |