Shortcoder

Описание

Shortcoder plugin allows to create a custom shortcodes for HTML, JavaScript and other snippets. Now the shortcodes can be used in posts/pages and the snippet will be replaced in place.

Create custom shortcodes easily

  1. Give a name for the shortcode
  2. Paste the HTML/JavaScript as content
  3. Save !
  4. Now insert the shortcode [sc name="my_shortcode"] in your post/page.
  5. Voila ! You got the HTML/Javascript in your post.

Features

  • Create „custom shortcodes“ easily and use them within WordPress
  • Use any kind of HTML as Shortcode content.
  • Insert: Custom parameters in shortcode
  • Insert: WordPress parameters in shortcode
  • Multiple editors: Code, Visual and text modes.
  • Globally disable the shortcode when not needed.

An example usage

  1. Create a shortcode named „adsenseAd“ in the Shortcoder admin page.
  2. Paste the adsense code in the box given and save it.
  3. Use [sc name="adsenseAd"] in your posts and pages.
  4. Tada !!! the ad code is replaced and it appears in the post.
  5. Now you can edit the ad code at one place and the code is updated in all the locations where the shortcode is used.
  • Using this idea, shortcodes can be created for frequently used snippets.
  • You can also add custom parameters (like %%id%%) inside the snippets, and change it’s value like [sc name="youtube" id="GrlRADfvjII"]

Resources

Снимки на разширението

  • Shortcoder admin page.
  • Editing a shortcode.
  • "Insert shortcode" popup to select and insert shortcodes.
  • A shortcode inserted into post.
  • Shortcoder block for Gutenberg editor.
  • Shortcoder executed in the post.

Blocks

This plugin provides 1 block.

shortcoder/shortcoder
Shortcoder

Инсталиране

  1. Extract the zipped file and upload the folder Shortcoder to to /wp-content/plugins/ directory.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Open the admin page from the „Shortcoder“ link in the navigation menu.

ЧЗВ

Please visit the plugin documentation page for complete list of FAQs.

What are the allowed characters for shortcode name ?

Allowed characters are alphabets, numbers, hyphens and underscores.

My shortcode is not working in my page builder !

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.

My shortcode is not working !

Please check the following if you notice that the shortcode content is not printed or when the output is not as expected.

  • 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.
  • 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.
  • There is a known limitation in shortcodes API when there is a combination of unclosed and closed shortcodes. Please refer this document for more information.

Отзиви

29.03.2020
Always nice when a plugin and support are excellent! I had a little issue (that wasn't the fault of Shortcoder, but when I posted the question for support, I got a very quick reply and I was then able to resolve the issue quickly. The plugin works flawlessly. And the support is excellent. So, I give this two thumbs up! (5 thumbs up if I had that many). Gary M. Gordon
12.02.2020
First shortcode plugin that is inserting whatever I want... An excellent time-saving plugin!
24.01.2020
I can't customize my page/post without this wonderful plugin. Thank you very much for your great effort and time to bring this plugin to us.
Прочетете всички 166 отзива

Сътрудници и разработчици

“Shortcoder” е софтуер с отворен код. Към разширението са допринесли следните хора.

Сътрудници

“Shortcoder” е преведено на 6 езика. Благодарности на преводачите за техния принос.

Превеждане на “Shortcoder” на вашия език.

Имате интерес към разработване?

Преглеждане на кода, разглеждане на SVN хранилище, или абонамент към програмната история (log) чрез RSS.

Списък с промени

5.3

  • New: Added support for underscores in custom parameters.
  • New: Getting ready for internationalization of the plugin.
  • Fix: Insert shortcode popup shows duplicate available parameters in case of same parameter with different case.

5.2.1

  • Fix: Custom parameters being not replaced in some scenarios.
  • Fix: Minor enhancement to insert custom parameter form.

5.2

  • New: Default values can now be provided to custom parameters.
  • Fix: Script tags, custom field placeholder and backslash being stripped after saving the shortcode sometimes.
  • Fix: Rel attribute being modified for links.
  • New: Added „Manage shortcodes“ link to plugin list page for easy access after activation.

5.1

  • New: Import/Export link added to the shortcoder list page.
  • Fix: empty() was throwing error at some places for users using PHP 5.5 below as function return value was passed to it.
  • Fix: Shortcoder QTTags button was loading in frontends.
  • Fix: „Insert shortcode“ popup was hidden behind in theme customizer page.
  • Fix: array_key_exists array but bool given warning.
  • Fix: Hide comments metabox in shortcode edit page as it was shown in certain conditions.

5.0.4

  • Fix: script and style tags stripped after 4.x upgrade. New migration will run in this version and shortcode content will now be fixed.

5.0.3

  • 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.

5.0.2

  • Fix: Shortcodes inside shortcode content not getting executed.
  • Fix: Disable Gutenberg block for older not supported WordPress versions.

5.0.1

  • Fix: Code editor escaping HTML characters.
  • Fix: get_current_screen() undefined.
  • Fix: Code editor breaks if there is any other plugin which loads codemirror.
  • Fix: tools.php is not found.

5.0

  • New: Brand new version. Plugin rewritten from scratch.
  • New: Shortcoder block for the block editor.

4.4

  • New: Insert shortcode automatically adds „closing tag“ if the shortcode has enclosed content parameter.
  • Fix: Codemirror has been updated to latest version.

4.3

  • New: Edit shortcode name after creating.
  • New: Post modified date parameter added.
  • Fix: Date parameters now display in site language.

4.2

  • Fix: Some plugins fail to fire onload JS event since it was overwritten by shortcoder.
  • Fix: Javascript in insert shortcode popup not working in IE 11.
  • Fix: Missing parenthesis while calling is_year.
  • Fix: Widgets page not loading insert shortcode popup.
  • Fix: Removed settings emoji icon from plugin actions list.
  • Fix: Load latest version 5.42.0 of codemirror.
  • Fix: Updated minimum required WordPress version.

4.1.9

  • Fix: Minor UI refinements for better experience.
  • Fix: Import error where some exported JSON files have 0 as EOF.

4.1.8

  • New: Insert custom fields in shortcode content.
  • Fix: Removed comments in shortcode output

4.1.7

  • New: Categorize, search and filter shortcodes using „tags“.
  • New: Last used shortcode editor will be saved along with shortcode.
  • New: Enclosed shortcode content can now be used as shortcode parameter.
  • New: Active line highlight has been enabled for code editor.
  • Fix: Codemirror has been updated to latest version.
  • Fix: Minor admin interface enhancements.

4.1.6

  • New: Date variables can noe be added into shortcode content.
  • Fix: Error „trying to get property of non-object“ is handled.

4.1.5

  • New: Bloginfo variables can now be added into shortcode content.

4.1.4

  • New: Codemirror powered syntax highlighted shortcode content code editor (beta).

4.1.3

  • Fix: Shortcode names with not-allowed characters cannot be edited/deleted.
  • New: Shortcode imports made can now be fresh or overwritten.
  • New: Only users with manage_options capability will see „edit shortcode“ option in insert window.
  • Fix: Import failure with UTF-8 characters.
  • Fix: Case sensitive search in admin pages.
  • Fix: Minor admin interface changes.

4.1.2

  • New: Search box for shortcodes in admin page.

4.1.1

  • Fix: HTTP 500 error because of syntax error in import module.

4.1

  • New: Import/export feature for shortcodes.
  • Fix: Visual editor is now disabled by default.
  • Fix: Added instructions in admin page.

4.0.3

  • New: Added feature to sort created shortcodes list.
  • Fix: HTML errors in admin page

4.0.2

  • Fix: Sometimes get_current_screen() was called early in some setups.

4.0.1

  • Fix: Servers with PHP version < 5.5 were facing HTTP 500 error because of misuse of PHP language construct in code.

4.0

  • New: Plugin rewritten from scratch.
  • New: Brand new administration page
  • New: Shortcode visibility settings, show/hide in desktop/mobile devices
  • New: Insert WordPress information into shortcode content.
  • Fix: Insert shortcode window is not loading.
  • Fix: Unable to delete the shortcodes

(Older changelogs are removed from this list)