From 02fa0737d6c0451c29c5a8090a4a196ef15c3a7d Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 12 Nov 2015 14:50:58 -0500 Subject: [PATCH] Add instructions for shortcodes --- controllers/admin.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/controllers/admin.php b/controllers/admin.php index b005903..e19840d 100644 --- a/controllers/admin.php +++ b/controllers/admin.php @@ -17,6 +17,38 @@ class glm_coupon_admin $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 '
'; + echo '

Coupons

'; + echo '

Shortcodes Reference

'; + echo '

Listed below are the shortcodes that may be used in a page within the website.

'; + echo ' + + + + + + + + +
ShortcodeDescription
[glmcoupons]Display a search form and the coupons.
'; + echo '
'; } /** -- 2.17.1