Shortcoder - Version 3.3

Version Description

  • Fixed bug in loops using foreach.
  • Fixed several PHP notices.
Download this release

Release Info

Developer vaakash
Plugin Icon 128x128 Shortcoder
Version 3.3
Comparing to
See all releases

Code changes from version 3.2 to 3.3

Files changed (2) hide show
  1. readme.txt +20 -11
  2. shortcoder.php +9 -6
readme.txt CHANGED
@@ -6,8 +6,8 @@ Tags: shortcode, ads, adsense, advertising, bookmark, bookmarking, bookmarks, cu
6
  Donate link: http://bit.ly/scdonate
7
  License: GPLv2 or later
8
  Requires at least: 2.5
9
- Tested up to: 3.4.2
10
- Stable tag: 3.2
11
 
12
  Create custom "Shortcodes" with HTML, Javascript snippets stored in it and use that shortcode within posts and pages. Check the demo video.
13
 
@@ -15,6 +15,19 @@ Create custom "Shortcodes" with HTML, Javascript snippets stored in it and use t
15
 
16
  Shortcoder is a plugin which allows to create a custom shortcode and store HTML, Javascript and other snippets in it. So if that shortcode is used in any post or pages, then the code stored in the shortcode get exceuted in that place.
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  [youtube="http://www.youtube.com/watch?v=GrlRADfvjII"]
19
 
20
  = An example usage =
@@ -28,15 +41,7 @@ Shortcoder is a plugin which allows to create a custom shortcode and store HTML,
28
  * You can also add parameters (like `%%id%%`) inside the snippets, and vary it like `[sc:youtube id="GrlRADfvjII"]`
29
  * This plugin will be hugely useful to all !!!
30
 
