Skip to content

Commit 917d610

Browse files
committed
Updated to version 1.3.2
1 parent abebb26 commit 917d610

15 files changed

+103
-42
lines changed

code-snippets.php

+14-19
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
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
@@ -26,19 +26,14 @@
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

3333
class 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
}

css/index.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
/**
4+
* Do not modify the files in this folder.
5+
*/
6+
7+
?>

images/index.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
/**
4+
* Do not modify the files in this folder.
5+
*/
6+
7+
?>
File renamed without changes.
File renamed without changes.
File renamed without changes.

includes/admin/index.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
/**
4+
* Do not modify the files in this folder.
5+
*/
6+
7+
?>

includes/edit_area/index.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
/**
4+
* Do not modify the files in this folder.
5+
*/
6+
7+
?>

includes/help/admin-edit-help.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@
4343
"<p><strong>For more information:</strong></p>" .
4444
"<p><a href='http://wordpress.org/extend/plugins/code-snippets' target='_blank'>WordPress Extend</a></p>" .
4545
"<p><a href='http://wordpress.org/support/plugin/code-snippets' target='_blank'>Support Forums</a></p>" .
46-
"<p><a href='http://bungeshea.wordpress.com/plugins/code-snippets' target='_blank'>SheaPress</a></p>"
46+
"<p><a href='http://cs.bungeshea.com' target='_blank'>SheaPress</a></p>"
4747
);

includes/help/admin-import-help.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
"<p><strong>For more information:</strong></p>" .
2626
"<p><a href='http://wordpress.org/extend/plugins/code-snippets' target='_blank'>WordPress Extend</a></p>" .
2727
"<p><a href='http://wordpress.org/support/plugin/code-snippets' target='_blank'>Support Forums</a></p>" .
28-
"<p><a href='http://bungeshea.wordpress.com/plugins/code-snippets' target='_blank'>SheaPress</a></p>"
28+
"<p><a href='http://cs.bungeshea.com' target='_blank'>SheaPress</a></p>"
2929
);

includes/help/admin-manage-help.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@
2626
"<p><strong>For more information:</strong></p>" .
2727
"<p><a href='http://wordpress.org/extend/plugins/code-snippets' target='_blank'>WordPress Extend</a></p>" .
2828
"<p><a href='http://wordpress.org/support/plugin/code-snippets' target='_blank'>Support Forums</a></p>" .
29-
"<p><a href='http://bungeshea.wordpress.com/plugins/code-snippets' target='_blank'>SheaPress</a></p>"
29+
"<p><a href='http://cs.bungeshea.com' target='_blank'>SheaPress</a></p>"
3030
);

includes/help/index.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
/**
4+
* Do not modify the files in this folder.
5+
*/
6+
7+
?>

includes/index.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
/**
4+
* Do not modify the files in this folder.
5+
*/
6+
7+
?>

index.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
/**
4+
* Do not modify the files in this folder.
5+
*/
6+
7+
?>

readme.txt

+37-20
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,35 @@
11
=== Code Snippets ===
22
Contributors: bungeshea
3-
Donate link: http://bungeshea.wordpress.com/donate/
4-
Tags: snippets, code, php
3+
Donate link: http://cs.bungeshea.com/donate/
4+
Tags: snippets, code, php, plugins
55
Requires at least: 3.3
66
Tested up to: 3.4.1
7-
Stable tag: 1.3
7+
Stable tag: 1.3.2
88
License: GPLv3 or later
99
License URI: http://www.gnu.org/copyleft/gpl.html
1010

11-
Allows you to easily add code snippets through a GUI interface.
11+
An easy, clean and simple way to add code snippets to your site.
1212

1313
== Description ==
1414

15-
**Code Snippets** is a easy, clean and simple way to add code snippets to your site.
15+
**Code Snippets** is 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!
1616

17-
Use the top level menu to manage your snippets. You can activate, deactivate, edit and delete snippets using a page similar to the Plugins menu. You can add a name for your snippet, a description using the visual editor and the code using a textarea with syntax highlighting and other features.
17+
A snippet is a small chunk of PHP code that you can use to extend the functionality of a WordPress-powered website; essentially a mini-plugin with much less load on your site. Most snippet-hosting sites tell you to add snippet code to your active theme's `functions.php` file, which can get rather long and messy after a while. Code Snippets aims to change that by providing a graphical interface for adding snippets.
1818

19-
Snippets are stored in the `wp_snippets` table in the WordPress database (the table name may differ depending on what your table prefix is set to).
19+
You can use a graphical interface similar to the Plugins menu to manage, activate, deactivate, edit and delete your snippets. Easily organise your snippets by adding add a name an description using the visual editor. Code Snippets includes built-in syntax highlighting and other features to help you write your code.
2020

21-
Code Snippets will automaticly clean ut its data when deleted through the WordPress dashboard. Each screen includes a help tab just in case you get stuck.
21+
Although Code Snippets is designed to be easy-to-use and its interface looks, feels and acts as if it was a native part of WordPress, each screen includes a help tab, just in case you get stuck.
2222

