Making WordPress.org

Changeset 12753


Ignore:
Timestamp:
07/24/2023 03:38:18 AM (3 years ago)
Author:
dd32
Message:

HelpScout: Some plugin directory emails are in the format of EmailType - PluginName rather than EmailType: PluginName.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/dotorg/helpscout/common.php

    r12623 r12753  
    269269    }
    270270
    271     // Plugin reviews, match the format of "[WordPress Plugin Directory] {Type Of Email}: {Plugin Title}"
    272     if ( preg_match( '!\[WordPress Plugin Directory\][^:]+: (?P<title>.+)$!i', $subject, $m ) ) {
     271    /*
     272     * Plugin reviews, match the format of either:
     273     * "[WordPress Plugin Directory] {Type Of Email}: {Plugin Title}"
     274     * "[WordPress Plugin Directory] {Type Of Email} - {Plugin Title}"
     275     */
     276    if (
     277        preg_match( '!\[WordPress Plugin Directory\][^:]+: (?P<title>.+)$!i', $subject, $m ) ||
     278        preg_match( '!\[WordPress Plugin Directory\].+? - (?P<title>.+)$!i', $subject, $m )
     279    ) {
    273280        switch_to_blog( WPORG_PLUGIN_DIRECTORY_BLOGID );
    274281        $plugins = get_posts( [
Note: See TracChangeset for help on using the changeset viewer.