Making WordPress.org


Ignore:
Timestamp:
02/26/2021 02:41:43 AM (5 years ago)
Author:
dd32
Message:

Plugin Directory: Add an action that's fired after a plugin is imported.

This will be used to inform other plugins/systems a plugin has been updated, while not adding a dependancy of that plugin into the plugin directory.

File:
1 edited

Legend:

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

    r10646 r10726  
    6262     * @param string $plugin_slug            The slug of the plugin to import.
    6363     * @param array  $svn_changed_tags       A list of tags/trunk which the SVN change touched. Optional.
    64      * @param array  $svn_revision_triggered The SVN revision which this import has been triggered by.
     64     * @param array  $svn_revision_triggered The SVN revision which this import has been triggered by. Optional.
    6565     */
    6666    public function import_from_svn( $plugin_slug, $svn_changed_tags = array( 'trunk' ), $svn_revision_triggered = 0 ) {
     
    294294            Block_e2e::run( $plugin->post_name );
    295295        }
     296
     297        /**
     298         * Action that fires after a plugin is imported.
     299         *
     300         * @param WP_Post $plugin         The plugin updated.
     301         * @param string  $stable_tag     The new stable tag for the plugin.
     302         * @param string  $old_stable_tag The previous stable tag for the plugin.
     303         * @param array   $changed_tags   The list of SVN tags/trunk affected to trigger the import.
     304         * @param int     $svn_revision   The SVN revision that triggered the import.
     305         */
     306        do_action( 'wporg_plugins_imported', $plugin, $stable_tag, $current_stable_tag, $svn_changed_tags, $svn_revision_triggered );
    296307
    297308        return true;
Note: See TracChangeset for help on using the changeset viewer.