开发者 | tessawatkinsllc |
---|---|
更新时间 | 2023年3月30日 23:06 |
捐献地址: | 去捐款 |
PHP版本: | 5.4 及以上 |
WordPress版本: | 6.2 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
accessible-reading
./wp-content/plugins/
folder in your WordPress directory. Once the folder and all of its files are there, installation is complete.This plugin uses the Bionic Reading® API to generate accessible text and it requires each user to have a unique API key.
You can set the API key for the plugin in two ways.
The first way is adding it in the plugin settings. While logged into WordPress, navigate to Tools > Accessible Reading and then under the Settings tab, you'll see a text field for API Key to copy/pase it into. Press the Save All Settings button at the bottom.
The second way is defining the ACCESSIBLE_READING_API_KEY
constant variable in your wp-config.php
file and setting it's value to your API key. For multisite installations, this will set all of those sites to use the same API key. Example usage:
define('ACCESSIBLE_READING_API_KEY','your-api-key-goes-here');
accessible_reading
shortcode and how do I use it?The accessible_reading
shortcode allows you to add accessible text with a toggle switch anywhere on your WordPress website. To ensure your shortcode's accessible content is automatically generated, a user with edit post
capabilities must preview the page using the shortcode at least once while you have enough API requests for the day.
To use it, simply wrap the text you want to make accessible with the shortcode while also adding an id
attribute. For example:
[accessible_reading id="foo"]This content will become accessible![/accessible_reading]
This shortcode will also add the toggle switch to enable/disable the accessible content automatically, so if you're using it in multiple locations and want just one switch, set the hide_toggle
attribute to 1
to disable it like this:
[accessible_reading id="bar" hide_toggle="1"]This content will become accessible but <strong>without showing a toggle!</strong>[/accessible_reading]
This shortcode saves it's content to a post's meta data, so if you're using it in a global area of your website like your header, footer, or sidebar, you should assign the shortcode a post or page ID to save it once to avoid saving it to every post or page it's visible on like this:
[accessible_reading id="david" post_id="23"]This content will always save and pull it's accessible content from post ID 23[/accessible_reading]
If you want to temporarily disable the automatic processing without removing the shortcode, you can set the disable
attribute to 1
like this:
[accessible_reading id="bowie" disabled="1"]This content won't be accessible, nor will it have a toggle. <em>Yet</em>.[/accessible_reading]
accessible_reading_toggle
shortcode and how do I use it?The accessible_reading_toggle
shortcode allows you to add a toggle switch anywhere on your WordPress website. To use it, simply place the self-closing shortcode anywhere on your WordPress website. For example:
[accessible_reading_toggle/]
accessible_reading_content
shortcode and how do I use it?The accessible_reading_content
shortcode allows you to add pre-made accessible content anywhere on your WordPress website that a toggle switch will display when turned on.
To use it, wrap the accessible content with the shortcode. For example:
[accessible_reading_content]<span class="bionic-w bionic"><b class="bionic-b bionic">Lor</b>em</span> <span class="bionic-w bionic"><b class="bionic-b bionic">ips</b>um</span> <span class="bionic-w bionic"><b class="bionic-b bionic">dol</b>or</span> <span class="bionic-w bionic"><b class="bionic-b bionic">s</b>it</span> <span class="bionic-w bionic"><b class="bionic-b bionic">am</b>et.</span>[/accessible_reading_content]
You can optionally add additional HTML classes to the outermost wrapper by setting the value to the classes
attribute. If setting multiple classes, they should be separated by a single space. For example:
[accessible_reading_content classes="custom-class-1 custom-class-2"]<span class="bionic-w bionic"><b class="bionic-b bionic">Lor</b>em</span> <span class="bionic-w bionic"><b class="bionic-b bionic">ips</b>um</span> <span class="bionic-w bionic"><b class="bionic-b bionic">dol</b>or</span> <span class="bionic-w bionic"><b class="bionic-b bionic">s</b>it</span> <span class="bionic-w bionic"><b class="bionic-b bionic">am</b>et.</span>[/accessible_reading_content]
accessible_reading_original_content
shortcode and how do I use it?To complement the accessible_reading_content
shortcode, the accessible_reading_original_content
shortcode allows you to add the original content that a toggle switch will hide when accessible reading is turned on.
To use it, simply wrap the original content with the shortcode. For example:
[accessible_reading_original_content]Lorem ipsum dolor sit amet.[/accessible_reading_original_content]
You can optionally add additional HTML classes to the outermost wrapper by setting the value to the classes attribute. If setting multiple classes, they should be separated by a single space. For example:
[accessible_reading_original_content classes="custom-class-1 custom-class-2"]Lorem ipsum dolor sit amet.[/accessible_reading_original_content]
Yes! In the plugin settings (Tools > Accessible Reading), you'll find the "Bulk Update" tab. There you can configure a bulk update. Starting a dry-run first will tell you how many API requests will be used and approximately how long it will take. This feature uses the WordPres CRON to reduce your server's load and respects your plan's daily API limit to prevent overages. If your bulk update uses more than what your plan allows, it will automatically schedule to continue the next day, so larger websites may take a few days to complete.
No, this WordPress plugin is not a product of Bionic Reading®. It was developed by an independent and disabled web developer that wants to bring more accessibility to the digital space. However, this plugin uses the official Bionic Reading® API to generate accessible text. If you pay for a premium API plan, that money goes toward the official makers of Bionic Reading®, not this plugin developer. If you want to support this plugin developer, donations are appreciated!
inc
folder to includes
for consistency with my other pluginsACCESSIBLEREADING_VERSION
constant variableaccessible_reading
shortcode that requires an id
attribute to generate accessible content anywhere on the websiteaccessible_reading_toggle
shortcode to display the toggle button anywhere on the pageaccessible_reading_original_content
shortcode to display the original text that gets hidden when accessible content is toggled on anywhere on the pageaccessible_reading_content
shortcode to display accessible content that gets displayed when accessible content is toggled on anywhere on the page