Making WordPress.org

Changeset 6721


Ignore:
Timestamp:
02/22/2018 09:45:09 PM (7 years ago)
Author:
ocean90
Message:

Translate, Plugin Directory: Change hook priorities for cache purge watchers.

Ensure that synced translations are also triggering a cache purge.

Fixes #3475.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-plugin-directory/inc/cache-purge/class-cache-purger.php

    r6532 r6721  
    1616    public function register_events() {
    1717        add_action( 'init', array( $this, 'add_global_cache_group' ) );
    18         add_action( 'gp_originals_imported', array( $this, 'originals_imported' ) );
    19         add_action( 'gp_translation_created', array( $this, 'queue_translation_for_cache_purge' ) );
    20         add_action( 'gp_translation_saved', array( $this, 'queue_translation_for_cache_purge' ) );
     18        add_action( 'gp_originals_imported', array( $this, 'originals_imported' ), 1 );
     19        add_action( 'gp_translation_created', array( $this, 'queue_translation_for_cache_purge' ), 1 );
     20        add_action( 'gp_translation_saved', array( $this, 'queue_translation_for_cache_purge' ), 1 );
    2121
    2222        // Cache purging is delayed until shutdown to prevent multiple purges for the same project.
    23         add_action( 'shutdown', array( $this, 'delete_plugin_i18n_cache_on_translation_edits' ) );
     23        add_action( 'shutdown', array( $this, 'delete_plugin_i18n_cache_on_translation_edits' ), 99 );
    2424    }
    2525
Note: See TracChangeset for help on using the changeset viewer.