$this->pluginDirName = $path;
$this->wpdb = $wpdb;
$coupons = new glm_coupons_coupon($path);
+ add_action('admin_menu', array($this, 'add_coupon_menus'));
+ }
+
+ public function add_coupon_menus()
+ {
+ add_submenu_page(
+ 'edit.php?post_type=' . GLM_COUPON_POST_TYPE,
+ 'shortcodes',
+ 'Shortcodes',
+ 'edit_posts',
+ 'shortcodes',
+ array($this, 'get_shortcode_inst')
+ );
+ }
+
+ public function get_shortcode_inst()
+ {
+ echo '<div class="wrap">';
+ echo '<h1>Coupons</h1>';
+ echo '<h2>Shortcodes Reference</h2>';
+ echo '<p>Listed below are the shortcodes that may be used in a page within the website.</p>';
+ echo '<table width="600">
+ <tr>
+ <th>Shortcode</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td align="center">[glmcoupons]</td>
+ <td align="center">Display a search form and the coupons.</td>
+ </tr>
+ </table>';
+ echo '</div>';
}
/**