- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
関数リファレンス/shortcode exists
提供: WordPress Codex 日本語版
Description
Checks whether a specific shortcode exists.
Parameters
- $tag
- (string) (必須) The shortcode to check for.
- 初期値: なし
Return
- (bool)
- True if the shortcode has been registered, false otherwise.
Usage
%%% <?php if ( shortcode_exists( 'gallery' ) ) { } ?> %%%
Example
<?php if ( shortcode_exists( 'gallery' ) ) { // The [gallery] short code exists. } ?>
Change Log
- Since: 3.6.0
Source File
shortcode_exists() is located in wp-includes/shortcodes.php
.
Related
ショートコード: do_shortcode(), add_shortcode(), remove_shortcode(), remove_all_shortcodes(), shortcode_atts(), strip_shortcodes(), shortcode_exists(), has_shortcode(), get_shortcode_regex(), wp_audio_shortcode(), wp_video_shortcode(), フィルター no_texturize_shortcodes /en
関数リファレンス、テンプレートタグ目次もご覧ください。