[wordpress插件] Before/After之前/之后

wordpress 插件 文章 2020-03-03 01:00 488 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Organize “before and after” style portfolios embedded within WordPress posts.

组织嵌入在WordPress帖子中的“前后”风格的作品集。

Before/After allows you to select specific images out of your media library, and sort them into respective before and after groups from the post editing page.

“之前/之后”允许您从媒体库中选择特定的图像,然后从后期编辑页面将它们分类为相应的之前和之后组。

Useful for anyone who features their work or services (web-designers, artists, plumbers, etc.) on their site.

对于任何在其网站上展示其工作或服务(网页设计师,艺术家,水管工等)的人都非常有用。

Support & Examples

支持和示例

=Use=

=使用=

    • Add images to your Media Library;

    • 将图像添加到您的媒体库;

      these images will become available to you on the post add/edit page.

    • 这些图片将在发布添加/编辑页面上向您提供。

    • On the post add/edit page, simply drag images from the Media Library column into the Before and After columns.
    • 在帖子添加/编辑页面上,只需将图像从“媒体库”列拖到“之前”和“之后”列即可。

    • To remove an item, double-click it.
    • 要删除一个项目,请双击它。

    =Template Tags=

    =模板标签=

    =is_gallery( id );

    = <代码> <?php $ beforeafter-> is_gallery(id);

    ?>=

    ?> =

    Returns true if there is a Before/After gallery associated with a particular post.

    如果存在与特定帖子关联的“之前/之后”画廊,则返回true。

      • id:

      • id:

          • A post id.

          • 帖子ID。

            Typically the current post, $post->ID

          • 通常,当前帖子$ post-> ID

        =gallery( type , id , file , links , list , rel , limit );

        = <代码> <?php $ beforeafter-> gallery(type,id,file,links,list,rel,limit);

        ?>=

        ?> =

        Returns the images stored in a particular Before/After gallery.

        返回存储在特定的画廊之前/之后的图像。

          • type:

            类型:

              • Determines which gallery to return: before or after.
              • 确定要返回的画廊:之前或之后。

              • Values: ‘before’ , ‘after’
              • 值:“之前”,“之后”

              • Default: ‘after’
              • 默认:“之后”

            • id:

              id:

                • The post id.

                • 帖子ID。

                  If set to 0, will return images from all posts with Before/After galleries.

                • 如果设置为0,将返回所有带有画廊之前/之后的帖子的图像。

                • Default: 0
                • 默认值:0

              • file:

                文件:

                  • Determines the type of image to return: the original image file, or the thumbnail.
                  • 确定要返回的图像类型:原始图像文件或缩略图。

                  • Values: ‘thumb’ , ‘file’
                  • 值:“缩略图”,“文件”

                  • Default: ‘thumb’
                  • 默认:“拇指”

                • links:

                  链接:

                    • If set to true, will wrap images with links to the original files.
                    • 如果设置为true,将包装带有原始文件链接的图像。

                    • Values: true, false
                    • 值:true,false

                    • Default: true
                    • 默认:true

                  • list:

                    列表:

                      • If set to true, wraps the image in
                      • 如果设置为true,则将图像包装在

                      • tags.
                      • 标签。

                      • Values: true, fase
                      • 值:true,fase

                      • Default: false
                      • 默认:false

                    • rel:

                      rel:

                        • Alters the default rel parameter for image links.
                        • 更改图像链接的默认rel参数。

                        • Default: ‘beforeafter’
                        • 默认:“之前”

                      • limit:

                        限制:

                          • Limits how many items are returned.
                          • 限制退回多少物品。

                          • Default: all of ’em.
                          • 默认:全部是

安装步骤

    1. Upload beforeafter.php to the /wp-content/plugins/ directory
    2. beforeafter.php 上载到 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Place template tags in theme files.
    6. 将模板标签放置在主题文件中。

下载地址
https://downloads.wordpress.org/plugin/beforeafter.zip
-EOF-

AI助手支持GPT4.0