PluginProbe
Insert Html Snippet / trunk
Insert Html Snippet vtrunk
1.4.6 trunk 1.0 1.0.1 1.1 1.1.1 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.4 1.4.1 1.4.2 1.4.3 All 27 releases
← All changes | admin/menu.php +23 -14 1.1trunk View file →
@@ -1,19 +1,24 @@
1 1 <?php
2 +if ( ! defined( 'ABSPATH' ) )
3 + exit;
4 +if(isset($_GET['page']) && $_GET['page']=='insert-html-snippet-suggest-features' ){
5 + ob_start();
6 +}
7 +if(isset($_GET['page']) && $_GET['page']=='insert-html-snippet-manage' ){
8 + ob_start();
9 +}
10 + add_action('admin_menu', 'xyz_ihs_menu');
2 11
3 -if ( is_admin() ){
4 12
5 - add_action('admin_menu', 'xyz_ihs_menu');
6 -}
13 +function xyz_ihs_menu(){
7 14
8 -function xyz_ihs_menu(){
9 -
10 - add_menu_page('insert-html-snippet', 'XYZ Html', 'manage_options', 'insert-html-snippet-manage','xyz_ihs_snippets',plugins_url('insert-html-snippet/images/logo.png'));
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));
11 16
12 17 add_submenu_page('insert-html-snippet-manage', 'HTML Snippets', 'HTML Snippets', 'manage_options', 'insert-html-snippet-manage','xyz_ihs_snippets');
13 18 add_submenu_page('insert-html-snippet-manage', 'HTML Snippets - Manage settings', 'Settings', 'manage_options', 'insert-html-snippet-settings' ,'xyz_ihs_settings');
14 19 add_submenu_page('insert-html-snippet-manage', 'HTML Snippets - About', 'About', 'manage_options', 'insert-html-snippet-about' ,'xyz_ihs_about');
15 -
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');
16 21 }
17 22
18 23 function xyz_ihs_snippets(){
19 24 $formflag = 0;
@@ -61,22 +66,26 @@
61 66 require( dirname( __FILE__ ) . '/about.php' );
62 67 require( dirname( __FILE__ ) . '/footer.php' );
63 68 }
64 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 +}
65 75
66 76 function xyz_ihs_add_style_script(){
67 77
68 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' );
69 83
70 - wp_register_script( 'xyz_notice_script', plugins_url('insert-html-snippet/js/notice.js') );
71 - wp_enqueue_script( 'xyz_notice_script' );
72 84
73 -
74 85 // Register stylesheets
75 - wp_register_style('xyz_ihs_style', plugins_url('insert-html-snippet/css/xyz_ihs_styles.css'));
86 + wp_register_style('xyz_ihs_style',plugins_url('css/xyz_ihs_styles.css', XYZ_INSERT_HTML_PLUGIN_FILE ),array(),$current_version);
76 87 wp_enqueue_style('xyz_ihs_style');
77 88 }
78 89 add_action('admin_enqueue_scripts', 'xyz_ihs_add_style_script');
79 90
80 -
81 -
82 -?>
91 +?>