forked from tainacan/tainacan-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadme.txt
More file actions
67 lines (46 loc) · 2.88 KB
/
Copy pathreadme.txt
File metadata and controls
67 lines (46 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
=== Tainacan Taxonomy Tail ===
Contributors: montanadinosaurcenter
Tags: taxonomy, tainacan, accessibility
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.1
Stable tag: 0.1.0
License: GPL v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
A small companion plugin for Tainacan that trims long taxonomy hierarchy paths for the Item Metadatum block.
== Description ==
A small companion plugin for [Tainacan](https://tainacan.org) that lets you trim long taxonomy hierarchy paths in the **Tainacan Item Metadatum** block. Opt-in per block to show only the last _N_ levels of the taxonomy while preserving the full breadcrumb as a tooltip for accessibility.
== Installation ==
1. Upload the plugin files to the `/wp-content/plugins/tainacan-taxonomy-tail` directory, or install the plugin through the WordPress plugins screen.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Ensure the desired metadatum is configured in Tainacan to expose the full hierarchy path on the front end.
4. Edit the template or page that renders your items and select the **Tainacan Item Metadatum** block that shows the taxonomy field.
5. In the block sidebar under **Advanced → Additional CSS class(es)** add a class such as `taxo-tail-4` to keep only the last four levels. Replace `4` with the number of trailing terms you want to display (minimum `1`).
6. Update or publish the template/page.
When the block is rendered, only the requested number of trailing terms is displayed with a neutral `›` separator. Hovering or focusing the value shows the entire original path via the `title` attribute for context.
== Frequently Asked Questions ==
= Does this modify taxonomy data in WordPress? =
No. The plugin only filters the rendered block output so your stored taxonomy data remains untouched.
= Can I show different depths on different blocks? =
Yes. Add a unique `taxo-tail-N` class to each block or use a future `dataTailDepth` attribute to control the depth per block.
== Screenshots ==
1. The Item Metadatum block showing only the last portion of a taxonomy path while keeping the full path in a tooltip.
== Changelog ==
= 0.1.0 =
* Initial release with taxonomy tail trimming for the Tainacan Item Metadatum block.
== Upgrade Notice ==
= 0.1.0 =
Initial release.
== License ==
/*
Tainacan Taxonomy Tail plugin is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
any later version.
Tainacan Taxonomy Tail is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Tainacan Taxonomy Tail. If not, see LICENSE.md.
*/