yflement
Forum Replies Created
-
I’m using version 2.1.4. In post-expirator.php:
An if-else chain starts at line 472. I altered the last elseif to:
elseif ($expireType == 'category-remove') { $tag = "registration closed"; wp_set_object_terms( $id, array($tag), 'post_tag', false ); }What this does: it makes the ‘Remove category’-action remove all tags from the post (wp_set_object_terms) and replaces it with a single tag named ‘registration closed’ (i start with posts that have tag ‘registration’).
In the
_postExpiratorExpireTypefunction i changed the last statement inif ($type != 'page')to:$rv[] = '<option value="category-remove" '. ($selected == 'category-remove' ? 'selected="selected"' : '') . '>'.__('Remove tag','post-expirator').'</option>';Which makes it so that when you select ‘Remove tag’ from the dropdown in the front-end that it will go into the modified elseif above.
I have uploaded the complete file at http://pastebin.com/Cg8kWNtm. In the end, it’s very limited and you can’t use the remove-category action anymore but it’s what did the job for me.
Hopefully it helps you in any way!
I used this plugin but added code to remove the tag of a post. I know basically no PHP so it’s probably very ugly, but I can look up the code and post if you want.
Smashballoon, you are a lifesaver!
It was exactly as you said. I thought you could use shortcodes in widgets by default.
Many thanks!
Forum: Plugins
In reply to: [HTML Import 2] Internal links regex brokenI’m afraid I won’t be able to help with that as I have basically no knowledge of PHP and I also didn’t have to import files or images.
However I did use this tool:
to test the regex. Perhaps it can be of some use for you…
Forum: Plugins
In reply to: [HTML Import 2] Internal links regex brokenHello mbcoulter,
It’s in: import-html-pages/html-importer.php
In the function: fix_internal_links
On line: 139After I made this change, it correctly detected the internal links, so hopefully it works for you as well!