31
- = Features =
32
-
33
- * Easy admin interface, no clusters create shortcodes easily.
34
- * Visual editor avaialble, so useful for beginners.
35
- * tinyMCE button avaialble in the editing toolbar so no typing required to insert the shortcode.
36
- * Globally disable the shortcode when not needed.
37
- * Can disable the shortcode, showing it to the admins.
38
-
39
- Check out the [live working demo](http://www.aakashweb.com/resources/pages/demos/shortcoder/) in this page.
40
 
41
  = Resources =
42
 
@@ -83,6 +88,10 @@ For more FAQs please visit the [Plugin homepage](http://www.aakashweb.com/faqs/s
83
 
84
  == Changelog ==
85
 
 
 
 
 
86
  = 3.2 =
87
  * Moved the shortcoder admin page to the "Settings" menu.
88
  * Some admin page issues are fixed.
6
  Donate link: http://bit.ly/scdonate
7
  License: GPLv2 or later
8
  Requires at least: 2.5
9
+ Tested up to: 3.5.x
10
+ Stable tag: 3.3
11
 
12
  Create custom "Shortcodes" with HTML, Javascript snippets stored in it and use that shortcode within posts and pages. Check the demo video.
13
 
15
 
16
  Shortcoder is a plugin which allows to create a custom shortcode and store HTML, Javascript and other snippets in it. So if that shortcode is used in any post or pages, then the code stored in the shortcode get exceuted in that place.
17
 
18
+ [Check out the **LIVE DEMO** of the plugin](http://www.aakashweb.com/demos/shortcoder/)
19
+
20
+ = Features =
21
+
22
+ * Create **"custom shortcodes"** easily and use them within WordPress
23
+ * Use any name for the created shortcode (ex: `[sc:youtube]`)
24
+ * Use any kind of **HTML** as Shortcode content.
25
+ * Parameters can also added to HTML (ex: `<strong>%%mytext%%</strong> [sc:testing mytext="hello"]` )
26
+ * Visual editor avaialble, so useful for beginners.
27
+ * tinyMCE button avaialble in the editing toolbar so no typing required to insert the shortcode.
28
+ * Globally disable the shortcode when not needed.
29
+ * Can disable the shortcode, showing it to the admins.
30
+
31
  [youtube="http://www.youtube.com/watch?v=GrlRADfvjII"]
32
 
33
  = An example usage =
41
  * You can also add parameters (like `%%id%%`) inside the snippets, and vary it like `[sc:youtube id="GrlRADfvjII"]`
42
  * This plugin will be hugely useful to all !!!
43
 
44
+ DONATE: If you like this plugin, you can show your [support by donating some amount](http://bit.ly/scdonate).
 
 
 
 
 
 
 
 
45
 
46
  = Resources =
47
 
88
 
89
  == Changelog ==
90
 
91
+ = 3.3 =
92
+ * Fixed bug in loops using `foreach`.
93
+ * Fixed several PHP notices.
94
+
95
  = 3.2 =
96
  * Moved the shortcoder admin page to the "Settings" menu.
97
  * Some admin page issues are fixed.
shortcoder.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Shortcoder
4
  Plugin URI: http://www.aakashweb.com
5
  Description: Shortcoder is a plugin which allows to create a custom shortcode and store HTML, Javascript and other snippets in it. So if that shortcode is used in any post or pages, then the code stored in the shortcode get exceuted in that place. You can create a shortcode for Youtube videos, adsense ads, buttons and more. <a href="http://www.youtube.com/watch?v=GrlRADfvjII" title="Shortcoder demo video" target="_blank">Check out the demo video</a>. Administration page is <a href="options-general.php?page=shortcoder">moved here</a>.
6
  Author: Aakash Chakravarthy
7
- Version: 3.2
8
  Author URI: http://www.aakashweb.com/
9
  License: GPLv2 or later
10
  */
@@ -15,7 +15,7 @@ if(!defined('WP_CONTENT_URL')) {
15
  $sc_url = WP_CONTENT_URL . '/plugins/' . plugin_basename(dirname(__FILE__)) . '/';
16
  }
17
 
18
- define('SC_VERSION', '3.2');
19
  define('SC_AUTHOR', 'Aakash Chakravarthy');
20
  define('SC_URL', $sc_url);
21
 
@@ -146,7 +146,7 @@ function sc_onactivate(){
146
  }
147
 
148
  // Double percentage fix and flag
149
- if(!isset($sc_flags['double_percent'])){
150
  foreach($sc_options as $key => $val){
151
  $temp = str_replace('%', '%%', $sc_options[$key]['content']);
152
  $sc_options[$key]['content'] = $temp;
@@ -168,6 +168,7 @@ function sc_admin_page(){
168
 
169
  $title = "Create a Shortcode";
170
  $button = "Create Shortcode";
 
171
  $sc_content = '';
172
  $sc_disable = 0;
173
  $sc_hide_admin = 0;
@@ -235,7 +236,7 @@ function sc_admin_page(){
235
  <?php if($edit == 1) echo '<span class="sc_back">&lt;&lt; Back</span>'; ?>
236
 
237
  <form method="post" id="sc_form">
238
- <label>Name: <input type="text" name="sc_name" id="sc_name" value="<?php echo $sc_name_edit; ?>" placeholder="Enter a shortcode name"/></label>
239
  <div id="sc_code"></div>
240
  <label for="sc_content">Content:</label>
241
  <ul class="sc_switch_editor"><li class="sc_editor_html">HTML</li><li class="sc_editor_visual">Visual</li></ul>
@@ -260,8 +261,10 @@ function sc_admin_page(){
260
  <ul id="sc_list" class="clearfix">
261
  <?php
262
  $sc_options = get_option('shortcoder_data');
263
- foreach($sc_options as $key=>$value){
264
- echo '<li>' . $key . '</li>';
 
 
265
  }
266
  ?>
267
  </ul>
4
  Plugin URI: http://www.aakashweb.com
5
  Description: Shortcoder is a plugin which allows to create a custom shortcode and store HTML, Javascript and other snippets in it. So if that shortcode is used in any post or pages, then the code stored in the shortcode get exceuted in that place. You can create a shortcode for Youtube videos, adsense ads, buttons and more. <a href="http://www.youtube.com/watch?v=GrlRADfvjII" title="Shortcoder demo video" target="_blank">Check out the demo video</a>. Administration page is <a href="options-general.php?page=shortcoder">moved here</a>.
6
  Author: Aakash Chakravarthy
7
+ Version: 3.3
8
  Author URI: http://www.aakashweb.com/
9
  License: GPLv2 or later
10
  */
15
  $sc_url = WP_CONTENT_URL . '/plugins/' . plugin_basename(dirname(__FILE__)) . '/';
16
  }
17
 
18
+ define('SC_VERSION', '3.3');
19
  define('SC_AUTHOR', 'Aakash Chakravarthy');
20
  define('SC_URL', $sc_url);
21
 
146
  }
147
 
148
  // Double percentage fix and flag
149
+ if(!isset($sc_flags['double_percent']) && is_array($sc_options) ){
150
  foreach($sc_options as $key => $val){
151
  $temp = str_replace('%', '%%', $sc_options[$key]['content']);
152
  $sc_options[$key]['content'] = $temp;
168
 
169
  $title = "Create a Shortcode";
170
  $button = "Create Shortcode";
171
+ $edit = 0;
172
  $sc_content = '';
173
  $sc_disable = 0;
174
  $sc_hide_admin = 0;
236
  <?php if($edit == 1) echo '<span class="sc_back">&lt;&lt; Back</span>'; ?>
237
 
238
  <form method="post" id="sc_form">
239
+ <label>Name: <input type="text" name="sc_name" id="sc_name" value="<?php echo isset($sc_name_edit) ? $sc_name_edit : ''; ?>" placeholder="Enter a shortcode name"/></label>
240
  <div id="sc_code"></div>
241
  <label for="sc_content">Content:</label>
242
  <ul class="sc_switch_editor"><li class="sc_editor_html">HTML</li><li class="sc_editor_visual">Visual</li></ul>
261
  <ul id="sc_list" class="clearfix">
262
  <?php
263
  $sc_options = get_option('shortcoder_data');
264
+ if(is_array($sc_options)){
265
+ foreach($sc_options as $key=>$value){
266
+ echo '<li>' . $key . '</li>';
267
+ }
268
  }
269
  ?>
270
  </ul>