default-sort-ascend's People
default-sort-ascend's Issues
Apply to another field?
Hi Dennis!
I use a WP extension called Sliced Invoices which doesn't have a way to set the default sort order. Would it be possible for me to adapt your script to force my preferred sort order and column type?
I don't mind if it has an effect on any other page, Sliced Invoices is the only thing I use my WP installation for.
If I manually click the column heading I want, this is the resulting URL:
https://www.(hostingdomain).com/wp-admin/edit.php?post_type=sliced_invoice&orderby=sliced_number&order=desc
If I look in the Chrome inspector, I can see this:
<th scope="col" id="sliced_number" class="manage-column column-sliced_number sortable desc"><a href="https://www.(hostingdomain).com/wp-admin/edit.php?post_type=sliced_invoice&orderby=sliced_number&order=asc"><span>Number</span><span class="sorting-indicator"></span></a></th>
I'm guessing the important details here are id=sliced_number (and order=desc), though I couldn't see where to put that in your script.
Any tips?
All the best!
Dax.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.