23-
Further information and screenshots are available on the [plugin homepage](http://bungeshea.wordpress.com/plugins/code-snippets).
23+
Further information and screenshots are available on the [plugin homepage](http://cs.bungeshea.com).
2424

25-
Code Snippets was featured on WPMU: [WordPress Code Snippets: Keep them Organized with this Plugin!](http://wpmu.org/wordpress-code-snippets)
25+
As featured on the WPMU blog: [WordPress Code Snippets: Keep them Organized with this Plugin!](http://wpmu.org/wordpress-code-snippets)
2626

27-
If you have any feedback, issues or suggestions for improvements please leave start a topic in the [Support Forum](http://wordpress.org/support/plugin/code-snippets) and if you like the plugin please give it a perfect rating at [WordPress.org](http://wordpress.org/extend/plugins/code-snippets) :-)
28-
29-
You can also contribute to the code at [GitHub](https://github.com/bungeshea/code-snippets).
27+
If you have any feedback, issues or suggestions for improvements please leave a topic in the [Support Forum](http://wordpress.org/support/plugin/code-snippets) and if you like the plugin please give it a perfect rating at [WordPress.org](http://wordpress.org/extend/plugins/code-snippets) :-)
3028

3129
== Installation ==
3230

3331
1. Download the `code-snippets.zip` file to your local machine.
34-
2. Either use the automatic plugin installer *(Plugins - Add New)* or Unzip the file and upload the **code-snippets** folder to your `/wp-content/plugins/` directory.
32+
2. Either use the automatic plugin installer *(Plugins > Add New)* or Unzip the file and upload the **code-snippets** folder to your `/wp-content/plugins/` directory.
3533
3. Activate the plugin through the Plugins menu
3634
4. Visit the **Add New Snippet** menu page *(Snippets > Add New)* to add or edit Snippets.
3735
5. Activate your snippets through the Manage Snippets page *(Snippets > Manage Snippets)*
@@ -45,7 +43,7 @@ No, just copy all the content inside those tags.
4543
Yes. Just add it but do not activate it yet.
4644

4745
= What do I use to write my snippets? =
48-
The [EditArea](http://www.cdolivet.com/editarea/) source-code editor will add line numbers, syntax highlighting, search and replace, tablature and other cool features to the code editor.
46+
The [EditArea](http://www.cdolivet.com/editarea/) source-code editor will add line numbers, syntax highlighting, search and replace, tabulate and other cool features to the code editor.
4947

5048
= Will I lose my snippets if I change the theme or upgrade WordPress? =
5149
No, the snippets are added to the WordPress database so are independent of the theme and unaffected by WordPress upgrades.
@@ -54,10 +52,10 @@ No, the snippets are added to the WordPress database so are independent of the t
5452
Yes, when you delete Code Snippets using the 'Plugins' menu in WordPress it will clean up the database table and a few other bits of data. Be careful not to remove Code Snippets using the Plugins menu unless you want this to happen.
5553

5654
= Can I copy any snippets I've created to another WordPress site? =
57-
Yes! You can individualy export a single snippet using the link below the snippet name on the 'Manage Snippets' page or bulk export multiple snippets using the 'Bulk Actions' feature. Snippets can later be imported using the 'Import Snippets' page by uploading the export file.
55+
Yes! You can individually export a single snippet using the link below the snippet name on the 'Manage Snippets' page or bulk export multiple snippets using the 'Bulk Actions' feature. Snippets can later be imported using the 'Import Snippets' page by uploading the export file.
5856

5957
= Can I run network-wide snippets on a multisite installation? =
60-
No, this feature is currently not avalible and will be coming in a future release. In the mean time activate Code Snippets individualy on the desired sites.
58+
This feature if planned for a future release. You can, however, 'Network Activate' Code Snippets through the Network Dashboard to use the plugin on all of the sites in your network.
6159

6260
= I have an idea for a cool feature for Code Snippets! =
6361
That's great! Let me know by starting (or adding to) a topic in the [Support Forums](http://wordpress.org/support/plugin/code-snippets/).
@@ -71,6 +69,13 @@ That's great! Let me know by starting (or adding to) a topic in the [Support For
7169

7270
== Changelog ==
7371

72+
= 1.3.2 =
73+
* Fixed a bug with version 1.3.1
74+
75+
= 1.3.1 =
76+
* Changed plugin website URI
77+
* Cleaned up some code
78+
7479
= 1.3 =
7580
* Added export option to 'Manage Snippets' page
7681
* Added 'Import Snippets' page
@@ -79,7 +84,7 @@ That's great! Let me know by starting (or adding to) a topic in the [Support For
7984
* Minor improvements
8085
* Added code highlighting
8186
* Removed 'Uninstall Plugin' page
82-
* Data will now be cleaned up when plugin is deleted through WordPress admin.
87+
* Data will now be cleaned up when plugin is deleted through WordPress admin
8388

8489
= 1.1 =
8590
* Fixed a permissions bug with `DISALLOW_FILE_EDIT` being set to true
@@ -88,15 +93,27 @@ That's great! Let me know by starting (or adding to) a topic in the [Support For
8893
= 1.0 =
8994
* Stable version released.
9095

96+
== Other Notes ==
97+
98+
Plugin updates will be posted on the [plugin's homepage](http://cs.bungeshea.com) ([RSS](http://cs.bungehea.tk/feed/)).
99+
100+
* Snippets are stored in the `wp_snippets` table in the WordPress database (the table name may differ depending on what your table prefix is set to).
101+
* Code Snippets will automatically clean up its data when deleted through the WordPress dashboard
102+
103+
You can also contribute to the code at [GitHub](https://github.com/bungeshea/code-snippets).
104+
91105
== Upgrade Notice ==
92106

107+
= 1.3.2 =
108+
Check out Code Snippet's new website: http://cs.bungeshea.com
109+
93110
= 1.3 =
94111
Added import/export feature
95112

96113
= 1.2 =
97-
Minor improvments |
114+
Minor improvements |
98115
Added code highlighting |
99116
Plugin data will now be cleaned up when you delete the plugin.
100117

101118
= 1.1 =
102-
* Minor bug fixes and improvements on the the 'Edit Snippet' page
119+
Minor bug fixes and improvements on the the 'Edit Snippet' page

0 commit comments

Comments
 (0)