• Resolved bkjproductions

    (@bkjproductions)


    I was hoping this would work for the Media Library, which would be useful, as we are doing more SEO work on media, and now increasingly want to know who changed something, or the date it was changed.

    Perhaps I am wrong and need to deactivate Admin Columns to make it work?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter bkjproductions

    (@bkjproductions)

    I have a workaround, if you could add it:

    add_filter( 'manage_media_columns', 'modified_column_register' );
    add_action( 'manage_media_custom_column', 'modified_column_display', 10, 2 );
    add_filter( 'manage_edit-media_sortable_columns', 'modified_column_register_sortable' );

    Suggestion: Maybe don’t show the “by UNKNOWN” or offer that as an option? I find that part distracting, would actually prefer the author-modified info in a different column altogether.
    //echo '<small>' . esc_html__( 'by', 'show-modified-date-in-admin-lists' ) . ' <strong>' . esc_html__( 'UNKNOWN', 'show-modified-date-in-admin-lists' ) . '<strong></small>';

    If you have a custom post type, I guess the filters would be

    manage_mycustomtype_columns
    manage_mycustomtype_custom_column
    manage_edit-mycustomtype_sortable_columns

    That being said, my column that I have added to Media does not appear to be sortable, though I am using ACF and maybe that is the problem

    Plugin Author apasionados

    (@apasionados)

    Hi @bkjproductions,

    The filter for making the Media Library column sortable is:
    add_filter( 'manage_upload_sortable_columns', 'modified_column_register_sortable' );
    and not:

    add_filter( 'manage_edit-media_sortable_columns', 'modified_column_register_sortable' );
    

    Best regards from Spain.

    Plugin Author apasionados

    (@apasionados)

    Hi @bkjproductions,

    For the moment we will not change the message of the person that has done the update and the “UNKNOWN”. We had made some tests with having the author-modified info in another column buy when you have manu columns it takes up quite a lot of space and for us it’s not convienent.

    Best regards from Spain.

    Plugin Author apasionados

    (@apasionados)

    Hi @bkjproductions,

    The filter to sort custom post types unfortunately is not
    manage_edit-mycustomtype_sortable_columns

    Each custom post type needs a custom filter for the post-type:
    add_filter( 'manage_edit-MY_POST_TYPE_sortable_columns', 'my_set_sortable_columns' );
    where MY_POST_TYPE is the name of the custom post type. And that’s why it’s not possible to include it in our plugin.

    Best regards from Spain.

    • This reply was modified 2 years, 4 months ago by apasionados. Reason: updated code and comment
    Plugin Author apasionados

    (@apasionados)

    Hi @bkjproductions,

    By the way we just added the column to the media library in the latest release of the plugin.

    Best regards from Spain.

    Thread Starter bkjproductions

    (@bkjproductions)

    You’ve been busy, @apasionados ! Thanks for all the info and help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Media Library: Last modified column?’ is closed to new replies.