From 917d6104dd5fc453ead1a1175a5226d21cc640be Mon Sep 17 00:00:00 2001 From: Shea Bunge Date: Mon, 17 Jun 2013 17:35:40 +1000 Subject: [PATCH] Updated to version 1.3.2 --- code-snippets.php | 33 +++++++--------- css/index.php | 7 ++++ images/index.php | 7 ++++ includes/{ => admin}/admin-edit.php | 0 includes/{ => admin}/admin-import.php | 0 includes/{ => admin}/admin-manage.php | 0 includes/admin/index.php | 7 ++++ includes/edit_area/index.php | 7 ++++ includes/help/admin-edit-help.php | 2 +- includes/help/admin-import-help.php | 2 +- includes/help/admin-manage-help.php | 2 +- includes/help/index.php | 7 ++++ includes/index.php | 7 ++++ index.php | 7 ++++ readme.txt | 57 +++++++++++++++++---------- 15 files changed, 103 insertions(+), 42 deletions(-) create mode 100644 css/index.php create mode 100644 images/index.php rename includes/{ => admin}/admin-edit.php (100%) rename includes/{ => admin}/admin-import.php (100%) rename includes/{ => admin}/admin-manage.php (100%) create mode 100644 includes/admin/index.php create mode 100644 includes/edit_area/index.php create mode 100644 includes/help/index.php create mode 100644 includes/index.php create mode 100644 index.php diff --git a/code-snippets.php b/code-snippets.php index 4e13840c..75678346 100644 --- a/code-snippets.php +++ b/code-snippets.php @@ -1,11 +1,11 @@ table ); - require_once $this->plugin_dir . 'includes/help/admin-manage-help.php'; + include $this->plugin_dir . 'includes/help/admin-manage-help.php'; } function admin_edit_title( $title ) { @@ -148,11 +143,11 @@ function admin_edit_loader() { if( isset( $_GET['action'] ) && @$_GET['action'] == 'edit' ) add_filter( 'admin_title', array( $this, 'admin_edit_title' ) ); - require_once $this->plugin_dir . 'includes/help/admin-edit-help.php'; + include $this->plugin_dir . 'includes/help/admin-edit-help.php'; } function admin_import_loader() { - require_once $this->plugin_dir . 'includes/help/admin-import-help.php'; + include $this->plugin_dir . 'includes/help/admin-import-help.php'; } function bulk_action( $action, $ids ) { @@ -209,7 +204,7 @@ function admin_manage() { } } - require_once $this->plugin_dir . 'includes/admin-manage.php'; + require $this->plugin_dir . 'includes/admin/admin-manage.php'; } function admin_edit() { @@ -236,7 +231,7 @@ function admin_edit() { $msg = 'Please provide a name for the snippet and the code.'; } } - require_once $this->plugin_dir . 'includes/admin-edit.php'; + require $this->plugin_dir . 'includes/admin/admin-edit.php'; } function admin_import() { @@ -249,7 +244,7 @@ function admin_import() { $msg = 'Imported ' . $xml->count() . ' snippets'; } - require_once( $this->plugin_dir . 'includes/admin-import.php'); + require $this->plugin_dir . 'includes/admin/admin-import.php'; } function settings_link( $links ) { @@ -260,7 +255,7 @@ function settings_link( $links ) { function plugin_meta( $links, $file ) { if ( $file == $this->basename ) { return array_merge( $links, array( - '' . __( 'About' ) . '', + '' . __( 'About' ) . '', '' . __( 'Support' ) . '' ) ); } diff --git a/css/index.php b/css/index.php new file mode 100644 index 00000000..66460d23 --- /dev/null +++ b/css/index.php @@ -0,0 +1,7 @@ + diff --git a/images/index.php b/images/index.php new file mode 100644 index 00000000..66460d23 --- /dev/null +++ b/images/index.php @@ -0,0 +1,7 @@ + diff --git a/includes/admin-edit.php b/includes/admin/admin-edit.php similarity index 100% rename from includes/admin-edit.php rename to includes/admin/admin-edit.php diff --git a/includes/admin-import.php b/includes/admin/admin-import.php similarity index 100% rename from includes/admin-import.php rename to includes/admin/admin-import.php diff --git a/includes/admin-manage.php b/includes/admin/admin-manage.php similarity index 100% rename from includes/admin-manage.php rename to includes/admin/admin-manage.php diff --git a/includes/admin/index.php b/includes/admin/index.php new file mode 100644 index 00000000..66460d23 --- /dev/null +++ b/includes/admin/index.php @@ -0,0 +1,7 @@ + diff --git a/includes/edit_area/index.php b/includes/edit_area/index.php new file mode 100644 index 00000000..66460d23 --- /dev/null +++ b/includes/edit_area/index.php @@ -0,0 +1,7 @@ + diff --git a/includes/help/admin-edit-help.php b/includes/help/admin-edit-help.php index cd1e905d..ce43f9d6 100644 --- a/includes/help/admin-edit-help.php +++ b/includes/help/admin-edit-help.php @@ -43,5 +43,5 @@ "

For more information:

" . "

WordPress Extend

" . "

Support Forums

" . - "

SheaPress

" + "

SheaPress

" ); \ No newline at end of file diff --git a/includes/help/admin-import-help.php b/includes/help/admin-import-help.php index 204dbd72..022d2702 100644 --- a/includes/help/admin-import-help.php +++ b/includes/help/admin-import-help.php @@ -25,5 +25,5 @@ "

For more information:

" . "

WordPress Extend

" . "

Support Forums

" . - "

SheaPress

" + "

SheaPress

" ); \ No newline at end of file diff --git a/includes/help/admin-manage-help.php b/includes/help/admin-manage-help.php index fc05df97..adffb75c 100644 --- a/includes/help/admin-manage-help.php +++ b/includes/help/admin-manage-help.php @@ -26,5 +26,5 @@ "

For more information:

" . "

WordPress Extend

" . "

Support Forums

" . - "

SheaPress

" + "

SheaPress

" ); \ No newline at end of file diff --git a/includes/help/index.php b/includes/help/index.php new file mode 100644 index 00000000..66460d23 --- /dev/null +++ b/includes/help/index.php @@ -0,0 +1,7 @@ + diff --git a/includes/index.php b/includes/index.php new file mode 100644 index 00000000..66460d23 --- /dev/null +++ b/includes/index.php @@ -0,0 +1,7 @@ + diff --git a/index.php b/index.php new file mode 100644 index 00000000..66460d23 --- /dev/null +++ b/index.php @@ -0,0 +1,7 @@ + diff --git a/readme.txt b/readme.txt index 00ee6a8b..e60e55b8 100644 --- a/readme.txt +++ b/readme.txt @@ -1,37 +1,35 @@ === Code Snippets === Contributors: bungeshea -Donate link: http://bungeshea.wordpress.com/donate/ -Tags: snippets, code, php +Donate link: http://cs.bungeshea.com/donate/ +Tags: snippets, code, php, plugins Requires at least: 3.3 Tested up to: 3.4.1 -Stable tag: 1.3 +Stable tag: 1.3.2 License: GPLv3 or later License URI: http://www.gnu.org/copyleft/gpl.html -Allows you to easily add code snippets through a GUI interface. +An easy, clean and simple way to add code snippets to your site. == Description == -**Code Snippets** is a easy, clean and simple way to add code snippets to your site. +**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! -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. +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. -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). +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. -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. +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. -Further information and screenshots are available on the [plugin homepage](http://bungeshea.wordpress.com/plugins/code-snippets). +Further information and screenshots are available on the [plugin homepage](http://cs.bungeshea.com). -Code Snippets was featured on WPMU: [WordPress Code Snippets: Keep them Organized with this Plugin!](http://wpmu.org/wordpress-code-snippets) +As featured on the WPMU blog: [WordPress Code Snippets: Keep them Organized with this Plugin!](http://wpmu.org/wordpress-code-snippets) -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) :-) - -You can also contribute to the code at [GitHub](https://github.com/bungeshea/code-snippets). +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) :-) == Installation == 1. Download the `code-snippets.zip` file to your local machine. -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. +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. 3. Activate the plugin through the Plugins menu 4. Visit the **Add New Snippet** menu page *(Snippets > Add New)* to add or edit Snippets. 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. Yes. Just add it but do not activate it yet. = What do I use to write my snippets? = -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. +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. = Will I lose my snippets if I change the theme or upgrade WordPress? = 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 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. = Can I copy any snippets I've created to another WordPress site? = -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. +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. = Can I run network-wide snippets on a multisite installation? = -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. +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. = I have an idea for a cool feature for Code Snippets! = 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 == Changelog == += 1.3.2 = +* Fixed a bug with version 1.3.1 + += 1.3.1 = +* Changed plugin website URI +* Cleaned up some code + = 1.3 = * Added export option to 'Manage Snippets' page * 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 * Minor improvements * Added code highlighting * Removed 'Uninstall Plugin' page -* Data will now be cleaned up when plugin is deleted through WordPress admin. +* Data will now be cleaned up when plugin is deleted through WordPress admin = 1.1 = * 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 = 1.0 = * Stable version released. +== Other Notes == + +Plugin updates will be posted on the [plugin's homepage](http://cs.bungeshea.com) ([RSS](http://cs.bungehea.tk/feed/)). + +* 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). +* Code Snippets will automatically clean up its data when deleted through the WordPress dashboard + +You can also contribute to the code at [GitHub](https://github.com/bungeshea/code-snippets). + == Upgrade Notice == += 1.3.2 = +Check out Code Snippet's new website: http://cs.bungeshea.com + = 1.3 = Added import/export feature = 1.2 = -Minor improvments | +Minor improvements | Added code highlighting | Plugin data will now be cleaned up when you delete the plugin. = 1.1 = -* Minor bug fixes and improvements on the the 'Edit Snippet' page \ No newline at end of file +Minor bug fixes and improvements on the the 'Edit Snippet' page \ No newline at end of file