WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/14/2010 03:09:04 PM (10 years ago)
Author:
ryan
Message:

Prevent post and term hierarchy loops. Props mdawaffe. fixes #14662

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/default-filters.php

    r15747 r15806  
    117117    add_filter( $filter, 'convert_chars' );
    118118}
     119
     120// Pre save hierarchy
     121add_filter( 'wp_insert_post_parent', 'wp_check_post_hierarchy_for_loops', 10, 2 );
     122add_filter( 'wp_update_term_parent', 'wp_check_term_hierarchy_for_loops', 10, 3 );
    119123
    120124// Display filters
Note: See TracChangeset for help on using the changeset viewer.