Created
April 7, 2021 16:37
-
-
Save ozh/3fa3382eb83d26449daab4b70cd3b299 to your computer and use it in GitHub Desktop.
YOURLS plugin : automatically login with yourls/yourls (for test installs)
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 | |
/* | |
Plugin Name: login yourls password yourls | |
Description: Just as the name says | |
Version: 0.1 | |
Author: Ozh | |
*/ | |
// No direct call | |
if( !defined( 'YOURLS_ABSPATH' ) ) die(); | |
yourls_add_action( 'login_form_bottom', 'ozh_login_yourls' ); | |
function ozh_login_yourls( $context ) { | |
echo <<<EOD | |
<script> | |
$('#username').val("yourls"); | |
$('#password').val("yourls"); | |
document.write('<span class="error">( ☠ login/password auto fill ☠ )</span>'); | |
</script> | |
EOD; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment