Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 0 additions & 177 deletions .github/workflows/plugin-check-playground.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/plugin-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Run WP.org's Plugin Check.
#
# This file is managed in https://github.com/happyprime/projects
name: WP.org Plugin Check

on:
push:
branches:
- trunk
pull_request:
branches:
- trunk

jobs:
call-workflow:
uses: happyprime/workflows/.github/workflows/plugin-check.yml@trunk
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Toggle Block

Add a toggle in the WordPress block editor to show and hide another block.
Add a toggle in the block editor to show and hide another block.

## Usage
## Description

Toggle Block is a very rudimentary block. It renders as a `<button>` element on the front-end that is used to show or hide another target element (via its ID) on the page. It uses `aria-controls` and `aria-label` in an attempt to make it compatible with assistive technology.

Expand Down
Binary file removed assets/screenshot-toggle-block-001.png
Binary file not shown.
Binary file removed assets/screenshot-toggle-block-002.png
Binary file not shown.
5 changes: 5 additions & 0 deletions blueprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"steps": [
{"step": "wp-cli", "command": "wp plugin activate toggle-block"}
]
}
2 changes: 1 addition & 1 deletion build/toggle-block/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"category": "widgets",
"icon": "location",
"description": "Toggle button to show and hide another block.",
"version": "0.6.0",
"version": "1.0.0",
"textdomain": "toggle-block",
"editorScript": "file:index.js",
"viewScript": [
Expand Down
2 changes: 1 addition & 1 deletion build/toggle-block/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '0e4927efa3a50df8255f');
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '25f07f5171601515baf6');
2 changes: 1 addition & 1 deletion build/toggle-block/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "toggle-block",
"version": "0.6.0",
"version": "1.0.0",
"description": "Add a toggle to show and hide another block",
"author": "Happy Prime",
"license": "GPL-2.0-or-later",
Expand Down
8 changes: 4 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Toggle Block
Contributors: happyprime, jeremyfelt, slocker, philcable
Tags: accessibility, toggle, button, show, hide
Tags: toggle, button, show, hide
Requires at least: 6.9
Tested up to: 7.0
Stable tag: 0.6.0
Stable tag: 1.0.0
License: GPLv2 or later
Requires PHP: 7.4

Expand All @@ -19,11 +19,11 @@ The intended use is in a site's template, through the site editor or your theme

1. Install and activate the plugin.
2. Add a Toggle Block in the editor where you want the show/hide control to appear.
3. Enter a "Controls ID" in the block's sidebar panel that matches the "HTML anchor" assigned to the block you want to toggle.
3. Use the block selector in the side panel or enter a "Controls ID" that matches the "HTML anchor" assigned to the block you want to toggle.

## Usage

When the toggle block is selected in the editor, toggle settings appear in the sidebar panel, including text input fields for "Controls ID" and screen reader text.
When the toggle block is selected in the editor, toggle settings appear in the sidebar panel, including a block selection interface and text input fields for "Controls ID" and screen reader text.

The "Controls ID" entered in this panel must match the "HTML anchor" assigned to another block through its advanced panel. When the toggle is activated, the targeted block is shown or hidden.

Expand Down
2 changes: 1 addition & 1 deletion src/toggle-block/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"category": "widgets",
"icon": "location",
"description": "Toggle button to show and hide another block.",
"version": "0.6.0",
"version": "1.0.0",
"textdomain": "toggle-block",
"editorScript": "file:index.js",
"viewScript": [
Expand Down
2 changes: 1 addition & 1 deletion toggle-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: Toggle Block
* Description: Add a toggle to show and hide another block.
* Version: 0.6.0
* Version: 1.0.0
* Plugin URI: https://github.com/happyprime/toggle-block/
* Author: Happy Prime
* Author URI: https://happyprime.co
Expand Down