WordPress.org

Making WordPress.org

Changeset 7478


Ignore:
Timestamp:
07/19/2018 08:06:59 AM (20 months ago)
Author:
tellyworth
Message:

Plugin dir: sync translated content to postmeta. Props @noisysocks

This runs the Translation_Sync cron job periodically.

Fixes #3169
Fixes #2977

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-manager.php

    r6571 r7478  
    2222        add_action( 'plugin_directory_svn_sync', array( __NAMESPACE__ . '\SVN_Watcher', 'cron_trigger' ) );
    2323        add_action( 'plugin_directory_update_api_check', array( __NAMESPACE__ . '\API_Update_Updater', 'cron_trigger' ) );
     24        add_action( 'plugin_directory_translation_sync', array( __NAMESPACE__ . '\Translation_Sync', 'cron_trigger' ) );
    2425
    2526        // A cronjob to check cronjobs
     
    250251            wp_schedule_event( time() + 60, 'every_120s', 'plugin_directory_check_cronjobs' );
    251252        }
     253        if ( ! wp_next_scheduled ( 'plugin_directory_translation_sync' ) ) {
     254            wp_schedule_event( time() + 60, 'daily', 'plugin_directory_translation_sync' );
     255        }
    252256    }
    253257
Note: See TracChangeset for help on using the changeset viewer.