Modify $suffix via bulk action?
-
Hello all, I’m using the Duplicate Post plugin on a project, and it works great — thank you for your development and support.
By default, to add a $suffix to a duplicated post title, you fill in the “Title suffix” field in the plugin settings.
I’d like to be able to modify the suffix on the actual posts listing page — in this case, it’s a Custom Post Type called “Courses.”
I was envisioning a dropdown appearing when you click “Apply,” similar to the dropdown that appears when you select the Bulk action “Edit.”
I added a line to admin-functions.php that does a preg_replace() to remove the previous Course semester/year (appearing in brackets, e.g. [Fall 2022]) from the title, then append the $suffix as normal. So for the next semester, I would update the “Title suffix” on the plugin settings to “[Spring 2023]”.
However, I’d like to be able to modify this $suffix on the Courses custom post listing — so right after you select the “Duplicate Course” Bulk action and hit “Apply,” perhaps a dropdown appears with inputs for Semester and Year.
I’ve uploaded a few screenshots to give a better idea of what I’m trying to achieve: https://imgbox.com/g/s19LoYJKvR
Any guidance or insight would be a huge help to me — thank you in advance.
- The topic ‘Modify $suffix via bulk action?’ is closed to new replies.