1
1
<?php
2
2
/*
3
3
Plugin Name: Code Snippets
4
- Plugin URI: http://bungeshea.wordpress. com/plugins/code-snippets/
5
- Description: Provides an easy-to-manage GUI interface for adding code snippets to your blog.
4
+ Plugin URI: http://cs. bungeshea.com
5
+ Description: An easy, clean and simple way to add code snippets to your site. No need to edit to your theme's functions.php file again!
6
6
Author: Shea Bunge
7
- Version: 1.3
8
- Author URI: http://bungeshea.wordpress. com/
7
+ Version: 1.3.2
8
+ Author URI: http://bungeshea.com
9
9
License: GPLv3 or later
10
10
11
11
Code Snippets - WordPress Plugin
26
26
*/
27
27
28
28
// Exit if accessed directly
29
- if ( !defined ( 'ABSPATH ' ) ) exit ;
29
+ if ( ! defined ( 'ABSPATH ' ) ) exit ;
30
30
31
- if ( !class_exists ('Code_Snippets ' ) ) :
31
+ if ( ! class_exists ('Code_Snippets ' ) ) :
32
32
33
33
class Code_Snippets {
34
34
35
35
public $ table = 'snippets ' ;
36
- public $ version = '1.3 ' ;
37
-
38
- public $ file ;
39
- public $ plugin_dir ;
40
- public $ plugin_url ;
41
- public $ basename ;
36
+ public $ version = '1.3.2 ' ;
42
37
43
38
var $ admin_manage_url = 'snippets ' ;
44
39
var $ admin_edit_url = 'snippet ' ;
@@ -136,7 +131,7 @@ function admin_manage_loader() {
136
131
if ( $ _GET ['action ' ] == 'export ' )
137
132
cs_export ( $ _GET ['id ' ], $ this ->table );
138
133
139
- require_once $ this ->plugin_dir . 'includes/help/admin-manage-help.php ' ;
134
+ include $ this ->plugin_dir . 'includes/help/admin-manage-help.php ' ;
140
135
}
141
136
142
137
function admin_edit_title ( $ title ) {
@@ -148,11 +143,11 @@ function admin_edit_loader() {
148
143
if ( isset ( $ _GET ['action ' ] ) && @$ _GET ['action ' ] == 'edit ' )
149
144
add_filter ( 'admin_title ' , array ( $ this , 'admin_edit_title ' ) );
150
145
151
- require_once $ this ->plugin_dir . 'includes/help/admin-edit-help.php ' ;
146
+ include $ this ->plugin_dir . 'includes/help/admin-edit-help.php ' ;
152
147
}
153
148
154
149
function admin_import_loader () {
155
- require_once $ this ->plugin_dir . 'includes/help/admin-import-help.php ' ;
150
+ include $ this ->plugin_dir . 'includes/help/admin-import-help.php ' ;
156
151
}
157
152
158
153
function bulk_action ( $ action , $ ids ) {
@@ -209,7 +204,7 @@ function admin_manage() {
209
204
}
210
205
}
211
206
212
- require_once $ this ->plugin_dir . 'includes/admin-manage.php ' ;
207
+ require $ this ->plugin_dir . 'includes/admin /admin-manage.php ' ;
213
208
}
214
209
215
210
function admin_edit () {
@@ -236,7 +231,7 @@ function admin_edit() {
236
231
$ msg = 'Please provide a name for the snippet and the code. ' ;
237
232
}
238
233
}
239
- require_once $ this ->plugin_dir . 'includes/admin-edit.php ' ;
234
+ require $ this ->plugin_dir . 'includes/admin /admin-edit.php ' ;
240
235
}
241
236
242
237
function admin_import () {
@@ -249,7 +244,7 @@ function admin_import() {
249
244
250
245
$ msg = 'Imported ' . $ xml ->count () . ' snippets ' ;
251
246
}
252
- require_once ( $ this ->plugin_dir . 'includes/admin-import.php ' ) ;
247
+ require $ this ->plugin_dir . 'includes/admin/admin -import.php ' ;
253
248
}
254
249
255
250
function settings_link ( $ links ) {
@@ -260,7 +255,7 @@ function settings_link( $links ) {
260
255
function plugin_meta ( $ links , $ file ) {
261
256
if ( $ file == $ this ->basename ) {
262
257
return array_merge ( $ links , array (
263
- '<a href="http://wordpress.org/support/plugin /code-snippets/" title="Visit the WordPress.org plugin page"> ' . __ ( 'About ' ) . '</a> ' ,
258
+ '<a href="http://wordpress.org/extend/plugins /code-snippets/" title="Visit the WordPress.org plugin page"> ' . __ ( 'About ' ) . '</a> ' ,
264
259
'<a href="http://wordpress.org/support/plugin/code-snippets/" title="Visit the support forums"> ' . __ ( 'Support ' ) . '</a> '
265
260
) );
266
261
}
0 commit comments