AI助手支持GPT4.0
In my blog I use pages for the gallery.
在我的博客中,我使用画廊页面。
I have a main index Gallery that has children for each year which contain the actual gallery pages.
我有一个主索引Gallery,该索引每年都有包含实际画廊页面的子代。 p>
I wanted to display a random image from this gallery and couldn’t find a plugin to do it so I wrote my own.
我想从这个画廊中显示一张随机图片,找不到能做到的插件,所以我自己写了。
Usage is really simple:
用法非常简单:
The following line in your template 'Gallery', 'class' =>'alignleft', 'x' => 125, 'y' => 125))模板中的以下行 <?php echo DG_Random_Image(array('title'=>'Gallery','class'=>'alignleft','x'=> 125,'y'=> 125)) ;; ?> or just use the widget.?> code>或只使用小部件。 p>title is the name of the index page, no pictures will be taken from this page, only from childpages. title em>是索引页面的名称,仅从子页面不会从该页面拍摄照片。 p>class is an optional class to assign to the image class em>是分配给图片的可选类 p>x is the width to assign to the thumbnail x em>是分配给缩略图的宽度 p>y is the height to assign to the thumbnail y em>是分配给缩略图的高度 p>It will output the thumbnail for this picture with the given dimensions, linked to the page it belongs to.它将以给定的尺寸输出此图片的缩略图,并链接到其所属的页面。 p>
'Gallery', 'class' =>'alignleft', 'x' => 125, 'y' => 125))模板中的以下行 <?php echo DG_Random_Image(array('title'=>'Gallery','class'=>'alignleft','x'=> 125,'y'=> 125)) ;; ?> or just use the widget.?> code>或只使用小部件。 p>title is the name of the index page, no pictures will be taken from this page, only from childpages. title em>是索引页面的名称,仅从子页面不会从该页面拍摄照片。 p>class is an optional class to assign to the image class em>是分配给图片的可选类 p>x is the width to assign to the thumbnail x em>是分配给缩略图的宽度 p>y is the height to assign to the thumbnail y em>是分配给缩略图的高度 p>It will output the thumbnail for this picture with the given dimensions, linked to the page it belongs to.它将以给定的尺寸输出此图片的缩略图,并链接到其所属的页面。 p>
模板中的以下行 <?php echo DG_Random_Image(array('title'=>'Gallery','class'=>'alignleft','x'=> 125,'y'=> 125)) ;; ?> or just use the widget.
<?php echo DG_Random_Image(array('title'=>'Gallery','class'=>'alignleft','x'=> 125,'y'=> 125)) ;; ?>
;
?>
?> code>或只使用小部件。 p>
title is the name of the index page, no pictures will be taken from this page, only from childpages.
title em>是索引页面的名称,仅从子页面不会从该页面拍摄照片。 p>class is an optional class to assign to the image class em>是分配给图片的可选类 p>x is the width to assign to the thumbnail x em>是分配给缩略图的宽度 p>y is the height to assign to the thumbnail y em>是分配给缩略图的高度 p>It will output the thumbnail for this picture with the given dimensions, linked to the page it belongs to.它将以给定的尺寸输出此图片的缩略图,并链接到其所属的页面。 p>
class is an optional class to assign to the image
class em>是分配给图片的可选类 p>x is the width to assign to the thumbnail x em>是分配给缩略图的宽度 p>y is the height to assign to the thumbnail y em>是分配给缩略图的高度 p>It will output the thumbnail for this picture with the given dimensions, linked to the page it belongs to.它将以给定的尺寸输出此图片的缩略图,并链接到其所属的页面。 p>
x is the width to assign to the thumbnail
x em>是分配给缩略图的宽度 p>y is the height to assign to the thumbnail y em>是分配给缩略图的高度 p>It will output the thumbnail for this picture with the given dimensions, linked to the page it belongs to.它将以给定的尺寸输出此图片的缩略图,并链接到其所属的页面。 p>
y is the height to assign to the thumbnail
y em>是分配给缩略图的高度 p>It will output the thumbnail for this picture with the given dimensions, linked to the page it belongs to.它将以给定的尺寸输出此图片的缩略图,并链接到其所属的页面。 p>
It will output the thumbnail for this picture with the given dimensions, linked to the page it belongs to.
它将以给定的尺寸输出此图片的缩略图,并链接到其所属的页面。 p>
Installation is easy:
安装简单: p>
DG_Random_Image
/wp-content/plugins/
DG_Random_Image code>文件夹及其内容上传到 / wp-content / plugins / code>目录 li>Activate the plugin through the ‘Plugins’ menu in WordPress通过WordPress中的“插件”菜单激活插件 li>Place 'Gallery', 'class' =>'alignleft', 'x' => 125, 'y' => 125));放置 <?php echo DG_Random_Image(array('title'=>'Gallery','class'=>'alignleft','x'=> 125,'y'=> 125))); ?> in your templates?> code>在您的模板中 li>
/ wp-content / plugins / code>目录 li>Activate the plugin through the ‘Plugins’ menu in WordPress通过WordPress中的“插件”菜单激活插件 li>Place 'Gallery', 'class' =>'alignleft', 'x' => 125, 'y' => 125));放置 <?php echo DG_Random_Image(array('title'=>'Gallery','class'=>'alignleft','x'=> 125,'y'=> 125))); ?> in your templates?> code>在您的模板中 li>
'Gallery', 'class' =>'alignleft', 'x' => 125, 'y' => 125));放置 <?php echo DG_Random_Image(array('title'=>'Gallery','class'=>'alignleft','x'=> 125,'y'=> 125))); ?> in your templates?> code>在您的模板中 li>
<?php echo DG_Random_Image(array('title'=>'Gallery','class'=>'alignleft','x'=> 125,'y'=> 125))); ?>
?> code>在您的模板中 li>
ol>
原文出处:http://www.sanshu.cn/a/10757.html
群主管理都是支付大佬