norcross / comment-hierarchy-adjust Goto Github PK
View Code? Open in Web Editor NEWA simple metabox to change a comment heirarchy
A simple metabox to change a comment heirarchy
It looks like WordPress takes care of collapsing the tree as necessary on the front end depending on the thread_comments_depth
setting, but removing comments that couldn't be a parent because they're at the last depth could simplify the dropdown and prevent confusion.
Using spaces to pad the comments in the dropdown to indicate their depth in the comment tree would probably make it a little easier to scan the list to find the new parent.
Rather than admin_init, try add_meta_boxes or add_meta_boxes_comment instead. It probably won't make much of a functional difference in this case, since you're not removing something, but it's more sensible/semantic/whatever.
I noticed after changing the parent for a couple of comments, they maintained their position in the dropdown and weren't sorted correctly. Using the wp_list_comment()
function with a callback to customize the output would probably help here. It'd also allow you to filter trackbacks out of the dropdown and do any calculations based on the depth.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.