<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
		<id>https://wiki.nonip.net/index.php?action=history&amp;feed=atom&amp;title=Cms%2Fwordpress%2F%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%BC%E3%83%88%E3%82%B3%E3%83%BC%E3%83%89</id>
		<title>Cms/wordpress/プラグインショートコード - 変更履歴</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.nonip.net/index.php?action=history&amp;feed=atom&amp;title=Cms%2Fwordpress%2F%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%BC%E3%83%88%E3%82%B3%E3%83%BC%E3%83%89"/>
		<link rel="alternate" type="text/html" href="https://wiki.nonip.net/index.php?title=Cms/wordpress/%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%BC%E3%83%88%E3%82%B3%E3%83%BC%E3%83%89&amp;action=history"/>
		<updated>2026-04-24T16:09:27Z</updated>
		<subtitle>このウィキのこのページに関する変更履歴</subtitle>
		<generator>MediaWiki 1.24.2</generator>

	<entry>
		<id>https://wiki.nonip.net/index.php?title=Cms/wordpress/%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%BC%E3%83%88%E3%82%B3%E3%83%BC%E3%83%89&amp;diff=114&amp;oldid=prev</id>
		<title>127.0.0.1: ページの作成:「==記事中の[hw]をhelloworldに変更する==  &lt;?php  /*  Plugin Name: helloworld_shortcode  Plugin URI: http://example.com/plugin.php  Description: 記事中の[hw]...」</title>
		<link rel="alternate" type="text/html" href="https://wiki.nonip.net/index.php?title=Cms/wordpress/%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%BC%E3%83%88%E3%82%B3%E3%83%BC%E3%83%89&amp;diff=114&amp;oldid=prev"/>
				<updated>2015-05-19T17:59:15Z</updated>
		
		<summary type="html">&lt;p&gt;ページの作成:「==記事中の[hw]をhelloworldに変更する==  &amp;lt;?php  /*  Plugin Name: helloworld_shortcode  Plugin URI: http://example.com/plugin.php  Description: 記事中の[hw]...」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==記事中の[hw]をhelloworldに変更する==&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 /*&lt;br /&gt;
 Plugin Name: helloworld_shortcode&lt;br /&gt;
 Plugin URI: http://example.com/plugin.php&lt;br /&gt;
 Description: 記事中の[hw]をhelloworldに変更する&lt;br /&gt;
 Version: 1.0&lt;br /&gt;
 Author: author1&lt;br /&gt;
 Author URI: http://example.com/author1&lt;br /&gt;
 */&lt;br /&gt;
 function hello() {&lt;br /&gt;
     return 'Hello, World!';&lt;br /&gt;
 }&lt;br /&gt;
 add_shortcode('hw', 'hello');&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==記事中の[hw hoge=test]をhelloworldに変更する（パラメータ付）==&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 /*&lt;br /&gt;
 Plugin Name: helloworld_shortcode_param&lt;br /&gt;
 Description: 記事中の[hw hoge=test]をhelloworldに変更する&lt;br /&gt;
 */&lt;br /&gt;
 function hello($atts) {&lt;br /&gt;
     return 'Hello, World!'.$atts['hoge'];&lt;br /&gt;
 }&lt;br /&gt;
 add_shortcode('hw', 'hello');&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==記事中の[hw]hoge[/hw]をhelloworldに変更する（囲い）==&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 /*&lt;br /&gt;
 Plugin Name: helloworld_shortcode_kakoi&lt;br /&gt;
 Description: 記事中の[hw]hoge[/hw]をhelloworldに変更する&lt;br /&gt;
 */&lt;br /&gt;
 function hello($atts, $content = null) {&lt;br /&gt;
     return 'Hello, World!'.$content;&lt;br /&gt;
 }&lt;br /&gt;
 add_shortcode('hw', 'hello');&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ショートコード内で他のショートコードの入れ子を許可する==&lt;br /&gt;
以下のように戻り$contentをdo_shortcodeで囲うとネストが許可される&lt;br /&gt;
 function caption_shortcode($atts, $content = null)&lt;br /&gt;
 {&lt;br /&gt;
     return '&amp;lt;&amp;lt;nowiki /&amp;gt;span class=&amp;quot;caption&amp;quot;&amp;gt;' . do_shortcode($content) . '&amp;lt;/span&amp;gt;';&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==クラス化==&lt;br /&gt;
 class Plugin_ShortCode1&lt;br /&gt;
 {&lt;br /&gt;
   public function exec($atts, $content = null)&lt;br /&gt;
   {&lt;br /&gt;
     return 'Hello, World!' . $content;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 add_shortcode('hw', array('Plugin_ShortCode1', 'exec'));&lt;/div&gt;</summary>
		<author><name>127.0.0.1</name></author>	</entry>

	</feed>