Reputation: 525
I'm looking for some proper documentation on how to change a [tag] to ?php in the WordPress editor;
So when the user types [maintenance-date]
in their editor, it converts to $maintenance_options['disable'] which outputs the date of when maintenance is finished.
How can I do that?
Upvotes: 0
Views: 48
Reputation: 249
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']
}
Upvotes: 1