توضیحات
Truncate Text is a simple WordPress plugin that allows you to truncate text in your posts and pages. Perfect for shortening usernames, cryptocurrency wallet addresses, or any lengthy content, this plugin provides flexible options to control how text is truncated.
Usage
- Use the
[truncate-text]
shortcode to truncate text in your post or page content. - Use the
[truncate-shortcode]
shortcode to process nested shortcodes before truncating.
Optional Attributes
These attributes work with both shortcodes:
– limit
: Set the number of characters to display (default: 6).
Example: [truncate-text limit="8"]0x8755B12f034ee7b2383fCF5E849201C71622CC44[/truncate-text]
0x8755B1...1622CC44
– encoding
: Specify the text encoding (default: UTF-8).
Example: [truncate-text encoding="ISO-8859-1"]text[/truncate-text]
– location
: Choose where to truncate: “start”, “middle” (default), or “end”.
Examples:
– [truncate-text location="start"]0x8755B12f034ee7b2383fCF5E849201C71622CC44[/truncate-text]
...1622CC44
– [truncate-text location="middle"]0x8755B12f034ee7b2383fCF5E849201C71622CC44[/truncate-text]
0x8755...22CC44
– [truncate-text location="end"]0x8755B12f034ee7b2383fCF5E849201C71622CC44[/truncate-text]
0x8755...
– dots
: Set the number of dots in the ellipsis (default: 3).
Examples:
– [truncate-text location="end" dots="10"]0x8755B12f034ee7b2383fCF5E849201C71622CC44[/truncate-text]
0x8755..........
– [truncate-text location="middle" dots="5"]0x8755B12f034ee7b2383fCF5E849201C71622CC44[/truncate-text]
0x8755.....22CC44
Nested Shortcode Example
[truncate-shortcode limit="6" location="end" dots="4"][another-shortcode][/truncate-shortcode]
Processes the inner shortcode first, then truncates the result.
Support
If you have questions or issues, please reach out through our support channel at NateChisley.com. We’re happy to assist!
Contributing
We welcome contributions! Please follow our guidelines for contributing at NateChisley.com.
نصب
- Log in to your WordPress site as an administrator.
- Go to the “Plugins” section in the WordPress dashboard.
- Click “Add New” and then click the “Upload Plugin” button.
- Choose the
truncate-text.zip
file from your computer and click “Install Now.” - After installation is complete, click the “Activate Plugin” button.
نقد و بررسیها
توسعه دهندگان و همکاران
“Truncate Text WordPress Plugin” نرم افزار متن باز است. افراد زیر در این افزونه مشارکت کردهاند.
مشارکت کنندگانترجمه “Truncate Text WordPress Plugin” به زبان شما.
علاقه مند به توسعه هستید؟
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
گزارش تغییرات
1.3.0
- Added
location
attribute to control truncation position (start, middle, end). - Added
dots
attribute to customize the number of ellipsis dots.
1.2.0
- Verified compatibility with WordPress v6.7.
1.1.0
- Verified compatibility with WordPress v6.2.
1.0.0
- Initial release with
[truncate-text]
and[truncate-shortcode]
shortcodes.