Skip to content

Instantly share code, notes, and snippets.

@ozh

ozh/plugin.php

Created Apr 7, 2021
Embed
What would you like to do?
YOURLS plugin : automatically login with yourls/yourls (for test installs)
<?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