J. Doe J. Doe - 7 months ago 16
PHP Question

My first WP plugin; how to transform a word in the text editor to PHP?

I'm looking for some proper documentation on how to change a [tag] to ?php in the WordPress editor;

So when the user types
in their editor, it converts to $maintenance_options['disable'] which outputs the date of when maintenance is finished.

How can I do that?


You can just create a shortcode in your plugins file, or in your functions.php file

add_shortcode('maintenance-date', 'maintenance_date');
function maintenance_date() {
    return $maintenance_options['disable']