I created the directory wp-content/plugins/mon-shortcode-em and in that directory I placed the file mon-shortcode-em.php
Here’s the content of mon-shortcode-em.php:
<?php
/*
Plugin Name: mon-shortcode-em
Description: affichage des r??servations events manager
Text Domain: clubdesplaisaix73
Version: 1.0
*/
add_shortcode('my-em-bookings', 'my_em_bookings');
function my_em_bookings()
{
ob_start(); ?>
<div class='em-bookings-admin-dashboard em-bookings-dashboard <?php em_template_classes('bookings-admin'); ?>'>
<div class="input">
<div class="em-bookings-recent">
<h2><?php esc_html_e('Recent Bookings','events-manager'); ?></h2>
<?php
$EM_Bookings_Table = new EM_Bookings_Table();
$EM_Bookings_Table->output();
?>
</div>
</div>
<?php
return ob_get_clean();
}
?>
I did not get any error when activating the plugin and using the shortcode worked fine.
-
This reply was modified 1 year, 2 months ago by
joneiseman.