Created
January 11, 2019 22:02
-
-
Save kylephillips/91972d58766faced55eff6ed1579796b to your computer and use it in GitHub Desktop.
Nested Pages Row Action Filters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* For a list of all actions, see wp-nested-pages/app/Entities/PostType/PostTypeRepository, line 97 | |
*/ | |
// Hide/Show the "WPML" link if installed | |
add_filter('nestedpages_row_action_wpml', 'nestedPagesWpmlLink', 10, 2); | |
function nestedPagesWpmlLink($include, $post_type) | |
{ | |
return true; | |
} | |
// Hide/Show the "Comments" link if the post type supports it | |
add_filter('nestedpages_row_action_comments', 'nestedPagesComments', 10, 2); | |
function nestedPagesComments($include, $post_type) | |
{ | |
return true; | |
} | |
// Hide/Show the "Add Child Link" link if the post type supports it | |
add_filter('nestedpages_row_action_add_child_link', 'nestedPagesChildLink', 10, 2); | |
function nestedPagesChildLink($include, $post_type) | |
{ | |
return true; | |
} | |
// Hide/Show the "Add Child Page" link if the post type supports it | |
add_filter('nestedpages_row_action_add_child_page', 'nestedPagesChildPage', 10, 2); | |
function nestedPagesChildPage($include, $post_type) | |
{ | |
return true; | |
} | |
// Hide/Show the "Insert Before" link | |
add_filter('nestedpages_row_action_insert_before', 'nestedPagesInsertBefore', 10, 2); | |
function nestedPagesInsertBefore($include, $post_type) | |
{ | |
return true; | |
} | |
// Hide/Show the "Insert After" link | |
add_filter('nestedpages_row_action_insert_after', 'nestedPagesInsertAfter', 10, 2); | |
function nestedPagesInsertAfter($include, $post_type) | |
{ | |
return true; | |
} | |
// Hide/Show the "Push to Top" link | |
add_filter('nestedpages_row_action_push_to_top', 'nestedPagesPushToTop', 10, 2); | |
function nestedPagesPushToTop($include, $post_type) | |
{ | |
return true; | |
} | |
// Hide/Show the "Push to Bottom" link | |
add_filter('nestedpages_row_action_push_to_top', 'nestedPagesPushToBottom', 10, 2); | |
function nestedPagesPushToBottom($include, $post_type) | |
{ | |
return true; | |
} | |
// Hide/Show the "Quickedit" link | |
add_filter('nestedpages_row_action_quickedit', 'nestedPagesQuickEdit', 10, 2); | |
function nestedPagesQuickEdit($include, $post_type) | |
{ | |
return true; | |
} | |
// Hide/Show the "View" link | |
add_filter('nestedpages_row_action_view', 'nestedPagesViewLink', 10, 2); | |
function nestedPagesViewLink($include, $post_type) | |
{ | |
return true; | |
} | |
// Hide/Show the "Clone" link | |
add_filter('nestedpages_row_action_clone', 'nestedPagesClone', 10, 2); | |
function nestedPagesClone($include, $post_type) | |
{ | |
return true; | |
} | |
// Hide/Show the "Trash" link | |
add_filter('nestedpages_row_action_trash', 'nestedPagesTrash', 10, 2); | |
function nestedPagesTrash($include, $post_type) | |
{ | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The hide "Quick Edit" link didn't work for me. Could you send me the more correct version please?
The rest of your code is handy.