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
67 changes: 66 additions & 1 deletion nacc-wordpress-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Install: Drop this directory in the "wp-content/plugins/" directory and activate it. You need to specify "[NACC]" in the code section of a page or a post.
* Contributors: BMLTGuy, pjaudiomv, bmltenabled
* Authors: bmltenabled
* Version: 6.0.1
* Version: 6.0.2
* Requires PHP: 8.0
* Requires at least: 5.3
* License: GPL v2 or later
Expand Down Expand Up @@ -464,6 +464,71 @@ public static function draw_settings(): void {
</table>
<?php submit_button(); ?>
</form>

<hr />

<h2>How to Use</h2>
<p>
Add the <code>[nacc]</code> shortcode to any page or post to embed the cleantime
calculator. The settings above are the site-wide defaults used whenever the
shortcode is placed without attributes.
</p>

<h3>Shortcode Attributes</h3>
<p>
All attributes are optional. Any attribute you set on the shortcode overrides the
saved default above for that instance only, so you can display the calculator
differently on different pages.
</p>
<table class="widefat striped" style="max-width: 40em;">
<thead>
<tr>
<th scope="col">Attribute</th>
<th scope="col">Values</th>
<th scope="col">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>theme</code></td>
<td>See the Theme dropdown above</td>
<td>Default (gray)</td>
</tr>
<tr>
<td><code>language</code></td>
<td>See the Language dropdown above</td>
<td><code>en</code></td>
</tr>
<tr>
<td><code>layout</code></td>
<td><code>linear</code>, <code>tabular</code></td>
<td><code>linear</code></td>
</tr>
<tr>
<td><code>special</code></td>
<td><code>1</code>, <code>0</code></td>
<td><code>0</code></td>
</tr>
</tbody>
</table>
<p>
Example:
<code>[nacc theme="NACC-BT" language="es" layout="tabular" special="1"]</code>
</p>

<h3>What Each Setting Does</h3>
<ul class="ul-disc">
<li><strong>Theme</strong> &mdash; the visual style (color scheme) of the keytags.</li>
<li><strong>Language</strong> &mdash; the language of the keytag labels and cleantime summary.</li>
<li><strong>Layout</strong> &mdash; <code>linear</code> shows tag fronts in a single row; <code>tabular</code> shows the tags side-by-side with their rear text.</li>
<li><strong>Show Special Keytags</strong> &mdash; whether the "specialty" long-term tags (over 2 years, e.g. the Decades tag) are displayed.</li>
</ul>

<p>
For standalone (non-WordPress) usage, see the
<a href="<?php echo esc_url( plugins_url( 'nacc2/README.md', __FILE__ ) ); ?>">nacc2/README.md</a>
documentation included with this plugin.
</p>
</div>
<?php
}
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Plugin URI: https://wordpress.org/plugins/nacc-wordpress-plugin/
Tags: na, cleantime calculator, nacc, recovery, addiction
Requires PHP: 8.0
Tested up to: 7.0
Stable tag: 6.0.1
Stable tag: 6.0.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand All @@ -30,6 +30,10 @@ That text will be replaced with this cleantime calculator.

== Changelog ==

= 6.0.2 =

* Added a "How to Use" help section to the Settings → NACC admin page documenting the `[nacc]` shortcode, its attributes, and what each setting does.

= 6.0.1 =

* Added a "Lantern" theme matching the Lantern WordPress theme (warm parchment paper, deep ink navy, terracotta ember accents, Fraunces display serif for the cleantime number). Selectable from Settings → NACC → Theme.
Expand Down