[wordpress插件] Collapsing Links折叠链接

wordpress 插件 文章 2020-03-27 12:50 437 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

This is a very simple plugin that uses Javascript to form a collapsable set of

这是一个非常简单的插件,使用Javascript构成了一组可折叠的

links in the sidebar for the links (blogroll).

链接的侧边栏中的链接(博客)。

Every link corresponding to a

每个链接对应一个

given link category will be expanded.

给定的链接类别将得到扩展。

You can use multiple instances of the widget, each with its own set of options.

您可以使用窗口小部件的多个实例,每个实例都有其自己的一组选项。

In this way you could have one set of links for certain categories one place on your page, and another widget with a different set of links somewhere else.

这样,您可以在页面的一个位置上拥有一组特定类别的链接,而在其他位置拥有另一个具有一组不同链接的小部件。

It is based off of the Collapsing Categories and Collapsing Pages plugins.

它基于“折叠类别”和“折叠页面”插件。

What’s new?

有什么新消息?

    • 0.4 (2015.08.12)

      0.4(2015.08.12)

        • Compatible with WP 4.3
        • 与WP 4.3兼容

      • 0.3.5 (2010.06.23)

        0.3.5(2010.06.23)

          • Fixed javascript path error
          • 修复了javascript路径错误

        • 0.3.4 (2010.06.18)

          0.3.4(2010.06.18)

            • Fixed html validation when target is blank (thanks http://dropdeaddick.com)
            • 在目标为空时修复了html验证(感谢http://dropdeaddick.com)

          • 0.3.3 (2010.01.28)

            0.3.3(2010.01.28)

              • Switched from scriptaculous to jquery.

              • 从脚本切换为jquery。

                No longer conflicts with plugins

                不再与插件冲突

                which use mootools (e.g. featured content gallery)

              • 使用mootools(例如精选内容画廊)

              • Restricted settings page to authorized users
              • 仅限授权用户使用的设置页面

            Options

            选项

            Style options can be set via the settings panel.

            可以通过设置面板设置样式选项。

            All other options can be set

            可以设置所有其他选项

            from the widget panel.

            从小部件面板中。

            If you wish to insert the code into your theme manually

            如果您希望将代码手动插入主题中

            instead of using a widget, you can use the following options.

            除了使用小部件,您还可以使用以下选项。

            These options

            这些选项

            can be given to the collapsLink() function either as an array or in query

            可以作为数组或在查询中赋予 collapsLink()函数

            style, in the same manner as the wp_list_links function.

            样式,与 wp_list_links 函数的方式相同。

              $defaults=array(    

              $ defaults = array(    

            'showLinkCount'=> true ,    

            'showLinkCount'=> true,    

            'catSort'=> 'linkName' ,    

            'catSort'=>'linkName',    

            'catSortOrder'=> 'ASC' ,    

            'catSortOrder'=>'ASC',    

            'linkSort'=> 'linkName' ,    

            'linkSort'=>'linkName',    

            'linkSortOrder'=> 'ASC' ,    

            'linkSortOrder'=>'ASC',    

            'inExclude'=> 'exclude' ,    

            'inExclude'=>'exclude',    

            'inExcludeCats'=> '' ,    

            'inExcludeCats'=>'',    

            'expand'=> 0 ,    

            'expand'=> 0,    

            'customExpand' => '',    

            'customExpand'=>'',    

            'customCollapse' => '',    

            'customCollapse'=>'',    

            'defaultExpand'=> '',    

            'defaultExpand'=>'',    

            'animate' => 0,    

            'animate'=> 0,    

            'nofollow' => true,    

            'nofollow'=>是,    

            'debug' => false  

            '调试'=>否  

            );

            );

              • showLinkCount

              • showLinkCount

                  • When true, the number of links in the category will be shown in

                  • 为true时,类别中的链接数将显示在

                    parentheses following the name of the link category

                  • 链接类别名称后的括号

                • catSort

                • catSort

                    • The order in which link categories should be sorted.

                    • 链接类别的排序顺序。

                      Possible values:

                      可能的值:

                        • ‘catName’ the name of the link category (default)
                        • “ catName”链接类别的名称(默认)

                        • ‘catId’ the id of the link category
                        • “ catId”链接类别的ID

                        • ‘catSlug’ the slug of the link category
                        • “ catSlug”链接类别的条目

                        • ‘catOrder’ custom order specified in the links options
                        • 在链接选项中指定的

                        • “ catOrder”自定义订单

                        • ‘catCount’ the number of links in each category
                        • “ catCount”每个类别中的链接数

                    • linkSort

                    • linkSort

                        • The order in which link linkegories should be sorted.

                        • 链接链接类别的排序顺序。

                          Possible values:

                          可能的值:

                            • ‘linkName’ the name of the link (default)
                            • “ linkName”链接的名称(默认)

                            • ‘linkId’ the id of the link
                            • “ linkId”链接的ID

                            • ‘linkUrl’ the url of the link
                            • “ linkUrl”链接的网址

                            • ‘linkRating’ the rating assigned to the link
                            • “ linkRating”分配给链接的评分

                        • catSortOrder

                        • catSortOrder

                            • Whether categories should be sorted in normal or reverse order.

                            • 类别应按正序还是反向排序。

                              Possible

                              可能

                              values:

                              值:

                                • ‘ASC’ normal order (a-z, 0-9) (default)
                                • “ ASC”正常顺序(a-z,0-9)(默认)

                                • ‘DESC’ reverse order (z-a, 9-0)
                                • “ DESC”反向顺序(z-a,9-0)

                            • linkSortOrder

                            • linkSortOrder

                                • Whether link should be sorted in normal or reverse order.

                                • 链接应按正序还是反向排序。

                                  Possible values:

                                  可能的值:

                                    • ‘ASC’ normal order (a-z, 0-9) (default)
                                    • “ ASC”正常顺序(a-z,0-9)(默认)

                                    • ‘DESC’ reverse order (z-a, 9-0)
                                    • “ DESC”反向顺序(z-a,9-0)

                                • inExclude

                                • in排除

                                    • Whether to include or exclude certain categories

                                    • 是否包括或排除某些类别

                                        • ‘exclude’ (default)
                                        • “排除”(默认)

                                        • ‘include’
                                        • “包含”

                                    • inExcludeCats

                                    • inExcludeCats

                                        • The link categories which should be included or excluded
                                        • 应包含或排除的链接类别

                                      • expand

                                      • 展开

                                          • The symbols to be used to mark expanding and collapsing.

                                          • 用于标记展开和折叠的符号。

                                            Possible values:

                                            可能的值:

                                              • ‘0’ Triangles (default)
                                              • “ 0”个三角形(默认值)

                                              • ‘1’ + –
                                              • ‘1’+ –

                                              • ‘2’ [+] [-]
                                              • ‘2’[+] [-]

                                              • ‘3’ images (you can upload your own if you wish)
                                              • “ 3”张图片(如果需要,您可以上传自己的图片)

                                              • ‘4’ custom symbols
                                              • “ 4”个自定义符号

                                          • customExpand

                                          • customExpand

                                              • If you have selected ‘4’ for the expand option, this character will be

                                              • 如果您为扩展选项选择了“ 4”,则此字符将为

                                                used to mark expandable link categories

                                              • 用于标记可扩展链接类别

                                            • customCollapse

                                              customCollapse

                                                • If you have selected ‘4’ for the expand option, this character will be

                                                • 如果您为扩展选项选择了“ 4”,则此字符将为

                                                  used to mark collapsible link categories

                                                • 用于标记可折叠的链接类别

                                              • defaultExpand

                                                defaultExpand

                                                  • A comma separated list of link category IDs or Slugs which should be

                                                  • 以逗号分隔的链接类别ID或Slug列表,应为

                                                    expanded by default

                                                  • 默认展开

                                                • animate

                                                • 动画

                                                    • When set to true, collapsing and expanding will be animated
                                                    • 设置为true时,折叠和展开将被动画化

                                                  • nofollow

                                                  • nofollow

                                                      • When set to true (default), rel=’nofollow’ tags will be added to links
                                                      • 设置为true(默认值)时,会将rel ='nofollow'标签添加到链接中

                                                    • debug

                                                    • 调试

                                                        • When set to true, extra debugging information will be displayed in the

                                                        • 设置为true时,其他调试信息将显示在

                                                          underlying code of your page (but not visible from the browser).

                                                          页面的基础代码(但在浏览器中不可见)。

                                                          Use

                                                          使用

                                                          this option if you are having problems

                                                        • 如果您遇到问题,请选择此选项

                                                      Examples

                                                      示例

                                                      collapsLink('animate=true&nofollow=false&expand=3,inExcludeCats=blogroll,lousy-friends')

                                                        collapsLink('animate = true&nofollow = false&expand = 3,inExcludeCats = blogroll,糟糕的朋友')

                                                      This will produce a list with:

                                                      这将产生带有以下内容的列表:

                                                      * animation on

                                                      *动画

                                                      * no nofollow tags

                                                      *没有nofollow标签

                                                      * using images to mark collapsing and expanding

                                                      *使用图像标记折叠和展开

                                                      * exclude links in the categories blogroll and lousy-friends

                                                      *排除类别Blogroll和糟糕的朋友中的链接

                                                      Demo

                                                      演示

                                                      You can see this on my test blog at http:/obfelty.com/test

                                                      您可以在http:/obfelty.com/test 的测试博客上看到此内容

                                                      CAVEAT

                                                      CAVEAT

                                                      Currently this plugin relies on Javascript to expand and collapse the links.

                                                      当前,该插件依赖Javascript来扩展和折叠链接。

                                                      If a user’s browser doesn’t support javascript they won’t see the links to the

                                                      如果用户的浏览器不支持javascript,则不会看到指向
                                                      的链接

                                                      posts, but the links to the links will still work (which is the default

                                                      帖子,但指向链接的链接仍然有效(这是默认设置

                                                      behavior in wordpress anyways)

                                                      反而在wordpress中的行为)

                                                      The option to show the number of links currently uses the number stored in the

                                                      用于显示当前链接数的选项使用存储在
                                                      中的数字

                                                      database, which includes both visible and invisible links.

                                                      数据库,其中包括可见链接和不可见链接。

                                                      If you have

                                                      如果您有

                                                      invisible links, this number will be wrong.

                                                      看不见的链接,这个数字是错误的。

安装步骤

IMPORTANT!

重要!

Please deactivate before upgrading, then re-activate the plugin.

请在升级之前先停用它,然后重新激活该插件。

Unpackage contents to wp-content/plugins/ so that the files are in a

将内容解压缩到wp-content / plugins /中,以便文件位于

collapsing-links directory.

collapsing-links目录。

Activate the plugin in your WordPress Admin

在您的WordPress Admin中激活插件

interface — Collapsing Links.

界面-折叠链接。

MANUAL INSTALLATION

手动安装

To use the plugin manually,

要手动使用插件,

change the following here appropriate (most likely sidebar.php):

在此处更改以下内容(最可能是sidebar.php):

Change From:

更改自:

         

      
           

      <?php get_links_list();

      ?>

      ?>

    To something of the following:

    针对以下情况:

        

      <?php     

    if( function_exists('collapsLink') ) {      

    if(function_exists('collapsLink')){      

    collapsLink();     

    collapsLink();     

    } else {      

    }其他{      

    echo "

      \n";      

      回声“

        \ n”;      

        get_links_list();      

        get_links_list();      

        echo "

      \n";     

      回显“ \ n”;     

      }    

      }    

      ?>

      ?>

    You can add parameters to the collapsLink() function as described in the

    您可以按照
    中的说明向collapsLink()函数添加参数。

    options section.

    选项部分。

    WIDGET INSTALLATION

    小部件安装

    simply go the Presentation > Widgets section and drag over the Collapsing Links Widget.

    只需转到“演示”>“小部件”部分,然后将鼠标拖到“折叠链接”小部件上即可。

下载地址
https://downloads.wordpress.org/plugin/collapsing-links.0.4.zip
-EOF-

AI助手支持GPT4.0