Title: Toggle Anything
Author: nickpagz
Published: <strong>2024 年 10 月 1 日</strong>
Last modified: 2024 年 10 月 1 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/toggle-anything/assets/icon.svg?rev=3161130)

# Toggle Anything

 作者：[nickpagz](https://profiles.wordpress.org/npagazani/)

[下载](https://downloads.wordpress.org/plugin/toggle-anything.1.0.0.zip)

 * [详情](https://cn.wordpress.org/plugins/toggle-anything/#description)
 * [评价](https://cn.wordpress.org/plugins/toggle-anything/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/toggle-anything/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/toggle-anything/#developers)

 [支持](https://wordpress.org/support/plugin/toggle-anything/)

## 描述

The Toggle Anything block allows you to control visibility of other blocks on the
page via user interaction.
 A common example is a pricing page where a user can 
toggle between monthly vs yearly subscription pricing. With this plugin allows you
to design your own pricing tables using core blocks, then control the which items
are visible or hidden when the switch is toggled.

### Features

 * Toggle visibility of any element on the page. Does not need to be a nested block.
 * Set a default toggle state.
 * Choose your own “On” and “Off” state class names.
 * Non-Javascript friendly. Default state content displays, toggle is hidden.
 * Additional classes to show or hide other related components on non-Javascript
   browsers.
 * Multiple toggles allowed on the same page.
 * Multiple design configurations for each toggle.
 * Option for adding text in on/off positions.
 * Easy Custom CSS additions for each toggle/switch component.

## 屏幕截图

[⌊General block view and settings⌉⌊General block view and settings⌉[

General block view and settings

[⌊Basic toggle settings for classes and default state⌉⌊Basic toggle settings for
classes and default state⌉[

Basic toggle settings for classes and default state

[⌊Optional text settings⌉⌊Optional text settings⌉[

Optional text settings

[⌊Various styling options⌉⌊Various styling options⌉[

Various styling options

[⌊Setting the show/hide classes on other blocks⌉⌊Setting the show/hide classes on
other blocks⌉[

Setting the show/hide classes on other blocks

[⌊Pricing page example⌉⌊Pricing page example⌉[

Pricing page example

## 区块

该插件提供了 1 个区块.

 *   Toggle Anything A customizable toggle switch to control visibility of any block.

## 安装

Use the standard WordPress plugins installation page and install or upload the plugin.
After plugin activation the block “Toggle Anything” will be visible in the editor.

## 常见问题

### Can I add multiple blocks to the same page?

Yes.

### Are the block styles customizable?

Yes.

### What about non-Javascript enabled browsers?

We’ve got you covered there too. The toggle will automatically be hidden, and the
default toggle class will be displayed.
 The block also includes other “no-JS” classes
you can use for hiding/showing content.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Toggle Anything」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ nickpagz ](https://profiles.wordpress.org/npagazani/)

[帮助将「Toggle Anything」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/toggle-anything)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/toggle-anything/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/toggle-anything/)，或通过[RSS](https://plugins.trac.wordpress.org/log/toggle-anything/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/toggle-anything/)。

## 更新日志

#### 1.0.0

 * Add selector components for making classes easier to add
 * Use HTML Tag processor API for adding classes on rendered page
 * Reduce whitespace in inline css in the save markup
 * Conditionally add inline css selectors

#### 0.2.1

 * Tweak no-js functionality

#### 0.2.0

 * Option for display type (block, flex, etc)
 * Default switch position on page load
 * No JavaScript page load fallback

#### 0.1.0

 * Release

## 额外信息

 *  版本 **1.0.0**
 *  最后更新：**2 年前**
 *  活跃安装数量 **20+**
 *  WordPress 版本 ** 6.5 或更高版本 **
 *  已测试的最高版本为 **6.6.5**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/toggle-anything/)
 * 标签
 * [block](https://cn.wordpress.org/plugins/tags/block/)[hide](https://cn.wordpress.org/plugins/tags/hide/)
   [switch](https://cn.wordpress.org/plugins/tags/switch/)[toggle](https://cn.wordpress.org/plugins/tags/toggle/)
 *  [高级视图](https://cn.wordpress.org/plugins/toggle-anything/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/toggle-anything/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/toggle-anything/reviews/)

## 贡献者

 *   [ nickpagz ](https://profiles.wordpress.org/npagazani/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/toggle-anything/)