• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

Action on thread creation

quetzalcoatl

Baby Bird
Hi, we launched a website with the xenword plugin few days ago and right now everything is fine. The basic usage is fine but we'd also like to have a little control over the thread creation: something like stripping away stuff that it's not useful inside the content or adding prefixes on the thread based on the category.

I hope you guys will consider to add an action to the plugin before the thread is created, that would be extremely helpful for us

PHP:
// class-xenword-thread-creation.php Line:238
do_action('xw_thread_pre_save', array($wpPost, $ThreadWriter, $postWriter))
 

LPH

Flight Director
Flight Instructor
Thank you for the suggestions, and glad all is working on your site.

adding prefixes on the thread based on the category.

Work began the other day to look at adding in prefixes to the thread creation. It's something that is definitely needed.

an action to the plugin before the thread is created

Can you explain a little bit more? What do you need in the action prior and why is this helpful?
 

quetzalcoatl

Baby Bird
Hi LPH, thank you for your reply.
Actions are basically a way to execute external code inside a plugin without having to mess with the plugin itself and, at the same time, it allows the user to update freely the plugin without having to modify every new version (of course the action needs to be part of the plugin's code).

In the specific scenario we are asking for an action before the thread creation with the variables "($wpPost, $ThreadWriter, $postWriter)" included so we can modify what we pass into the thread as we like (such as thread content, prefix and so on).
 
Top