Staff List Table – Sorting

WordPress Plugin Staff List Table – Columns – Sorting

String sorting in JavaScrip is often done with simple comparison of Unicode code points, under the assumption that characters with a higher code point should be sorted after those with lower code points. It might work for many cases (particularly ASCII) but isn’t globally suited.

Sorting Diacritics (Accented Characters)

Staff List Table has built in support to correctly order the most common data types that are displayed in a table, but there will still be times when you find you have data that is not orders as you might expect. One of the options is to use a sorting plugin.

Column sorting plugins.

Currently we have a few built-in plugins that can be used for column sorting.
  • Czech text. Provides locale aware sorting for Czech characters.
  • Diacritics Neutral. Diacritics neutral sorting of strings.
  • Locale Compare. Performs sorting using the Javascript localeCompare function.
  • Polish text. Locale aware sorting for Polish alphabet.
  • Turkish text. Properly sorting Turkish (non english) characters.

How add custom sorting option to Staff List Table column.

Only for column data types: Text and Name – Multipart Field.
  1. Template > Table Columns > Column > Custom Sort Script. Select the plugin name from the dropdown.
  2. Staff List Table page > Shortcode. Add option: sort-plugin.
Shortcode option.
Option values.
  • czech   sort-plugin="czech"
  • diacritics-neutral   sort-plugin="diacritics-neutral"
  • locale-compare   sort-plugin="locale-compare"
  • polish   sort-plugin="polish"
  • turkish   sort-plugin="turkish"
35053