Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Keith

I got it working with the ‘admin_head’ filter rather than ‘ac/admin_head’.

Also… I made it conditional to a specific post type if anyone is interested… reason being… I am building a “spreadsheet view” for a certain post type, and I played with fonts and column sizes to “shrink” everything down a bit… so… the icons are just spilling over to other cells. I like the icons on different edit screens, which is why I wanted to make the code conditional. Here it is if interested:

<?php
/* START: Hides 'undo', 'redo' and 'clear' for Projects Spreadsheet */
function cc_remove_some_editable_actions_for_spreadsheet() {
  global $pagenow;
  if ( is_admin() && $pagenow=='edit.php' && 'projects' === $_GET['post_type'] ) {
    echo '<style type="text/css">';
    echo '  .cacie-cell-actions .cacie-redo { display: none !important; }';
    echo '  .cacie-cell-actions .cacie-undo { display: none !important; }';
    echo '  .cacie-cell-actions .cacie-clear { display: none !important; }'; // Delete
    echo '</style>';
  }
}
add_action( 'admin_head', 'cc_remove_some_editable_actions_for_spreadsheet' );
/* END: Hides 'undo', 'redo' and 'clear' for Projects Spreadsheet */
?>
7 years, 6 months ago
Stefan van den Dungen Gronovius
Developer

Hi Keith,

Thanks for your snippet and your solution for this problem.
I looked at our documetation snippet and it turns out the action does not exist anymore in our code.
So I think your solution to just work on the admin_head is just the right way to do it now.
I’ve changed the documentation, so thanks for you feedback, much appreciated!

7 years, 6 months ago

You must be logged in to reply to this topic.