Description
It would be great to build custom apps with WordPress Playground like this:
import { Playground } from '@wordpress/playground';
function MyApp() {
const playground = useRef( null );
function login() {
await playground.navigate( '/wp-login.php' );
await playground.navigate( '/wp-login.php', {
method: 'POST',
data: {
log: 'admin',
pwd: 'password',
rememberme: 'forever',
}
} );
}
return (
<div>
<h2>My custom app</h2>
<button onClick={ login }>Login as admin</button>
<Playground
php="7.4"
wp="6.0"
plugins={{"gutenberg": "latest"}}
onNavigate={ handleNewUrl }
ref={ playground } />
</div>
);
}
Technically, all these features are already implemented. There's just no package with neat API to import.
Description
It would be great to build custom apps with WordPress Playground like this:
Technically, all these features are already implemented. There's just no package with neat API to import.