Version Description
- Moved the shortcoder admin page to the "Settings" menu.
- Some admin page issues are fixed.
Download this release
Release Info
Developer | vaakash |
Plugin | Shortcoder |
Version | 3.2 |
Comparing to | |
See all releases |
Code changes from version 3.1 to 3.2
- readme.txt +7 -3
- sc-admin-css.css +13 -5
- shortcoder.php +12 -9
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.
|
10 |
-
Stable tag: 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 |
|
@@ -49,7 +49,7 @@ Check out the [live working demo](http://www.aakashweb.com/resources/pages/demos
|
|
49 |
|
50 |
1. Extract the zipped file and upload the folder `Shortcoder` to to `/wp-content/plugins/` directory.
|
51 |
1. Activate the plugin through the `Plugins` menu in WordPress.
|
52 |
-
1. Go to the "Shortcoder" admin page.
|
53 |
1. Enter a shortcode name.
|
54 |
1. Paste some code in it.
|
55 |
1. Then use the shortcode `[sc:"name of the shortcode"]` in your post. ex: If "youtube" is the shortcode name, then just use `[sc:youtube]` in your posts
|
@@ -83,6 +83,10 @@ For more FAQs please visit the [Plugin homepage](http://www.aakashweb.com/faqs/s
|
|
83 |
|
84 |
== Changelog ==
|
85 |
|
|
|
|
|
|
|
|
|
86 |
= 3.1 =
|
87 |
* Changed the "Custom parameter" syntax from %param% to %%param%%
|
88 |
* Code revision.
|
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 |
|
49 |
|
50 |
1. Extract the zipped file and upload the folder `Shortcoder` to to `/wp-content/plugins/` directory.
|
51 |
1. Activate the plugin through the `Plugins` menu in WordPress.
|
52 |
+
1. Go to the "Shortcoder" admin page. Admin page is under the "Settings" menu.
|
53 |
1. Enter a shortcode name.
|
54 |
1. Paste some code in it.
|
55 |
1. Then use the shortcode `[sc:"name of the shortcode"]` in your post. ex: If "youtube" is the shortcode name, then just use `[sc:youtube]` in your posts
|
83 |
|
84 |
== Changelog ==
|
85 |
|
86 |
+
= 3.2 =
|
87 |
+
* Moved the shortcoder admin page to the "Settings" menu.
|
88 |
+
* Some admin page issues are fixed.
|
89 |
+
|
90 |
= 3.1 =
|
91 |
* Changed the "Custom parameter" syntax from %param% to %%param%%
|
92 |
* Code revision.
|
sc-admin-css.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/*
|
2 |
* Admin Page CSS for Shortcoder plugin
|
3 |
* Author : Aakash Chakravarthy
|
4 |
-
* Version : 3.
|
5 |
*/
|
6 |
.wrap{
|
7 |
margin: 015px auto 15px;
|
@@ -70,12 +70,12 @@
|
|
70 |
}
|
71 |
#sc_submit{
|
72 |
float: right;
|
73 |
-
background:
|
74 |
font-size: 15px;
|
75 |
font-weight: bold;
|
76 |
-
padding:
|
77 |
-
margin: -
|
78 |
-
border-color: #
|
79 |
}
|
80 |
#sc_submit:hover{
|
81 |
border-color: #009900;
|
@@ -193,6 +193,14 @@
|
|
193 |
font-size: 13px;
|
194 |
text-decoration: none;
|
195 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
.smallText{
|
197 |
font-size: 11px;
|
198 |
color: #333333;
|
1 |
/*
|
2 |
* Admin Page CSS for Shortcoder plugin
|
3 |
* Author : Aakash Chakravarthy
|
4 |
+
* Version : 3.1
|
5 |
*/
|
6 |
.wrap{
|
7 |
margin: 015px auto 15px;
|
70 |
}
|
71 |
#sc_submit{
|
72 |
float: right;
|
73 |
+
background: whiteSmoke url(images/grey-bg.png) repeat-x;
|
74 |
font-size: 15px;
|
75 |
font-weight: bold;
|
76 |
+
padding: 15px 15px;
|
77 |
+
margin: -35px 0px 0px;
|
78 |
+
border-color: #0C0;
|
79 |
}
|
80 |
#sc_submit:hover{
|
81 |
border-color: #009900;
|
193 |
font-size: 13px;
|
194 |
text-decoration: none;
|
195 |
}
|
196 |
+
.sc_edit_note{
|
197 |
+
opacity: 0.2;
|
198 |
+
margin: 10px 0 20px 0;
|
199 |
+
font-size: 10px;
|
200 |
+
}
|
201 |
+
.sc_edit_note:hover{
|
202 |
+
opacity: 1;
|
203 |
+
}
|
204 |
.smallText{
|
205 |
font-size: 11px;
|
206 |
color: #333333;
|
shortcoder.php
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
/*
|
3 |
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>.
|
6 |
Author: Aakash Chakravarthy
|
7 |
-
Version: 3.
|
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.
|
19 |
define('SC_AUTHOR', 'Aakash Chakravarthy');
|
20 |
define('SC_URL', $sc_url);
|
21 |
|
@@ -26,7 +26,7 @@ load_plugin_textdomain('sc', false, basename(dirname(__FILE__)) . '/languages/')
|
|
26 |
|
27 |
// Add admin menu
|
28 |
function sc_add_menu() {
|
29 |
-
|
30 |
}
|
31 |
|
32 |
add_action('admin_menu','sc_add_menu');
|
@@ -41,7 +41,7 @@ function sc_admin_js(){
|
|
41 |
'jquery-ui-draggable',
|
42 |
'jquery-ui-droppable'
|
43 |
));
|
44 |
-
wp_enqueue_script('shortcoder-admin-js', SC_URL . 'sc-admin-js.js');
|
45 |
wp_enqueue_script('shortcoder-nicedit-js', SC_URL . 'js/nicedit/nicEdit.js');
|
46 |
}
|
47 |
}
|
@@ -50,7 +50,7 @@ add_action('admin_print_scripts', 'sc_admin_js');
|
|
50 |
// Load the CSS
|
51 |
function sc_admin_css(){
|
52 |
if (isset($_GET['page']) && $_GET['page'] == 'shortcoder') {
|
53 |
-
wp_enqueue_style('shortcoder-admin-css', SC_URL . 'sc-admin-css.css');
|
54 |
}
|
55 |
}
|
56 |
add_action('admin_print_styles', 'sc_admin_css');
|
@@ -201,7 +201,7 @@ function sc_admin_page(){
|
|
201 |
$sc_name_edit = stripslashes($_POST['sc_name_edit']);
|
202 |
|
203 |
if($_POST["sc_form_action"] == "edit"){
|
204 |
-
$sc_content = stripslashes($sc_options[$sc_name_edit]['content']);
|
205 |
$sc_disable = $sc_options[$sc_name_edit]['disabled'];
|
206 |
$sc_hide_admin = $sc_options[$sc_name_edit]['hide_admin'];
|
207 |
|
@@ -239,7 +239,11 @@ function sc_admin_page(){
|
|
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>
|
242 |
-
|
|
|
|
|
|
|
|
|
243 |
|
244 |
<div id="sc_settings">
|
245 |
<label class="smallText"><input name="sc_disable" id="sc_disable" type="checkbox" value="1" <?php echo $sc_disable == "1" ? 'checked="checked"' : ""; ?>/> Temporarily disable this shortcode</label><br />
|
@@ -249,7 +253,6 @@ function sc_admin_page(){
|
|
249 |
|
250 |
<?php wp_nonce_field('shortcoder_create_form'); ?>
|
251 |
<input name="sc_form_main" type="hidden" value="1" />
|
252 |
-
<small class="grey">Note: Use <strong style="color:#006600">%%someParameter%%</strong> to insert custom parameters. <a href="http://www.aakashweb.com/faqs/wordpress-plugins/shortcoder/using-attributes/" target="_blank">Learn More</a>. Custom parameter format is now changed as in previous line (<a href="http://www.aakashweb.com/forum/shortcoder-f8/change-parameter-symbol-t1532.html" target="_blank">Issue: 2526</a>)</small>
|
253 |
</form>
|
254 |
|
255 |
<h3>Created shortcodes <small>(Click to edit)</small></h3>
|
2 |
/*
|
3 |
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 |
$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 |
|
26 |
|
27 |
// Add admin menu
|
28 |
function sc_add_menu() {
|
29 |
+
add_options_page( 'Shortcoder', 'Shortcoder', 'manage_options', 'shortcoder', 'sc_admin_page' );
|
30 |
}
|
31 |
|
32 |
add_action('admin_menu','sc_add_menu');
|
41 |
'jquery-ui-draggable',
|
42 |
'jquery-ui-droppable'
|
43 |
));
|
44 |
+
wp_enqueue_script('shortcoder-admin-js', SC_URL . 'sc-admin-js.js?v=' . SC_VERSION);
|
45 |
wp_enqueue_script('shortcoder-nicedit-js', SC_URL . 'js/nicedit/nicEdit.js');
|
46 |
}
|
47 |
}
|
50 |
// Load the CSS
|
51 |
function sc_admin_css(){
|
52 |
if (isset($_GET['page']) && $_GET['page'] == 'shortcoder') {
|
53 |
+
wp_enqueue_style('shortcoder-admin-css', SC_URL . 'sc-admin-css.css?v=' . SC_VERSION);
|
54 |
}
|
55 |
}
|
56 |
add_action('admin_print_styles', 'sc_admin_css');
|
201 |
$sc_name_edit = stripslashes($_POST['sc_name_edit']);
|
202 |
|
203 |
if($_POST["sc_form_action"] == "edit"){
|
204 |
+
$sc_content = htmlspecialchars(stripslashes($sc_options[$sc_name_edit]['content']));
|
205 |
$sc_disable = $sc_options[$sc_name_edit]['disabled'];
|
206 |
$sc_hide_admin = $sc_options[$sc_name_edit]['hide_admin'];
|
207 |
|
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>
|
242 |
+
|
243 |
+
<div id="sc_editor">
|
244 |
+
<textarea name="sc_content" id="sc_content" placeholder="Enter the shortcode content here. " rows="6"><?php echo $sc_content; ?></textarea>
|
245 |
+
<div class="grey sc_edit_note">Note: Use <strong style="color:#006600">%%someParameter%%</strong> to insert custom parameters. <a href="http://www.aakashweb.com/faqs/wordpress-plugins/shortcoder/using-attributes/" target="_blank">Learn More</a>.</div>
|
246 |
+
</div>
|
247 |
|
248 |
<div id="sc_settings">
|
249 |
<label class="smallText"><input name="sc_disable" id="sc_disable" type="checkbox" value="1" <?php echo $sc_disable == "1" ? 'checked="checked"' : ""; ?>/> Temporarily disable this shortcode</label><br />
|
253 |
|
254 |
<?php wp_nonce_field('shortcoder_create_form'); ?>
|
255 |
<input name="sc_form_main" type="hidden" value="1" />
|
|
|
256 |
</form>
|
257 |
|
258 |
<h3>Created shortcodes <small>(Click to edit)</small></h3>
|