I’d like to announce the official release of the updated Hide/Cut Post Text plugin (v2.0) for WordPress.
Hide (so no one, or only users above a certain userlevel, can see) or cut (so only viewable on post’s permalink page) portion(s) of post text. Link text for cuts can be defined per-cut or omitted, and if used, cut links are uniquely anchored.
The plugin’s official homepage is located at :
coffee2code.com/wp-plugins/hide-or-cut-post-text.
This release debuts the admin options page for the plugin, which provides an interface to configure to plugin to individually enable/disable the cut, hide, and show, as well as other options. The tags work on pages now as well. The release also brings with it full compatibility with WordPress 2.3+ and 2.5.
This update is part of coffee2code’s 14 Days of Plugins (updated plugin #14).
Comments welcome on this post for this version of the plugin. Comments will be closed once this release has been superseded by another.
Read more for a detailed ChangeLog of the release.
Detailed ChangeLog
These are the detailed changes, which may or may not make sense to you depending on your familiarity with the previous features and internals of the plugin.
- Created its own class to encapsulate plugin functionality
- Added an admin options page that also includes documentation and examples
- Used preg_replace_callback() instead of preg_replace() and thus modified the argument handling of the callback functions
- Fix so that ‘cut’ and ‘show’ work for pages as well
- Added settings to individually enable/disable the parsing of hide, cut, and show tags. Can also configure the default linktext, the default userlevel for the hide tag, and if quicktag buttons should be created.
- Changed installation instructions
- Added compatibility note
- Updated copyright date and version to 2.0
- Moved into its own subdirectory; added readme.txt and screenshot
- Tested compatibility with WP 2.3.3 and 2.5
17 replies on “Hide/Cut Post Text v2.0”
Thank you, plug-in is really helpful )
I’d find one bug:
Such comments and (with spaces) failed
Sorry,
Such comments <!–cut=”test-test”–gt; and <!–cut=”test-test”–> (with spaces) failed
<!–-spacecut=â€test-testâ€space–> (with spaces)
Looks like regex in hide-or-cut-text.php:504 has no space before closing >
Akim: Thanks for finding the bug! I’ll add it to a bugfix release I’ll be making soon.
Does this plugin work on WP Version 2.5.1? I can’t seem to get it to work! 🙁
Ignore that. managed to get it working. Thanks!
Great plugin. I really would like to use the cut function on my site, but I’m displaying the posts on static pages using another plugin – postslist.
Postslists allows plugins to parse text it displays so I so I think the reason your plugin isn’t operating on my set up is because its coded not to parse fixed pages. (I checked, it works fine on the category pages.) Is there a quick hack that could resolve this?
On line: 469
$quitar=array(‘”‘,”=”);
if ( $userdata->user_level < $userlevel )
$text = str_replace($quitar,””,$matches[2]);
Para que muestre :
…hide=”Texto” userlevel=10.. Solo el admin puede verlo ,….
Para la version: 2.6.3
Hello!
I noticed a bug – “cut-link” in RSS feeds (or crosposting to other places) is wrong. Actually, by posting to LiveJournal it points to my LJ account, not original blog entry.
oh, I’m a bit wrong – problems shows only with lj-xp plugin, not RSS (rechecked).
I think problem is with
global $id;
, but I do not know what to do with that…Thanks for the plugin! Excellent work. EXACTLY what I was looking for!
Though support for the rich text editor would be awesome. (:
Once again, keep up the awesome work! 😀
Thanks so much for this! Really useful.
can this plugin be used to hide the tooltip that comes up when an image is hovered over with the mouse. When I tried it, it didn’t work, but maybe there’s a quick code that can fix this.
Sorry ben, but I don’t think this plugin is what you’re looking for.
Whatan awesome plugin. Worked first time.
Now, do you think there is a way I can use this code within another plugin? Say a classified ad to hide the seller info?