Skip to content

Instantly share code, notes, and snippets.

@trangsihung
Last active July 26, 2017 02:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
one-file-one-post
<?php
function autologin() {
if ($_GET['autologin'] == 'demo') {
$creds['user_login'] = 'demo'; // username
$creds['user_password'] = 'demo'; // password
$creds['remember'] = true;
$autologin_user = wp_signon( $creds, false );
if ( is_wp_error($autologin_user) )
echo $autologin_user->get_error_message();
}
}
add_action( 'after_setup_theme', 'autologin' );
<?php
add_filter( 'auto_update_plugin', '__return_true' ); // Tự đông update plugins
add_filter( 'auto_update_theme', '__return_true' ); // Tự đông update themes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment