<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>wp-cli &#8211; WordPress Memo</title>
	<atom:link href="https://blog.riverforest-wp.info/tag/wp-cli/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.riverforest-wp.info</link>
	<description>WordPress に関する覚え書き</description>
	<lastBuildDate>Fri, 09 May 2025 12:48:52 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://blog.riverforest-wp.info/wp-content/uploads/2018/05/cropped-icon-256x256-1-32x32.png</url>
	<title>wp-cli &#8211; WordPress Memo</title>
	<link>https://blog.riverforest-wp.info</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>WordPress 6.4 からの Lightbox 追加を一括で行う</title>
		<link>https://blog.riverforest-wp.info/wp64-lightbox-wpcli/</link>
		
		<dc:creator><![CDATA[Katsushi Kawamori]]></dc:creator>
		<pubDate>Sat, 30 Sep 2023 01:48:38 +0000</pubDate>
				<category><![CDATA[Function]]></category>
		<category><![CDATA[Lightbox]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress 6.4]]></category>
		<category><![CDATA[wp-cli]]></category>
		<guid isPermaLink="false">https://blog.riverforest-wp.info/?p=3405</guid>

					<description><![CDATA[はじめに WordPress 6.4 から、Lightbox 機能が追加されます。投稿内の html のコメント部分を変更します。具体的には、wp:image の中に、lightbox&#8221;:{&#8220;en [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">はじめに</h3>



<p class="wp-block-paragraph">WordPress 6.4 から、Lightbox 機能が追加されます。投稿内の html のコメント部分を変更します。具体的には、wp:image の中に、lightbox&#8221;:{&#8220;enabled&#8221;:true} を加える形式です。</p>



<figure class="wp-block-video aligncenter"><video height="778" style="aspect-ratio: 1458 / 778;" width="1458" controls src="https://blog.riverforest-wp.info/wp-content/uploads/20230930/wp-lightbox.mp4"></video></figure>



<p class="wp-block-paragraph">以前からのサイトに適用させる場合は、html 内の wp:image にこれを追加すれば良いので、WP-CLI でサイト内の全投稿と全固定ページを一括で変更するものを作ってみました。</p>



<p class="wp-block-paragraph">WP-CLI が必要です。</p>



<pre class="prism line-numbers"><code class="language-php language-html">/* 第１引数：on で、Lightbox を On。off で、Lightbox を Off */
wp box on
wp box off
/* 第２引数：投稿や画像のID を指定できる */
wp box off 9110 /* 投稿 ID 9110 のみ Off */
wp box on 9031 /* メディア ID 9031 のみ On */</code></pre>



<h3 class="wp-block-heading">コード</h3>



<style>
.simpleblogcard_img_blockc26fd4407227fcfc5ff776d1d2d49557 {
  float: right;
  padding: 10px;
}
.simpleblogcard_borderc26fd4407227fcfc5ff776d1d2d49557 {
  border-left: solid 8px #cd162c;
  padding: 0.25em 0.25em;
  background: transparent;
}
.simpleblogcard_titlec26fd4407227fcfc5ff776d1d2d49557 {
  line-height: 155%;
  font-weight: bold;
  display: block;
}
.simpleblogcard_descriptionc26fd4407227fcfc5ff776d1d2d49557 {
  line-height: 155%;
  color: #333;
}
</style>
<div class="simpleblogcard_wrap">
			<a style="text-decoration: none;" href=https://github.com/katsushi-kawamori/wp-cli-Lightbox-command-on-off/ target="_blank" rel="noopener">
			<div class="simpleblogcard_inner">
		<div class="simpleblogcard_borderc26fd4407227fcfc5ff776d1d2d49557">
			github.com			<div class="simpleblogcard_titlec26fd4407227fcfc5ff776d1d2d49557">
				GitHub &#8211; katsushi-kawamori/wp-cli-Lightbox-command-on-off · GitHub			</div>
							<div class="simpleblogcard_descriptionc26fd4407227fcfc5ff776d1d2d49557">
					Contribute to katsushi-kawamori/wp-cli-Lightbox-command-on-off development by creating an &#8230;				</div>
					</div>
	</div>
	<div style="clear: both;"></div>
	</a>
</div>



<h3 class="wp-block-heading">使い方</h3>



<figure class="wp-block-video aligncenter"><video height="742" style="aspect-ratio: 1412 / 742;" width="1412" controls src="https://blog.riverforest-wp.info/wp-content/uploads/20230930/wp-lightbox-cli-2.mp4"></video></figure>
]]></content:encoded>
					
		
		<enclosure url="https://blog.riverforest-wp.info/wp-content/uploads/20230930/wp-lightbox.mp4" length="25853129" type="video/mp4" />
<enclosure url="https://blog.riverforest-wp.info/wp-content/uploads/20230930/wp-lightbox-cli-2.mp4" length="47912265" type="video/mp4" />

			</item>
	</channel>
</rss>
