| @@ -10,11 +10,11 @@ | ||
| 10 | 10 | add_action('admin_menu', 'xyz_ihs_menu'); |
| 11 | 11 | |
| 12 | 12 | |
| 13 | 13 | function xyz_ihs_menu(){ |
| 14 | - | |
| 15 | - 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)); | |
| 16 | 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 | + | |
| 17 | 17 | add_submenu_page('insert-html-snippet-manage', 'HTML Snippets', 'HTML Snippets', 'manage_options', 'insert-html-snippet-manage','xyz_ihs_snippets'); |
| 18 | 18 | add_submenu_page('insert-html-snippet-manage', 'HTML Snippets - Manage settings', 'Settings', 'manage_options', 'insert-html-snippet-settings' ,'xyz_ihs_settings'); |
| 19 | 19 | add_submenu_page('insert-html-snippet-manage', 'HTML Snippets - About', 'About', 'manage_options', 'insert-html-snippet-about' ,'xyz_ihs_about'); |
| 20 | 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'); |
| @@ -75,15 +75,16 @@ | ||
| 75 | 75 | |
| 76 | 76 | function xyz_ihs_add_style_script(){ |
| 77 | 77 | |
| 78 | 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' ); | |
| 79 | 83 | |
| 80 | - wp_register_script( 'xyz_notice_script', plugins_url('js/notice.js', XYZ_INSERT_HTML_PLUGIN_FILE )); | |
| 81 | - wp_enqueue_script( 'xyz_notice_script' ); | |
| 82 | 84 | |
| 83 | - | |
| 84 | 85 | // Register stylesheets |
| 85 | - 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); | |
| 86 | 87 | wp_enqueue_style('xyz_ihs_style'); |
| 87 | 88 | } |
| 88 | 89 | add_action('admin_enqueue_scripts', 'xyz_ihs_add_style_script'); |
| 89 | 90 | |