PluginProbe ʕ •ᴥ•ʔ
Shortcoder — Create Shortcodes for Anything / 6.5
Shortcoder — Create Shortcodes for Anything v6.5
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
357 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.8
11 Stable tag: 6.5
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
136 * Fix: Support for WordPress 6.8.
137
138 ### 6.4
139 * New: Option to set shortcode display name next to shortcode name.
140 * New: Option to execute WordPress block HTML in shortcode content.
141 * Fix: Shortcoder roles are registered when plugin is activated.
142
143 ### 6.3.2
144 * Fix: Verify permissions while closing Shortcoder changelog.
145
146 ### 6.3.1
147 * Fix: Admin ajax vulnerability with nonce.
148
149 ### 6.3
150 * New: Set default value for the custom field parameters.
151 * New: Custom parameter default value is shown in the insert shortcode popup.
152 * Fix: Restrict access to admin-ajax calls.
153 * Fix: Some admin texts were missing translation.
154 * Fix: Removed the note in the insert popup for fully closed shortcode.
155 * Fix: Debug comment line now has the name of the shortcode.
156
157 ### 6.2
158 * New: Option to show shortcode content in "All shortcodes" page.
159 * Fix: Some texts were not translated.
160 * Fix: Error in WP Bakery page builder while picking images.
161
162 ### 6.1
163 * New: Enhancements to shortcode edit screen meta boxes.
164 * Fix: HTML is escaped in the editor sometimes.
165 * Fix: Support for WordPress 6.1
166
167 ### 6.0
168 * New: PRO version is introduced.
169 * New: Prevent same shortcode nested loop.
170 * New: New actions and filters introduced.
171 * Fix: Post excerpt shortcode parameter now prints full post excerpt.
172 * Fix: Enhancements to input and output data sanitization.
173
174 ### 5.8
175 * New: Option to set description for the shortcode.
176 * New: New actions and filters introduced.
177 * Fix: Minor admin UI enhancements.
178
179 ### 5.7
180 * New: Reordered shortcode column in the "All shortcodes" page.
181 * New: Option to copy shortcode directly from "All shortcodes" page.
182 * New: Filter `sc_mod_content` to modify shortcode content before execution.
183 * Fix: Shortcode won't save if the email field in the feedback form has invalid value.
184 * Fix: Custom parameter with hyphen was not highlighted in code editor.
185 * Fix: Minor admin UI enhancements.
186
187 ### 5.6
188 * New: Shortcodes available to copy/insert are now closed by default.
189 * Fix: Custom parameter value 0 is not displayed.
190 * Fix: Support for WordPress 5.8
191
192 ### 5.5
193 * New: General settings page to configure default editor and shortcode content.
194 * New: Block to insert shortcode rewritten from scratch.
195 * New: Toolbar button to insert shortcodes inline.
196 * New: Shortcodes are now closed by default when inserted from editor.
197 * Fix: Custom fields parsing issue when they are placed next to each other.
198 * Fix: Enclosed content in block input now retains multi-line.
199 * Fix: Minor refinements to UI.
200
201 ### 5.4
202 * New: Code editor is now loaded locally and not from cloudflare.
203 * New: Code editor now shows hints and highlights any syntax error.
204 * New: Hyphens can now be used in shortcode custom parameters.
205 * Fix: Handle scenario where shortcode attribute is received as a string sometimes.
206 * Fix: Notice where `wp_localize_script` was called incorrectly.
207 * Fix: Handle scenario where HTML is passed as shortcode parameter.
208 * New: WordPress requirement changed from 4.4 to 4.9
209
210 ### 5.3.4
211 * New: Tested with WordPress 5.6
212 * Fix: Handle warning with `trim` while fetching page metadata at some pages.
213
214 ### 5.3.3
215 * New: Support for `post slug` as the new shortcode parameter under WordPress information.
216 * New: Codemirror has been updated to latest version.
217 * Fix: Handle code editor loading issue when there is any collision.
218 * Fix: Handle input fields which have empty `id` attribute.
219 * Fix: Handle issue of `$post` object being undefined at some cases.
220 * Fix: Renamed usages of `__class__` to `__CLASS__`
221
222 ### 5.3.2
223 * New: In code editor, shortcodes will be highlighted and code editor font size is slightly bigger.
224
225 ### 5.3.1
226 * New: Code editor is now made the default editor.
227 * Fix: Minor changes to admin UI.
228
229 ### 5.3
230 * New: Added support for underscores in custom parameters.
231 * New: Getting ready for internationalization of the plugin.
232 * Fix: Insert shortcode popup shows duplicate available parameters in case of same parameter with different case.
233
234 ### 5.2.1
235 * Fix: Custom parameters being not replaced in some scenarios.
236 * Fix: Minor enhancement to insert custom parameter form.
237
238 ### 5.2
239 * New: Default values can now be provided to custom parameters.
240 * Fix: Script tags, custom field placeholder and backslash being stripped after saving the shortcode sometimes.
241 * Fix: Rel attribute being modified for links.
242 * New: Added "Manage shortcodes" link to plugin list page for easy access after activation.
243
244 ### 5.1
245 * New: Import/Export link added to the shortcoder list page.
246 * Fix: `empty()` was throwing error at some places for users using PHP 5.5 below as function return value was passed to it.
247 * Fix: Shortcoder QTTags button was loading in frontends.
248 * Fix: "Insert shortcode" popup was hidden behind in theme customizer page.
249 * Fix: `array_key_exists` array but bool given warning.
250 * Fix: Hide comments metabox in shortcode edit page as it was shown in certain conditions.
251
252 ### 5.0.4
253 * Fix: `script` and `style` tags stripped after 4.x upgrade. New migration will run in this version and shortcode content will now be fixed.
254
255 ### 5.0.3
256 * 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.
257
258 ### 5.0.2
259 * Fix: Shortcodes inside shortcode content not getting executed.
260 * Fix: Disable Gutenberg block for older not supported WordPress versions.
261
262 ### 5.0.1
263 * Fix: Code editor escaping HTML characters.
264 * Fix: `get_current_screen()` undefined.
265 * Fix: Code editor breaks if there is any other plugin which loads codemirror.
266 * Fix: `tools.php` is not found.
267
268 ### 5.0
269 * New: Brand new version. Plugin rewritten from scratch.
270 * New: Shortcoder block for the block editor.
271
272 ### 4.4
273 * New: Insert shortcode automatically adds "closing tag" if the shortcode has enclosed content parameter.
274 * Fix: Codemirror has been updated to latest version.
275
276 ### 4.3
277 * New: Edit shortcode name after creating.
278 * New: Post modified date parameter added.
279 * Fix: Date parameters now display in site language.
280
281 ### 4.2
282 * Fix: Some plugins fail to fire onload JS event since it was overwritten by shortcoder.
283 * Fix: Javascript in insert shortcode popup not working in IE 11.
284 * Fix: Missing parenthesis while calling `is_year`.
285 * Fix: Widgets page not loading insert shortcode popup.
286 * Fix: Removed settings emoji icon from plugin actions list.
287 * Fix: Load latest version 5.42.0 of codemirror.
288 * Fix: Updated minimum required WordPress version.
289
290 ### 4.1.9
291 * Fix: Minor UI refinements for better experience.
292 * Fix: Import error where some exported JSON files have 0 as EOF.
293
294 ### 4.1.8
295 * New: Insert custom fields in shortcode content.
296 * Fix: Removed comments in shortcode output
297
298 ### 4.1.7
299 * New: Categorize, search and filter shortcodes using "tags".
300 * New: Last used shortcode editor will be saved along with shortcode.
301 * New: Enclosed shortcode content can now be used as shortcode parameter.
302 * New: Active line highlight has been enabled for code editor.
303 * Fix: Codemirror has been updated to latest version.
304 * Fix: Minor admin interface enhancements.
305
306 ### 4.1.6
307 * New: Date variables can noe be added into shortcode content.
308 * Fix: Error "trying to get property of non-object" is handled.
309
310 ### 4.1.5
311 * New: Bloginfo variables can now be added into shortcode content.
312
313 ### 4.1.4
314 * New: Codemirror powered syntax highlighted shortcode content code editor (beta).
315
316 ### 4.1.3
317 * Fix: Shortcode names with not-allowed characters cannot be edited/deleted.
318 * New: Shortcode imports made can now be fresh or overwritten.
319 * New: Only users with `manage_options` capability will see "edit shortcode" option in insert window.
320 * Fix: Import failure with UTF-8 characters.
321 * Fix: Case sensitive search in admin pages.
322 * Fix: Minor admin interface changes.
323
324 ### 4.1.2
325 * New: Search box for shortcodes in admin page.
326
327 ### 4.1.1
328 * Fix: HTTP 500 error because of syntax error in import module.
329
330 ### 4.1
331 * New: Import/export feature for shortcodes.
332 * Fix: Visual editor is now disabled by default.
333 * Fix: Added instructions in admin page.
334
335 ### 4.0.3
336 * New: Added feature to sort created shortcodes list.
337 * Fix: HTML errors in admin page
338
339 ### 4.0.2
340 * Fix: Sometimes `get_current_screen()` was called early in some setups.
341
342 ### 4.0.1
343 * Fix: Servers with PHP version < 5.5 were facing HTTP 500 error because of misuse of PHP language construct in code.
344
345 ### 4.0
346 * New: Plugin rewritten from scratch.
347 * New: Brand new administration page
348 * New: Shortcode visibility settings, show/hide in desktop/mobile devices
349 * New: Insert WordPress information into shortcode content.
350 * Fix: Insert shortcode window is not loading.
351 * Fix: Unable to delete the shortcodes
352
353 (Older change logs are removed from this list)
354
355 ## Upgrade Notice
356
357 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.