J. Doe J. Doe - 1 year ago 71
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?

Answer Source

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']
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download