Make WordPress Core

Changes between Initial Version and Version 2 of Ticket #15264


Ignore:
Timestamp:
10/31/2010 02:10:12 PM (14 years ago)
Author:
scribu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15264

    • Property Cc admin@… added
    • Property Keywords needs-patch added; post_tag delete_term _wp_delete_tax_menu_item removed
    • Property Summary changed from if a term is shared: delete this term delete ever nav menu item ! to Deleting a term shared across taxonomies deletes all associated nav menus.
  • Ticket #15264 – Description

    initial v2  
    1 Using other taxonomies since WP 2.3 in [http://wordpress.org/extend/plugins/xili-dictionary/ plugin xili-dictionary] , I just discover that now (since WP. 3.0) when deleting a term of his taxonomy, ''a menu item can disappear''. [[BR]]
    2 '''In which conditions ?''' When the term (i.e. news) is shared by taxonomy category and the plugin taxonomy named dictionary ? [[BR]]
    3 After deep tests (thanks to the night when time changes from summer to winter time), I can also reproduce it in current conditions : when a term is shared between taxonomies category and post_tag : If you delete the tag (i.e my test), if a category 'my test' exists and was active inside a navigation menu : the nav menu item disappear (unpleasant)- . [[BR]]
    4 [[BR]]
     1Using other taxonomies since WP 2.3 in [http://wordpress.org/extend/plugins/xili-dictionary/ plugin xili-dictionary] , I just discover that now (since WP. 3.0) when deleting a term of his taxonomy, ''a menu item can disappear''.
     2
     3'''In which conditions ?'''
     4
     5When the term (i.e. news) is shared by taxonomy category and the plugin taxonomy named dictionary ?
     6
     7After deep tests (thanks to the night when time changes from summer to winter time), I can also reproduce it in current conditions : when a term is shared between taxonomies category and post_tag : If you delete the tag (i.e my test), if a category 'my test' exists and was active inside a navigation menu : the nav menu item disappear (unpleasant).
     8
    59The cause of this unexpected erasing, was the action hook ''delete_term'' at end of '''wp_delete_term''' function and precisely the default filter ''_wp_delete_tax_menu_item''.
    6 The add_action in default-filter.php (line 233) don't pass the 3 parameters and the function (menu-nav.php line 700) don't verify if it is possible to delete the menu item (as well done for term in other taxonomies in wp_delete_term itself) by testing the params and the taxonomy of the menu item content.[[BR]]
    7 [[BR]]
    8 Today workaround in plugins using new taxonomies : remove filter before deleting a term on concerned taxonomies and add it after. [[BR]]
     10The add_action in default-filter.php (line 233) don't pass the 3 parameters and the function (menu-nav.php line 700) don't verify if it is possible to delete the menu item (as well done for term in other taxonomies in wp_delete_term itself) by testing the params and the taxonomy of the menu item content.
    911
     12Today workaround in plugins using new taxonomies : remove filter before deleting a term on concerned taxonomies and add it after.
    1013Hope that explanations were explicit.
    1114