Title: A Shortcode Tester
Author: Magenta Cuda
Published: <strong>21 Tháng 10, 2015</strong>
Last modified: 3 Tháng 1, 2020

---

Tìm kiếm plugin

Plugin này **chưa được cập nhật với 3 phiên bản mới nhất của WordPress**. Nó có 
thể không được hỗ trợ và bảo trì, và có thể xung đột với các phiên bản WordPress
mới nhất.

![](https://s.w.org/plugins/geopattern-icon/shortcode-tester.svg)

# A Shortcode Tester

 Bởi [Magenta Cuda](https://profiles.wordpress.org/magenta-cuda/)

[Tải về](https://downloads.wordpress.org/plugin/shortcode-tester.1.2.2.zip)

 * [Chi tiết](https://vi.wordpress.org/plugins/shortcode-tester/#description)
 * [Đánh giá](https://vi.wordpress.org/plugins/shortcode-tester/#reviews)
 *  [Cài đặt](https://vi.wordpress.org/plugins/shortcode-tester/#installation)
 * [Nhà phát triển](https://vi.wordpress.org/plugins/shortcode-tester/#developers)

 [Hỗ trợ](https://wordpress.org/support/plugin/shortcode-tester/)

## Mô tả

The Shortcode Tester is a post editor tool for WordPress developers that displays
in a popup window the HTML generated by WordPress shortcodes, i.e. so you can quickly
view the generated HTML without having to view the entire post. Please visit [https://github.com/magenta-cuda/shortcode-tester/blob/master/README.md](https://github.com/magenta-cuda/shortcode-tester/blob/master/README.md)
for a very quick introduction.

## Ảnh màn hình

 * [[
 * The Shortcode Tester

## Cài đặt

 1. Download the plugin from the WordPress repository.
 2. Open the ‘Plugins’ menu item and activate the plugin.
 3. Read the tutorial at [https://github.com/magenta-cuda/shortcode-tester/blob/master/README.md](https://github.com/magenta-cuda/shortcode-tester/blob/master/README.md).

## Hỏi đáp

  “Show Rendered” shows more than the shortcode HTML elements.

“The Shortcode Tester” tries to hide HTML elements that are not part of the shortcode.
It assumes that the current theme uses the standard WordPress framework for emitting
the header, the content, sidebars and the footer ( actions/filters such as ‘the_content’,‘
get_sidebar’, ‘get_footer’, … ). If the current theme deviates from this framework“
The Shortcode Tester” will not be able to properly identify the header, sidebars
and/or the footer.

  “Show Rendered” shows less than the shortcode HTML elements.

In addition to the HTML elements emitted by the PHP code for the shortcode, the 
shortcode may have JavaScript code to dynamically emit additional HTML elements.
The shortcode tester hides non shortcode HTML elements by setting the CSS display
property to none and changing the element id. These changes may affect the execution
of the shortcode’s JavaScript code.

  “Show Rendered” vs “Alt Show Rendered”

“Show Rendered” allows all JavaScript code to execute. Unfortunately, the shortcode
tester hides non shortcode HTML elements and this may cause some JavaScript code
to abort which prevents the execution of the shortcode’s JavaScript code. “Alt Show
Rendered” suppresses the execution of the theme’s JavaScript code and this may allow
the shortcode’s JavaScript code to execute.

  Does “Show Rendered” require that the shortcode have support for Gutenberg blocks?

No. “Show Rendered” does not use Gutenberg blocks. It uses the WordPress server 
to render the shortcode as it would when the page is requested from the browser 
and tries to skip rendering everything but the shortcode. In particular, it will
work with old plugins that do not have support for Gutenberg blocks.

## Đánh giá

![](https://secure.gravatar.com/avatar/8c0ced2ad5a0c50ec3a0903b1d1946b4309a9b5e4ed01ff7f8d40bc710f49e3e?
s=60&d=retro&r=g)

### 󠀁[Very Valuable If You Develop/Learn Shortcodes.](https://wordpress.org/support/topic/very-valuable-if-you-developlearn-shortcodes/)󠁿

 [nick6352683](https://profiles.wordpress.org/nick6352683/) 3 Tháng 9, 2016

This plugin is pure magic ! Saves me time from hunting down the html code that a
shortcode generates. THANK YOU !

 [ Đọc tất cả 1 đánh giá ](https://wordpress.org/support/plugin/shortcode-tester/reviews/)

## Người đóng góp & Lập trình viên

“A Shortcode Tester” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp

 *   [ Magenta Cuda ](https://profiles.wordpress.org/magenta-cuda/)

[Dịch “A Shortcode Tester” sang ngôn ngữ của bạn.](https://translate.wordpress.org/projects/wp-plugins/shortcode-tester)

### Muốn tham gia phát triển?

[Duyệt code](https://plugins.trac.wordpress.org/browser/shortcode-tester/), check
out [SVN repository](https://plugins.svn.wordpress.org/shortcode-tester/), hoặc 
theo dõi [nhật ký phát triển](https://plugins.trac.wordpress.org/log/shortcode-tester/)
qua [RSS](https://plugins.trac.wordpress.org/log/shortcode-tester/?limit=100&mode=stop_on_copy&format=rss).

## Nhật ký thay đổi

#### 1.2.2

 * added “Alt Show Rendered” button which prevent the theme’s scripts from running

#### 1.2.1

 * fix problem with non permalink URL’s
 * fix “permalink not found” error after updating to WordPress 5.3
 * fix problem with “Show Rendered” on posts of type ‘post’

#### 1.2

 * add support for Gutenberg

#### 1.1.1.1

 * fix major bug where shortcode evaluation was wrong if it was dependent on is_admin()
   === false

#### 1.1.1

 * disable false warnings from DOMDocument

#### 1.1

 * add prettify option
 * refactor to improve software quality

#### 1.0.1.1

 * Code rewritten to improve software quality

#### 1.0.1

 * Fix namespace problem

#### 1.0

 * Initial release.

## Meta

 *  Phiên bản **1.2.2**
 *  Cập nhật lần cuối **6 năm trước**
 *  Số lượt cài đặt **10+**
 *  Phiên bản WordPress ** 3.6 hoặc cao hơn **
 *  Đã kiểm tra lên đến **5.3.21**
 *  Ngôn ngữ
 * [English (US)](https://wordpress.org/plugins/shortcode-tester/)
 * Thẻ
 * [shortcode](https://vi.wordpress.org/plugins/tags/shortcode/)[tester](https://vi.wordpress.org/plugins/tags/tester/)
   [tool](https://vi.wordpress.org/plugins/tags/tool/)
 *  [Nâng cao](https://vi.wordpress.org/plugins/shortcode-tester/advanced/)

## Đánh giá

 5 trên 5 sao.

 *  [  1 5-star review     ](https://wordpress.org/support/plugin/shortcode-tester/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/shortcode-tester/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/shortcode-tester/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/shortcode-tester/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/shortcode-tester/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/shortcode-tester/reviews/#new-post)

[Xem tất cả đánh giá](https://wordpress.org/support/plugin/shortcode-tester/reviews/)

## Những người đóng góp

 *   [ Magenta Cuda ](https://profiles.wordpress.org/magenta-cuda/)

## Hỗ trợ

Có điều gì muốn nói? cần giúp đỡ?

 [Xem diễn đàn hỗ trợ](https://wordpress.org/support/plugin/shortcode-tester/)