PluginProbe ʕ •ᴥ•ʔ
Shortcoder — Create Shortcodes for Anything / 6.4
Shortcoder — Create Shortcodes for Anything v6.4
trunk 3.0 3.0.1 3.1 3.2 3.3 3.4 3.4.1 4.0 4.0.1 4.0.2 4.0.3 4.1 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2 4.3 4.4 4.5 4.6 5.0 5.0.1 5.0.2 5.0.3 5.0.4 5.1 5.2 5.2.1 5.3 5.3.1 5.3.2 5.3.3 5.3.4 5.4 5.5 5.6 5.7 5.8 6.0 6.1 6.2 6.3 6.3.1 6.3.2 6.4 6.5 6.5.1 6.5.2 6.5.3
shortcoder / readme.txt
shortcoder Last commit date
admin 1 year ago includes 1 year ago languages 1 year ago readme.txt 1 year ago shortcoder.php 1 year ago
readme.txt
353 lines
1 # Shortcoder — Create Shortcodes for Anything
2 Contributors: vaakash
3 Author URI: https://www.aakashweb.com/
4 Plugin URI: https://www.aakashweb.com/wordpress-plugins/shortcoder/
5 Tags: shortcode, html, javascript, code, snippets
6 Donate link: https://www.paypal.me/vaakash/
7 License: GPLv2 or later
8 Requires PHP: 5.3
9 Requires at least: 4.9.0
10 Tested up to: 6.6.1
11 Stable tag: 6.4
12
13 Create custom "Shortcodes" easily for HTML, JavaScript, CSS code snippets and use the shortcodes within posts, pages & widgets
14
15
16
17 ## Description
18
19 Shortcoder plugin allows to create a custom shortcodes for HTML, JavaScript, CSS and other code snippets. Now the shortcodes can be used in posts/pages and the snippet will be replaced in place.
20
21 ### ✍ Create shortcodes easily
22 1. Give a name for the shortcode
23 1. Paste the HTML/JavaScript/CSS as shortcode content
24 1. Save !
25 1. Now insert the shortcode `[sc name="my_shortcode"]` in your post/page.
26 1. **Voila !** You got the HTML/Javascript/CSS in your post.
27
28 ### ✨ Features
29
30 * Create **custom shortcodes** easily and use them in any place where shortcode is supported.
31 * Have any **HTML**, **Javascript**, **CSS** as Shortcode content.
32 * Insert: **Custom parameters** in shortcode
33 * Insert: **WordPress parameters** in shortcode
34 * Multiple editors: Code, Visual and text modes.
35 * Globally disable the shortcode when not needed.
36 * Disable shortcode on desktop, mobile devices.
37 * A button in post editor to pick the shortcodes to insert.
38 * Execute blocks HTML in shortcode content.
39 * Insert shortcodes in Gutenberg/block editor.
40
41 ### 🎲 An example usage
42
43 1. Create a shortcode named "adsenseAd" in the Shortcoder admin page.
44 1. Paste the adsense code in the box given and save it.
45 1. Use `[sc name="adsenseAd"]` in your posts and pages.
46 1. Tada !!! the ad code is replaced and it appears in the post.
47 1. Now you can edit the ad code at one place and the code is updated in all the locations where the shortcode is used.
48
49 Similarly shortcodes can be created for frequently used snippets.
50
51 You can also add [custom parameters](https://www.aakashweb.com/docs/shortcoder/) (like `%%id%%`) inside the snippets, and change it's value like `[sc name="youtube" id="GrlRADfvjII"]` when using them.
52
53 ### 🧱 Using in block editor
54
55 Though shortcodes can be used in **any** place manually, Shortcoder provides below options to select and insert the shortcodes created easily when working with the block editor.
56
57 * Shortcoder block
58 * Toolbar button to select and insert shortcodes inline (under "more")
59
60 ### 💎 Upgrade to PRO
61
62 Shortcoder also provides a [PRO version](https://www.aakashweb.com/wordpress-plugins/shortcoder/) which has additional features to further enhance the experience. Below features are offered in the PRO version.
63
64 * **Custom editor** - Edit Shortcode content using block editor or page builder plugins like Elementor and WPBakery.
65 * **Revisions** - Revisions support for Shortcode content.
66 * **Locate shortcode** - Search posts and pages where a shortcode is used.
67 * **Extra code** - Include extra code to the footer when a shortcode is used in a page.
68
69 [Get started with Shortcoder - PRO](https://www.aakashweb.com/wordpress-plugins/shortcoder/)
70
71 ### Links
72
73 * [Documentation](https://www.aakashweb.com/docs/shortcoder/)
74 * [FAQs](https://www.aakashweb.com/docs/shortcoder/faq/)
75 * [Support forum/Report bugs](https://www.aakashweb.com/forum/)
76 * [PRO features](https://www.aakashweb.com/wordpress-plugins/shortcoder/#pro)
77
78
79
80 ## Installation
81
82 1. Extract the zipped file and upload the folder `Shortcoder` to to `/wp-content/plugins/` directory.
83 1. Activate the plugin through the `Plugins` menu in WordPress.
84 1. Open the admin page from the "Shortcoder" link in the navigation menu.
85
86
87
88 ## Frequently Asked Questions
89
90 Please visit the [plugin documentation page](https://www.aakashweb.com/docs/shortcoder/) for complete list of FAQs.
91
92 ### What are the allowed characters for shortcode name?
93
94 Allowed characters are alphabets, numbers, hyphens and underscores.
95
96 ### My shortcode is not working in my page builder!
97
98 Please check with your page builder plugin to confirm if the block/place/area where the shortcode is being used can execute shortcodes. If yes, then shortcode should work fine just like regular WordPress shortcodes.
99
100 ### My shortcode is not working!
101
102 Please check the following if you notice that the shortcode content is not printed or when the output is not as expected.
103
104 * Please verify if the shortcode content is printed. If shortcode content is not seen printed, check the shortcode settings to see if any option is enabled to restrict where and when shortcode is printed. Also confirm if the shortcode name is correct and there is no duplicate `name` attribute for the shortcode.
105 * If shortcode is printed but the output is not as expected, please try the shortcode content in an isolated environment and confirm if the shortcode content is working correctly as expected. Sometimes it might be external factors like theme, other plugin might conflict with the shortcode content being used.
106 * There is a known limitation in shortcodes API when there is a combination of unclosed and closed shortcodes. Please refer [this document](https://codex.wordpress.org/Shortcode_API#Unclosed_Shortcodes) for more information.
107
108 ### Can I insert PHP code in shortcode content?
109
110 No, right now the plugin supports only HTML, Javascript and CSS as shortcode content.
111
112 ### Can I use block editor or page builders like Elementor, WPBakery to create shortcode?
113
114 Yes, this feature is available in the PRO version. You can upgrade to the [PRO version](https://www.aakashweb.com/wordpress-plugins/shortcoder/) to design using custom editor and create shortcode for that.
115
116
117
118 ## Screenshots
119
120 1. Shortcoder admin page.
121 2. Editing a shortcode.
122 3. "Insert shortcode" popup to select and insert shortcodes.
123 4. A shortcode inserted into post.
124 5. Shortcoder block for Gutenberg editor.
125 6. Shortcoder executed in the post.
126 7. Insert shortcode inline from block editor toolbar.
127
128 [More Screenshots](https://www.aakashweb.com/wordpress-plugins/shortcoder/)
129
130
131
132 ## Changelog
133
134 ### 6.4
135 * New: Option to set shortcode display name next to shortcode name.
136 * New: Option to execute WordPress block HTML in shortcode content.
137 * Fix: Shortcoder roles are registered when plugin is activated.
138
139 ### 6.3.2
140 * Fix: Verify permissions while closing Shortcoder changelog.
141
142 ### 6.3.1
143 * Fix: Admin ajax vulnerability with nonce.
144
145 ### 6.3
146 * New: Set default value for the custom field parameters.
147 * New: Custom parameter default value is shown in the insert shortcode popup.
148 * Fix: Restrict access to admin-ajax calls.
149 * Fix: Some admin texts were missing translation.
150 * Fix: Removed the note in the insert popup for fully closed shortcode.
151 * Fix: Debug comment line now has the name of the shortcode.
152
153 ### 6.2
154 * New: Option to show shortcode content in "All shortcodes" page.
155 * Fix: Some texts were not translated.
156 * Fix: Error in WP Bakery page builder while picking images.
157
158 ### 6.1
159 * New: Enhancements to shortcode edit screen meta boxes.
160 * Fix: HTML is escaped in the editor sometimes.
161 * Fix: Support for WordPress 6.1
162
163 ### 6.0
164 * New: PRO version is introduced.
165 * New: Prevent same shortcode nested loop.
166 * New: New actions and filters introduced.
167 * Fix: Post excerpt shortcode parameter now prints full post excerpt.
168 * Fix: Enhancements to input and output data sanitization.
169
170 ### 5.8
171 * New: Option to set description for the shortcode.
172 * New: New actions and filters introduced.
173 * Fix: Minor admin UI enhancements.
174
175 ### 5.7
176 * New: Reordered shortcode column in the "All shortcodes" page.
177 * New: Option to copy shortcode directly from "All shortcodes" page.
178 * New: Filter `sc_mod_content` to modify shortcode content before execution.
179 * Fix: Shortcode won't save if the email field in the feedback form has invalid value.
180 * Fix: Custom parameter with hyphen was not highlighted in code editor.
181 * Fix: Minor admin UI enhancements.
182
183 ### 5.6
184 * New: Shortcodes available to copy/insert are now closed by default.
185 * Fix: Custom parameter value 0 is not displayed.
186 * Fix: Support for WordPress 5.8
187
188 ### 5.5
189 * New: General settings page to configure default editor and shortcode content.
190 * New: Block to insert shortcode rewritten from scratch.
191 * New: Toolbar button to insert shortcodes inline.
192 * New: Shortcodes are now closed by default when inserted from editor.
193 * Fix: Custom fields parsing issue when they are placed next to each other.
194 * Fix: Enclosed content in block input now retains multi-line.
195 * Fix: Minor refinements to UI.
196
197 ### 5.4
198 * New: Code editor is now loaded locally and not from cloudflare.
199 * New: Code editor now shows hints and highlights any syntax error.
200 * New: Hyphens can now be used in shortcode custom parameters.
201 * Fix: Handle scenario where shortcode attribute is received as a string sometimes.
202 * Fix: Notice where `wp_localize_script` was called incorrectly.
203 * Fix: Handle scenario where HTML is passed as shortcode parameter.
204 * New: WordPress requirement changed from 4.4 to 4.9
205
206 ### 5.3.4
207 * New: Tested with WordPress 5.6
208 * Fix: Handle warning with `trim` while fetching page metadata at some pages.
209
210 ### 5.3.3
211 * New: Support for `post slug` as the new shortcode parameter under WordPress information.
212 * New: Codemirror has been updated to latest version.
213 * Fix: Handle code editor loading issue when there is any collision.
214 * Fix: Handle input fields which have empty `id` attribute.
215 * Fix: Handle issue of `$post` object being undefined at some cases.
216 * Fix: Renamed usages of `__class__` to `__CLASS__`
217
218 ### 5.3.2
219 * New: In code editor, shortcodes will be highlighted and code editor font size is slightly bigger.
220
221 ### 5.3.1
222 * New: Code editor is now made the default editor.
223 * Fix: Minor changes to admin UI.
224
225 ### 5.3
226 * New: Added support for underscores in custom parameters.
227 * New: Getting ready for internationalization of the plugin.
228 * Fix: Insert shortcode popup shows duplicate available parameters in case of same parameter with different case.
229
230 ### 5.2.1
231 * Fix: Custom parameters being not replaced in some scenarios.
232 * Fix: Minor enhancement to insert custom parameter form.
233
234 ### 5.2
235 * New: Default values can now be provided to custom parameters.
236 * Fix: Script tags, custom field placeholder and backslash being stripped after saving the shortcode sometimes.
237 * Fix: Rel attribute being modified for links.
238 * New: Added "Manage shortcodes" link to plugin list page for easy access after activation.
239
240 ### 5.1
241 * New: Import/Export link added to the shortcoder list page.
242 * Fix: `empty()` was throwing error at some places for users using PHP 5.5 below as function return value was passed to it.
243 * Fix: Shortcoder QTTags button was loading in frontends.
244 * Fix: "Insert shortcode" popup was hidden behind in theme customizer page.
245 * Fix: `array_key_exists` array but bool given warning.
246 * Fix: Hide comments metabox in shortcode edit page as it was shown in certain conditions.
247
248 ### 5.0.4
249 * Fix: `script` and `style` tags stripped after 4.x upgrade. New migration will run in this version and shortcode content will now be fixed.
250
251 ### 5.0.3
252 * Fix: Shortcode content is not escaped when code editor is used. This is requirement because `post_content` behaves strangely when user has rich editing enabled.
253
254 ### 5.0.2
255 * Fix: Shortcodes inside shortcode content not getting executed.
256 * Fix: Disable Gutenberg block for older not supported WordPress versions.
257
258 ### 5.0.1
259 * Fix: Code editor escaping HTML characters.
260 * Fix: `get_current_screen()` undefined.
261 * Fix: Code editor breaks if there is any other plugin which loads codemirror.
262 * Fix: `tools.php` is not found.
263
264 ### 5.0
265 * New: Brand new version. Plugin rewritten from scratch.
266 * New: Shortcoder block for the block editor.
267
268 ### 4.4
269 * New: Insert shortcode automatically adds "closing tag" if the shortcode has enclosed content parameter.
270 * Fix: Codemirror has been updated to latest version.
271
272 ### 4.3
273 * New: Edit shortcode name after creating.
274 * New: Post modified date parameter added.
275 * Fix: Date parameters now display in site language.
276
277 ### 4.2
278 * Fix: Some plugins fail to fire onload JS event since it was overwritten by shortcoder.
279 * Fix: Javascript in insert shortcode popup not working in IE 11.
280 * Fix: Missing parenthesis while calling `is_year`.
281 * Fix: Widgets page not loading insert shortcode popup.
282 * Fix: Removed settings emoji icon from plugin actions list.
283 * Fix: Load latest version 5.42.0 of codemirror.
284 * Fix: Updated minimum required WordPress version.
285
286 ### 4.1.9
287 * Fix: Minor UI refinements for better experience.
288 * Fix: Import error where some exported JSON files have 0 as EOF.
289
290 ### 4.1.8
291 * New: Insert custom fields in shortcode content.
292 * Fix: Removed comments in shortcode output
293
294 ### 4.1.7
295 * New: Categorize, search and filter shortcodes using "tags".
296 * New: Last used shortcode editor will be saved along with shortcode.
297 * New: Enclosed shortcode content can now be used as shortcode parameter.
298 * New: Active line highlight has been enabled for code editor.
299 * Fix: Codemirror has been updated to latest version.
300 * Fix: Minor admin interface enhancements.
301
302 ### 4.1.6
303 * New: Date variables can noe be added into shortcode content.
304 * Fix: Error "trying to get property of non-object" is handled.
305
306 ### 4.1.5
307 * New: Bloginfo variables can now be added into shortcode content.
308
309 ### 4.1.4
310 * New: Codemirror powered syntax highlighted shortcode content code editor (beta).
311
312 ### 4.1.3
313 * Fix: Shortcode names with not-allowed characters cannot be edited/deleted.
314 * New: Shortcode imports made can now be fresh or overwritten.
315 * New: Only users with `manage_options` capability will see "edit shortcode" option in insert window.
316 * Fix: Import failure with UTF-8 characters.
317 * Fix: Case sensitive search in admin pages.
318 * Fix: Minor admin interface changes.
319
320 ### 4.1.2
321 * New: Search box for shortcodes in admin page.
322
323 ### 4.1.1
324 * Fix: HTTP 500 error because of syntax error in import module.
325
326 ### 4.1
327 * New: Import/export feature for shortcodes.
328 * Fix: Visual editor is now disabled by default.
329 * Fix: Added instructions in admin page.
330
331 ### 4.0.3
332 * New: Added feature to sort created shortcodes list.
333 * Fix: HTML errors in admin page
334
335 ### 4.0.2
336 * Fix: Sometimes `get_current_screen()` was called early in some setups.
337
338 ### 4.0.1
339 * Fix: Servers with PHP version < 5.5 were facing HTTP 500 error because of misuse of PHP language construct in code.
340
341 ### 4.0
342 * New: Plugin rewritten from scratch.
343 * New: Brand new administration page
344 * New: Shortcode visibility settings, show/hide in desktop/mobile devices
345 * New: Insert WordPress information into shortcode content.
346 * Fix: Insert shortcode window is not loading.
347 * Fix: Unable to delete the shortcodes
348
349 (Older change logs are removed from this list)
350
351 ## Upgrade Notice
352
353 Version 5.0 is a major release. Shortcodes from v4 will be migrated to the new way of how shortcodes are stored in v5. Also the navigation is moved to the top level under posts/pages.