Make WordPress Core


Ignore:
Timestamp:
08/14/2015 03:58:41 AM (10 years ago)
Author:
boonebgorges
Message:

Term splitting routine should be run in a separate process, triggered via wp-cron.

[32814] introduced a routine to split shared terms, which was run during the
regular WP database upgrade. This turned out to be problematic because plugins
are not loaded during the db upgrade (due to WP_INSTALLING), with the result
that plugins were not able to hook into the 'split_shared_term' action during
the bulk split. We work around this limitation by moving the term splitting
routine to a separate process, triggered by a wp-cron hook.

Props boonebgorges, Chouby, peterwilsoncc, pento, dd32.
Fixes #30261.

File:
1 edited

Legend:

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

    r33611 r33615  
    329329
    330330// Split term updates.
     331add_action( 'admin_init',        '_wp_check_for_scheduled_split_terms' );
    331332add_action( 'split_shared_term', '_wp_check_split_default_terms',  10, 4 );
    332333add_action( 'split_shared_term', '_wp_check_split_terms_in_menus', 10, 4 );
    333334add_action( 'split_shared_term', '_wp_check_split_nav_menu_terms', 10, 4 );
     335add_action( 'wp_split_shared_term_batch', '_wp_batch_split_terms' );
    334336
    335337/**
Note: See TracChangeset for help on using the changeset viewer.