[wordpress插件] Ambrosite Unlink Parent PagesAmbrosite取消链接父页面

wordpress 插件 文章 2020-02-17 15:00 610 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

IMPORTANT: This plugin is not compatible with the Mystique theme, nor is it compatible with the WordPress 3.x custom menu system (that is, menus created using the drag-and-drop menu builder

重要提示:此插件与Mystique主题不兼容,也不与WordPress 3.x自定义菜单系统兼容(即,使用拖放式菜单构建器创建的菜单

under Appearance->Menus).

在外观->菜单下)。

If you want to create an unlinked parent menu item with the Mystique theme, install Mark Jaquith's 'Page Links To' plugin, and put a '#' (hash/pound) mark in the 'Point to this URL:' field to create a

如果您要使用Mystique主题创建未链接的父菜单项,请安装Mark Jaquith的“页面链接至”插件,然后在“指向此URL:”字段中添加“#”(哈希/磅)标记以创建一个

dummy link.

虚拟链接。

For the WP3 menu builder, use a ‘Custom Link’ with a ‘#’ mark in the URL field.

对于WP3菜单构建器,请在URL字段中使用带有“#”标记的“自定义链接”。

Refer to the documentation in the WP Codex if you need more help: https://codex.wordpress.org/Appearance_Menus_Screen#Custom_Links

如果需要更多帮助,请参考WP Codex中的文档:https://codex.wordpress.org/Appearance_Menus_Screen#Custom_Links

When activated, this plugin unlinks parent pages (that is, pages that have child pages underneath them in a hierarchy) in page menus and lists.

激活后,此插件将取消页面菜单和列表中的父页面(即,在层次结构中位于其下的子页面的页面)。

It affects the output of wp_list_pages and wp_page_menu, as well as all plugins and widgets that use those functions.

它会影响wp_list_pages和wp_page_menu的输出,以及使用这些功能的所有插件和小部件。

The plugin works by turning the parent page links into ‘dummy links’.

该插件通过将父页面链接变为“虚拟链接”来工作。

That is, it replaces the href attribute on parent menu items with a ‘#’ (hash/pound) mark.

也就是说,它将父菜单项上的href属性替换为“#”(哈希/磅)标记。

A dummy link is just like a regular link, except that it leads back to the current page when clicked.

虚拟链接与常规链接一样,不同之处在于,虚拟链接在单击时会返回到当前页面。

The dummy links are given an inline style “cursor: default” to prevent the mouse pointer from turning into a hand when hovering over unlinked menu items.

虚拟链接具有嵌入式样式“光标:默认”,以防止将鼠标指针悬停在未链接的菜单项上时变成手形。

Options

选项

To configure the plugin options, go to the Settings menu in the WordPress admin panel and click on ‘Unlink Parent Pages’.

要配置插件选项,请转到WordPress管理面板中的“设置”菜单,然后单击“取消链接父页面”。

Use Dummy Links

使用虚拟链接

Turned on by default as of Unlink Parent Pages version 1.3.

从Unlink Parent Pages 1.3版本开始默认启用。

If you uncheck this box, the plugin will unlink the parent pages by replacing the anchor tags with span tags.

如果取消选中此框,则插件将通过将锚标签替换为span标签来取消链接父页面。

In some themes, this may cause problems with CSS styling.

在某些主题中,这可能会导致CSS样式出现问题。

In order to fix this, you would need to add an additional selector to any rule that targets the anchor tags (see the FAQ for more information).

为了解决此问题,您需要向定位锚标记的任何规则添加一个附加选择器(有关更多信息,请参见FAQ)。

If you are not experienced in writing CSS selectors, then it is strongly recommended to stick with dummy links.

如果您没有编写CSS选择器的经验,那么强烈建议您坚持使用虚拟链接。

Unlink Current Page

取消链接当前页面

Unlink the current page, in addition to the parent pages.

除父页面外,取消当前页面的链接。

Remove Link Titles

删除链接标题

Remove the title attribute from the links (stops the tooltip from popping up when the mouse hovers over the menu items).

从链接中删除标题属性(当鼠标悬停在菜单项上时,不会弹出工具提示)。

This doesn’t have anything to do with unlinking parent pages, but it’s something a lot of people want, so I decided to include it.

这与取消父页面的链接无关,但是很多人都希望这样做,所以我决定将其包括在内。

Maximum Depth

最大深度

The maximum depth setting controls how many levels in the hierarchy of pages are to be unlinked.

最大深度设置控制要取消链接页面层次结构中的多少个级别。

It works exactly like the ‘depth’ option for wp_list_pages, as follows:

它的工作方式与wp_list_pages的“深度”选项完全相同,如下所示:

    • 0 (default) Unlinks all parent pages, anywhere in the page hierarchy.
    • 0(默认),在页面层次结构中的任何位置取消所有父页面的链接。

    • 1 Unlinks top-level parent pages only.
    • 1仅取消链接顶级父页面。

    • 2, 3, … Unlinks parent pages to the given depth.
    • 2、3,…将父页面取消链接到给定的深度。

    • -1 Do not unlink any pages (specify individual pages instead).
    • -1请勿取消链接任何页面(而是指定各个页面)。

    Unlink Specific Pages

    取消链接特定页面

    You can specify which pages you want unlinked, using a comma-separated list of page IDs (example: 3,7,31).

    您可以使用逗号分隔的页面ID列表(例如:3,7,31)来指定要取消链接的页面。

    It works exactly like the ‘exclude’ option for wp_list_pages.

    它的工作方式与wp_list_pages的“排除”选项完全相同。

    If you want only the specified pages to be unlinked, then set max depth to -1.

    如果只想 取消指定页面的链接,则将最大深度设置为-1。

安装步骤

    • Upload ambrosite-unlink-parent-pages.php to the /wp-content/plugins/ directory.
    • 将ambrosite-unlink-parent-pages.php上传到/ wp-content / plugins /目录。

    • Activate the plugin through the Plugins menu in WordPress.
    • 通过WordPress中的“插件”菜单激活插件。

    • Go to the Settings menu in the WordPress admin panel, and click on Unlink Parent Pages to configure the plugin options.
    • 转到WordPress管理面板中的“设置”菜单,然后单击“取消链接父页面”以配置插件选项。

    • All parent pages in menus created with either wp_list_pages or wp_page_menu will become unlinked as soon as the plugin is activated.

    • 激活插件后,使用wp_list_pages或wp_page_menu创建的菜单中的所有父页面将立即取消链接。

      It will also automatically unlink newly created parent pages as the page hierarchy is built.

    • 随着页面层次结构的建立,它还将自动取消链接新创建的父页面。

下载地址
https://downloads.wordpress.org/plugin/ambrosite-unlink-parent-pages.zip
-EOF-

AI助手支持GPT4.0