11<?php
22/*
33 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!
66 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
99 License: GPLv3 or later
1010
1111 Code Snippets - WordPress Plugin
2626*/
2727
2828// Exit if accessed directly
29- if ( !defined ( 'ABSPATH ' ) ) exit ;
29+ if ( ! defined ( 'ABSPATH ' ) ) exit ;
3030
31- if ( !class_exists ('Code_Snippets ' ) ) :
31+ if ( ! class_exists ('Code_Snippets ' ) ) :
3232
3333class Code_Snippets {
3434
3535 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 ' ;
4237
4338 var $ admin_manage_url = 'snippets ' ;
4439 var $ admin_edit_url = 'snippet ' ;
@@ -136,7 +131,7 @@ function admin_manage_loader() {
136131 if ( $ _GET ['action ' ] == 'export ' )
137132 cs_export ( $ _GET ['id ' ], $ this ->table );
138133
139- require_once $ this ->plugin_dir . 'includes/help/admin-manage-help.php ' ;
134+ include $ this ->plugin_dir . 'includes/help/admin-manage-help.php ' ;
140135 }
141136
142137 function admin_edit_title ( $ title ) {
@@ -148,11 +143,11 @@ function admin_edit_loader() {
148143 if ( isset ( $ _GET ['action ' ] ) && @$ _GET ['action ' ] == 'edit ' )
149144 add_filter ( 'admin_title ' , array ( $ this , 'admin_edit_title ' ) );
150145
151- require_once $ this ->plugin_dir . 'includes/help/admin-edit-help.php ' ;
146+ include $ this ->plugin_dir . 'includes/help/admin-edit-help.php ' ;
152147 }
153148
154149 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 ' ;
156151 }
157152
158153 function bulk_action ( $ action , $ ids ) {
@@ -209,7 +204,7 @@ function admin_manage() {
209204 }
210205 }
211206
212- require_once $ this ->plugin_dir . 'includes/admin-manage.php ' ;
207+ require $ this ->plugin_dir . 'includes/admin /admin-manage.php ' ;
213208}
214209
215210 function admin_edit () {
@@ -236,7 +231,7 @@ function admin_edit() {
236231 $ msg = 'Please provide a name for the snippet and the code. ' ;
237232 }
238233 }
239- require_once $ this ->plugin_dir . 'includes/admin-edit.php ' ;
234+ require $ this ->plugin_dir . 'includes/admin /admin-edit.php ' ;
240235 }
241236
242237 function admin_import () {
@@ -249,7 +244,7 @@ function admin_import() {
249244
250245 $ msg = 'Imported ' . $ xml ->count () . ' snippets ' ;
251246 }
252- require_once ( $ this ->plugin_dir . 'includes/admin-import.php ' ) ;
247+ require $ this ->plugin_dir . 'includes/admin/admin -import.php ' ;
253248 }
254249
255250 function settings_link ( $ links ) {
@@ -260,7 +255,7 @@ function settings_link( $links ) {
260255 function plugin_meta ( $ links , $ file ) {
261256 if ( $ file == $ this ->basename ) {
262257 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> ' ,
264259 '<a href="http://wordpress.org/support/plugin/code-snippets/" title="Visit the support forums"> ' . __ ( 'Support ' ) . '</a> '
265260 ) );
266261 }
0 commit comments