Last active
January 26, 2022 21:41
-
-
Save kylephillips/f2b94dc9b61470c6216b780291f89e39 to your computer and use it in GitHub Desktop.
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 | |
add_filter('nestedpages_row_parent_css_classes', 'nestedpages_filter_row_css_classes', 10, 3); | |
/** | |
* Filter the <li> element css classes for nested pages rows | |
* @param str - $row_classes - the CSS classes for output | |
* @param obj - $post - the current post object | |
* @param obj - $post_type_object - the current post type object | |
*/ | |
function nestedpages_filter_row_css_classes($row_classes, $post, $post_type_object) | |
{ | |
// Do any necessary logic here for adding the row class | |
// This particular class disables nesting | |
$row_classes .= ' mjs-nestedSortable-no-nesting'; | |
return $row_classes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment