| @@ -1,34 +1,24 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | if ( ! defined( 'ABSPATH' ) ) |
| 3 | 3 | exit; |
| 4 | - | |
| 5 | -if(isset($_GET['action']) && $_GET['action']=='snippet-status' ){ | |
| 4 | +if(isset($_GET['page']) && $_GET['page']=='insert-html-snippet-suggest-features' ){ | |
| 6 | 5 | ob_start(); |
| 7 | 6 | } |
| 8 | - | |
| 9 | -if(isset($_GET['action']) && $_GET['action']=='snippet-add' ){ | |
| 7 | +if(isset($_GET['page']) && $_GET['page']=='insert-html-snippet-manage' ){ | |
| 10 | 8 | ob_start(); |
| 11 | -} | |
| 12 | - | |
| 13 | -if(isset($_GET['action']) && $_GET['action']=='snippet-delete' ){ | |
| 14 | - ob_start(); | |
| 15 | 9 | } |
| 16 | - | |
| 17 | -if(isset($_GET['action']) && $_GET['action']=='snippet-edit' ){ | |
| 18 | - ob_start(); | |
| 19 | -} | |
| 20 | 10 | add_action('admin_menu', 'xyz_ihs_menu'); |
| 21 | 11 | |
| 22 | 12 | |
| 23 | 13 | function xyz_ihs_menu(){ |
| 24 | - | |
| 25 | - add_menu_page('insert-html-snippet', 'XYZ Html', 'manage_options', 'insert-html-snippet-manage','xyz_ihs_snippets',plugins_url('images/logo.png',XYZ_INSERT_HTML_PLUGIN_FILE)); | |
| 26 | 14 | |
| 15 | + add_menu_page('insert-html-snippet', 'Insert Html Snippet', 'manage_options', 'insert-html-snippet-manage','xyz_ihs_snippets',plugins_url('images/logo.png',XYZ_INSERT_HTML_PLUGIN_FILE)); | |
| 16 | + | |
| 27 | 17 | add_submenu_page('insert-html-snippet-manage', 'HTML Snippets', 'HTML Snippets', 'manage_options', 'insert-html-snippet-manage','xyz_ihs_snippets'); |
| 28 | 18 | add_submenu_page('insert-html-snippet-manage', 'HTML Snippets - Manage settings', 'Settings', 'manage_options', 'insert-html-snippet-settings' ,'xyz_ihs_settings'); |
| 29 | 19 | add_submenu_page('insert-html-snippet-manage', 'HTML Snippets - About', 'About', 'manage_options', 'insert-html-snippet-about' ,'xyz_ihs_about'); |
| 30 | - | |
| 20 | + add_submenu_page('insert-html-snippet-manage', 'HTML Snippets - Suggest Feature', 'Suggest a Feature', 'manage_options', 'insert-html-snippet-suggest-features' ,'xyz_ihs_suggest_feature'); | |
| 31 | 21 | } |
| 32 | 22 | |
| 33 | 23 | function xyz_ihs_snippets(){ |
| 34 | 24 | $formflag = 0; |
| @@ -76,20 +66,26 @@ | ||
| 76 | 66 | require( dirname( __FILE__ ) . '/about.php' ); |
| 77 | 67 | require( dirname( __FILE__ ) . '/footer.php' ); |
| 78 | 68 | } |
| 79 | 69 | |
| 70 | +function xyz_ihs_suggest_feature(){ | |
| 71 | + require( dirname( __FILE__ ) . '/header.php' ); | |
| 72 | + require( dirname( __FILE__ ) . '/suggest_feature.php' ); | |
| 73 | + require( dirname( __FILE__ ) . '/footer.php' ); | |
| 74 | +} | |
| 80 | 75 | |
| 81 | 76 | function xyz_ihs_add_style_script(){ |
| 82 | 77 | |
| 83 | 78 | wp_enqueue_script('jquery'); |
| 79 | + $current_version = xyz_ihs_plugin_get_version(); | |
| 80 | + // Register and enqueue script with versioning | |
| 81 | + wp_register_script( 'xyz_ihs_notice_script', plugins_url('js/notice.js', XYZ_INSERT_HTML_PLUGIN_FILE ),array(),$current_version); | |
| 82 | + wp_enqueue_script( 'xyz_ihs_notice_script' ); | |
| 84 | 83 | |
| 85 | - wp_register_script( 'xyz_notice_script', plugins_url('js/notice.js', XYZ_INSERT_HTML_PLUGIN_FILE )); | |
| 86 | - wp_enqueue_script( 'xyz_notice_script' ); | |
| 87 | 84 | |
| 88 | - | |
| 89 | 85 | // Register stylesheets |
| 90 | - wp_register_style('xyz_ihs_style',plugins_url('css/xyz_ihs_styles.css', XYZ_INSERT_HTML_PLUGIN_FILE )); | |
| 86 | + wp_register_style('xyz_ihs_style',plugins_url('css/xyz_ihs_styles.css', XYZ_INSERT_HTML_PLUGIN_FILE ),array(),$current_version); | |
| 91 | 87 | wp_enqueue_style('xyz_ihs_style'); |
| 92 | 88 | } |
| 93 | 89 | add_action('admin_enqueue_scripts', 'xyz_ihs_add_style_script'); |
| 94 | 90 | |
| 95 | -?> | |
| 91 | +?> | |