filter
Filters whether manual ordering leaves a term query's ORDER BY alone. Defaults to false.
Parameters of davo_ignore_get_terms_orderby Parameter Type Description $ignore bool Whether to skip manual term ordering. $orderby string The query's ORDER BY clause. $args array<string, mixed> The term query arguments.
Returns bool
add_filter Copyadd_filter ( 'davo_ignore_get_terms_orderby' , 'my_filter_callback' , 10 , 3 );
/**
* @param bool $ignore
* @param string $orderby
* @param array<string, mixed> $args
*/
function my_filter_callback ( $ignore , $orderby , $args ) {
// Change $ignore as needed, then return it.
return $ignore ;
}src/domains/ordering/initializer.php:305, and 1 more place
filter
Filter which REST-enabled post types get manual ordering support.
Parameters of davo_orderable_post_types Parameter Type Description $post_types string[] Post type slugs.
add_filter Copyadd_filter ( 'davo_orderable_post_types' , 'my_filter_callback' , 10 , 1 );
/**
* @param string[] $post_types
*/
function my_filter_callback ( $post_types ) {
// Change $post_types as needed, then return it.
return $post_types ;
}src/domains/ordering/helpers.php:34
filter
Filter the providers whose objects Ordering applies order to.
Add the key of any provider that creates orderable posts or terms. Ordering-only: an order row for a post/term that never migrated is simply nothing to apply, not a data-loss risk, so this never forces one of these providers into a job that never selected it — selecting Ordering alone no longer pulls in every content domain, and Ordering itself is only pulled in by something that explicitly requires it.
Parameters of davo_ordering_migration_optional_providers Parameter Type Description $providers string[] Provider keys.
add_filter Copyadd_filter ( 'davo_ordering_migration_optional_providers' , 'my_filter_callback' , 10 , 1 );
/**
* @param string[] $providers
*/
function my_filter_callback ( $providers ) {
// Change $providers as needed, then return it.
return $providers ;
}src/domains/ordering/migration-provider.php:124
filter
Filter the post types whose manual order is included in an export.
Parameters of davo_ordering_migration_post_types Parameter Type Description $types string[] Post type slugs.
add_filter Copyadd_filter ( 'davo_ordering_migration_post_types' , 'my_filter_callback' , 10 , 1 );
/**
* @param string[] $types
*/
function my_filter_callback ( $types ) {
// Change $types as needed, then return it.
return $types ;
}src/domains/ordering/migration-provider.php:386
action
Fires after a post's manual order changes.
Parameters of davo_post_order_updated Parameter Type Description $post_id int The post that moved. $new_order int Its new menu_order. $old_order int Its previous menu_order.
add_action Copyadd_action ( 'davo_post_order_updated' , 'my_action_callback' , 10 , 3 );
/**
* @param int $post_id
* @param int $new_order
* @param int $old_order
*/
function my_action_callback ( $post_id , $new_order , $old_order ) {
// Your code here.
}src/domains/ordering/services/posts.php:112
filter
Filters the sort direction appended to the manual-order clause. Empty by default. Include the leading space, for example DESC.
Parameters of davo_posts_order Parameter Type Description $direction string The direction to append. $query \WP_Query The query.
Returns string
add_filter Copyadd_filter ( 'davo_posts_order' , 'my_filter_callback' , 10 , 2 );
/**
* @param string $direction
* @param \WP_Query $query
*/
function my_filter_callback ( $direction , $query ) {
// Change $direction as needed, then return it.
return $direction ;
}src/domains/ordering/initializer.php:273
filter
Filters whether manual ordering leaves a query's ORDER BY clause alone. Defaults to false.
Parameters of davo_posts_orderby_ignore Parameter Type Description $ignore bool Whether to skip manual ordering. $order_by string The query's ORDER BY clause. $query \WP_Query The query.
Returns bool
add_filter Copyadd_filter ( 'davo_posts_orderby_ignore' , 'my_filter_callback' , 10 , 3 );
/**
* @param bool $ignore
* @param string $order_by
* @param \WP_Query $query
*/
function my_filter_callback ( $ignore , $order_by , $query ) {
// Change $ignore as needed, then return it.
return $ignore ;
}src/domains/ordering/initializer.php:252
action
Fires after a term's manual order changes.
Parameters of davo_term_order_updated Parameter Type Description $term_id int The term that moved. $new_order int Its new term_order. $old_order int Its previous term_order. $taxonomy string The term's taxonomy. $parent int The sibling scope (parent term ID) it moved within.
add_action Copyadd_action ( 'davo_term_order_updated' , 'my_action_callback' , 10 , 5 );
/**
* @param int $term_id
* @param int $new_order
* @param int $old_order
* @param string $taxonomy
* @param int $parent
*/
function my_action_callback ( $term_id , $new_order , $old_order , $taxonomy , $parent ) {
// Your code here.
}src/domains/ordering/services/terms.php:123