PluginProbe ʕ •ᴥ•ʔ
Shortcoder — Create Shortcodes for Anything / trunk
Shortcoder — Create Shortcodes for Anything vtrunk
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 month ago includes 1 month ago languages 1 month ago readme.txt 1 month ago shortcoder.php 1 month ago
readme.txt
367 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.9.4
11 Stable tag: 6.5.3
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 * **(New) Translation with WPML** - Translate Shortcode content with WPML.
66 * **Revisions** - Revisions support for Shortcode content.
67 * **Locate shortcode** - Search posts and pages where a shortcode is used.
68 * **Extra code** - Include extra code to the footer when a shortcode is used in a page.
69
70 [Get started with Shortcoder - PRO](https://www.aakashweb.com/wordpress-plugins/shortcoder/)
71
72 ### Links
73
74 * [Documentation](https://www.aakashweb.com/docs/shortcoder/)
75 * [FAQs](https://www.aakashweb.com/docs/shortcoder/faq/)
76 * [Support forum/Report bugs](https://www.aakashweb.com/forum/)
77 * [PRO features](https://www.aakashweb.com/wordpress-plugins/shortcoder/#pro)
78
79
80
81 ## Installation
82
83 1. Extract the zipped file and upload the folder `Shortcoder` to to `/wp-content/plugins/` directory.
84 1. Activate the plugin through the `Plugins` menu in WordPress.
85 1. Open the admin page from the "Shortcoder" link in the navigation menu.
86
87
88
89 ## Frequently Asked Questions
90
91 Please visit the [plugin documentation page](https://www.aakashweb.com/docs/shortcoder/) for complete list of FAQs.
92
93 ### What are the allowed characters for shortcode name?
94
95 Allowed characters are alphabets, numbers, hyphens and underscores.
96
97 ### My shortcode is not working in my page builder!
98
99 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.
100
101 ### My shortcode is not working!
102
103 Please check the following if you notice that the shortcode content is not printed or when the output is not as expected.
104
105 * 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.
106 * 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.
107 * 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.
108
109 ### Can I insert PHP code in shortcode content?
110
111 No, right now the plugin supports only HTML, Javascript and CSS as shortcode content.
112
113 ### Can I use block editor or page builders like Elementor, WPBakery to create shortcode?
114
115 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.
116
117
118
119 ## Screenshots
120
121 1. Shortcoder admin page.
122 2. Editing a shortcode.
123 3. "Insert shortcode" popup to select and insert shortcodes.
124 4. A shortcode inserted into post.
125 5. Shortcoder block for Gutenberg editor.
126 6. Shortcoder executed in the post.
127 7. Insert shortcode inline from block editor toolbar.
128
129 [More Screenshots](https://www.aakashweb.com/wordpress-plugins/shortcoder/)
130
131
132
133 ## Changelog
134
135 ### 6.5.3
136 * New: Added general setting to sanitize custom field values before using in shortcode content.
137 * Fix: Support for WordPress 6.9
138
139 ### 6.5.2
140 * Fix: Sanitize custom field value before being inserted into post.
141
142 ### 6.5.1
143 * Fix: Added `null` checks to fix warning in some scenarios.
144
145 ### 6.5
146 * Fix: Support for WordPress 6.8.
147
148 ### 6.4
149 * New: Option to set shortcode display name next to shortcode name.
150 * New: Option to execute WordPress block HTML in shortcode content.
151 * Fix: Shortcoder roles are registered when plugin is activated.
152
153 ### 6.3.2
154 * Fix: Verify permissions while closing Shortcoder changelog.
155
156 ### 6.3.1
157 * Fix: Admin ajax vulnerability with nonce.
158
159 ### 6.3
160 * New: Set default value for the custom field parameters.
161 * New: Custom parameter default value is shown in the insert shortcode popup.
162 * Fix: Restrict access to admin-ajax calls.
163 * Fix: Some admin texts were missing translation.
164 * Fix: Removed the note in the insert popup for fully closed shortcode.
165 * Fix: Debug comment line now has the name of the shortcode.
166
167 ### 6.2
168 * New: Option to show shortcode content in "All shortcodes" page.
169 * Fix: Some texts were not translated.
170 * Fix: Error in WP Bakery page builder while picking images.
171
172 ### 6.1
173 * New: Enhancements to shortcode edit screen meta boxes.
174 * Fix: HTML is escaped in the editor sometimes.
175 * Fix: Support for WordPress 6.1
176
177 ### 6.0
178 * New: PRO version is introduced.
179 * New: Prevent same shortcode nested loop.
180 * New: New actions and filters introduced.
181 * Fix: Post excerpt shortcode parameter now prints full post excerpt.
182 * Fix: Enhancements to input and output data sanitization.
183
184 ### 5.8
185 * New: Option to set description for the shortcode.
186 * New: New actions and filters introduced.
187 * Fix: Minor admin UI enhancements.
188
189 ### 5.7
190 * New: Reordered shortcode column in the "All shortcodes" page.
191 * New: Option to copy shortcode directly from "All shortcodes" page.
192 * New: Filter `sc_mod_content` to modify shortcode content before execution.
193 * Fix: Shortcode won't save if the email field in the feedback form has invalid value.
194 * Fix: Custom parameter with hyphen was not highlighted in code editor.
195 * Fix: Minor admin UI enhancements.
196
197 ### 5.6
198 * New: Shortcodes available to copy/insert are now closed by default.
199 * Fix: Custom parameter value 0 is not displayed.
200 * Fix: Support for WordPress 5.8
201
202 ### 5.5
203 * New: General settings page to configure default editor and shortcode content.
204 * New: Block to insert shortcode rewritten from scratch.
205 * New: Toolbar button to insert shortcodes inline.
206 * New: Shortcodes are now closed by default when inserted from editor.
207 * Fix: Custom fields parsing issue when they are placed next to each other.
208 * Fix: Enclosed content in block input now retains multi-line.
209 * Fix: Minor refinements to UI.
210
211 ### 5.4
212 * New: Code editor is now loaded locally and not from cloudflare.
213 * New: Code editor now shows hints and highlights any syntax error.
214 * New: Hyphens can now be used in shortcode custom parameters.
215 * Fix: Handle scenario where shortcode attribute is received as a string sometimes.
216 * Fix: Notice where `wp_localize_script` was called incorrectly.
217 * Fix: Handle scenario where HTML is passed as shortcode parameter.
218 * New: WordPress requirement changed from 4.4 to 4.9
219
220 ### 5.3.4
221 * New: Tested with WordPress 5.6
222 * Fix: Handle warning with `trim` while fetching page metadata at some pages.
223
224 ### 5.3.3
225 * New: Support for `post slug` as the new shortcode parameter under WordPress information.
226 * New: Codemirror has been updated to latest version.
227 * Fix: Handle code editor loading issue when there is any collision.
228 * Fix: Handle input fields which have empty `id` attribute.
229 * Fix: Handle issue of `$post` object being undefined at some cases.
230 * Fix: Renamed usages of `__class__` to `__CLASS__`
231
232 ### 5.3.2
233 * New: In code editor, shortcodes will be highlighted and code editor font size is slightly bigger.
234
235 ### 5.3.1
236 * New: Code editor is now made the default editor.
237 * Fix: Minor changes to admin UI.
238
239 ### 5.3
240 * New: Added support for underscores in custom parameters.
241 * New: Getting ready for internationalization of the plugin.
242 * Fix: Insert shortcode popup shows duplicate available parameters in case of same parameter with different case.
243
244 ### 5.2.1
245 * Fix: Custom parameters being not replaced in some scenarios.
246 * Fix: Minor enhancement to insert custom parameter form.
247
248 ### 5.2
249 * New: Default values can now be provided to custom parameters.
250 * Fix: Script tags, custom field placeholder and backslash being stripped after saving the shortcode sometimes.
251 * Fix: Rel attribute being modified for links.
252 * New: Added "Manage shortcodes" link to plugin list page for easy access after activation.
253
254 ### 5.1
255 * New: Import/Export link added to the shortcoder list page.
256 * Fix: `empty()` was throwing error at some places for users using PHP 5.5 below as function return value was passed to it.
257 * Fix: Shortcoder QTTags button was loading in frontends.
258 * Fix: "Insert shortcode" popup was hidden behind in theme customizer page.
259 * Fix: `array_key_exists` array but bool given warning.
260 * Fix: Hide comments metabox in shortcode edit page as it was shown in certain conditions.
261
262 ### 5.0.4
263 * Fix: `script` and `style` tags stripped after 4.x upgrade. New migration will run in this version and shortcode content will now be fixed.
264
265 ### 5.0.3
266 * 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.
267
268 ### 5.0.2
269 * Fix: Shortcodes inside shortcode content not getting executed.
270 * Fix: Disable Gutenberg block for older not supported WordPress versions.
271
272 ### 5.0.1
273 * Fix: Code editor escaping HTML characters.
274 * Fix: `get_current_screen()` undefined.
275 * Fix: Code editor breaks if there is any other plugin which loads codemirror.
276 * Fix: `tools.php` is not found.
277
278 ### 5.0
279 * New: Brand new version. Plugin rewritten from scratch.
280 * New: Shortcoder block for the block editor.
281
282 ### 4.4
283 * New: Insert shortcode automatically adds "closing tag" if the shortcode has enclosed content parameter.
284 * Fix: Codemirror has been updated to latest version.
285
286 ### 4.3
287 * New: Edit shortcode name after creating.
288 * New: Post modified date parameter added.
289 * Fix: Date parameters now display in site language.
290
291 ### 4.2
292 * Fix: Some plugins fail to fire onload JS event since it was overwritten by shortcoder.
293 * Fix: Javascript in insert shortcode popup not working in IE 11.
294 * Fix: Missing parenthesis while calling `is_year`.
295 * Fix: Widgets page not loading insert shortcode popup.
296 * Fix: Removed settings emoji icon from plugin actions list.
297 * Fix: Load latest version 5.42.0 of codemirror.
298 * Fix: Updated minimum required WordPress version.
299
300 ### 4.1.9
301 * Fix: Minor UI refinements for better experience.
302 * Fix: Import error where some exported JSON files have 0 as EOF.
303
304 ### 4.1.8
305 * New: Insert custom fields in shortcode content.
306 * Fix: Removed comments in shortcode output
307
308 ### 4.1.7
309 * New: Categorize, search and filter shortcodes using "tags".
310 * New: Last used shortcode editor will be saved along with shortcode.
311 * New: Enclosed shortcode content can now be used as shortcode parameter.
312 * New: Active line highlight has been enabled for code editor.
313 * Fix: Codemirror has been updated to latest version.
314 * Fix: Minor admin interface enhancements.
315
316 ### 4.1.6
317 * New: Date variables can noe be added into shortcode content.
318 * Fix: Error "trying to get property of non-object" is handled.
319
320 ### 4.1.5
321 * New: Bloginfo variables can now be added into shortcode content.
322
323 ### 4.1.4
324 * New: Codemirror powered syntax highlighted shortcode content code editor (beta).
325
326 ### 4.1.3
327 * Fix: Shortcode names with not-allowed characters cannot be edited/deleted.
328 * New: Shortcode imports made can now be fresh or overwritten.
329 * New: Only users with `manage_options` capability will see "edit shortcode" option in insert window.
330 * Fix: Import failure with UTF-8 characters.
331 * Fix: Case sensitive search in admin pages.
332 * Fix: Minor admin interface changes.
333
334 ### 4.1.2
335 * New: Search box for shortcodes in admin page.
336
337 ### 4.1.1
338 * Fix: HTTP 500 error because of syntax error in import module.
339
340 ### 4.1
341 * New: Import/export feature for shortcodes.
342 * Fix: Visual editor is now disabled by default.
343 * Fix: Added instructions in admin page.
344
345 ### 4.0.3
346 * New: Added feature to sort created shortcodes list.
347 * Fix: HTML errors in admin page
348
349 ### 4.0.2
350 * Fix: Sometimes `get_current_screen()` was called early in some setups.
351
352 ### 4.0.1
353 * Fix: Servers with PHP version < 5.5 were facing HTTP 500 error because of misuse of PHP language construct in code.
354
355 ### 4.0
356 * New: Plugin rewritten from scratch.
357 * New: Brand new administration page
358 * New: Shortcode visibility settings, show/hide in desktop/mobile devices
359 * New: Insert WordPress information into shortcode content.
360 * Fix: Insert shortcode window is not loading.
361 * Fix: Unable to delete the shortcodes
362
363 (Older change logs are removed from this list)
364
365 ## Upgrade Notice
366
367 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.