Support » Plugin: Post Types Order » Display the order on the re-order page

  • Resolved Maxime Culea

    (@maximeculea)


    Hi,

    As menu_order can be set by different ways depending on options, I was interested about a simple way to display the order on re-order page.
    I manage to find that In each cases, it will be the menu_order, so could you please add it for info. It could be by default or with a hook activation, as you prefer 😉

    In Post_Types_Order_Walker on L.32 :

    // By default
    $output .= $indent . '<li id="item_' . $page->ID . '"><span>' . ( $page->menu_order + 1 ) . ' - ' . $item_details . '</span>';
    
    // Or with a hook for developpers
    $output .= $indent . '<li id="item_' . $page->ID . '"><span>' . ( apply_filters( 'some_hook', '' ) . $item_details . '</span>';

    Thx

    https://wordpress.org/plugins/post-types-order/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author nsp-code

    (@nsp-code)

    Hi,
    There is a filter for this area called cpto/interface_itme_data which helps to achieve what you looking for. Placing additional data as default, i’am not sure it will satisfy everyone.

    Thanks.

    Thank you for your quick answer 😉
    I will look into it and tell you if it worked.

    Hi @nsp-code,

    Sorry for the delay, but you right :

    // Handle admin display
    add_filter( 'cpto/interface_itme_data', function( $item_details, $page ) {
    	return sprintf( '%d - %s', ( $page->menu_order + 1 ), $item_details );
    }, 2, 10 );

    Cheers

    • This reply was modified 3 years, 5 months ago by Maxime Culea.
    • This reply was modified 3 years, 5 months ago by Maxime Culea.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display the order on the re-order page’ is closed to new replies.