Skip to content

Instantly share code, notes, and snippets.

@ocjojo
ocjojo / functions.php
Last active April 12, 2021 20:18
Create a file in wordpress backend theme editor
<?php
/**
* Create a file in WordPress from /wp-admin/theme-editor.php
* If you only have access to the wordpess backend and no FTP.
*
* Visit any page in wordpress and use the query parameter ?fileguard=1
*/
add_action('after_setup_theme', function() {
/** Provide the file path */