Making WordPress.org

Changeset 6573


Ignore:
Timestamp:
02/08/2018 11:28:28 PM (8 years ago)
Author:
iandunn
Message:

Jetpack Tweaks: Move wcorg_grunion_unique_subject into Jetpack Tweaks.

Location:
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/jetpack-tweaks/miscellaneous.php

    r5706 r6573  
    4242
    4343add_filter( 'rest_api_allowed_post_types', __NAMESPACE__ . '\add_post_types_to_rest_api' );
     44
     45/**
     46 * Prepend a unique string to contact form subjects.
     47 *
     48 * Otherwise some e-mail clients and management systems -- *cough* SupportPress *cough* -- will incorrectly group
     49 * separate messages into the same thread.
     50 *
     51 * It'd be better to have the key appended rather than prepended, but SupportPress won't always recognize the
     52 * subject as unique if we do that :|
     53 *
     54 * @param string $subject
     55 *
     56 * @return string
     57 */
     58function grunion_unique_subject( $subject ) {
     59    return sprintf( '[%s] %s', wp_generate_password( 8, false ), $subject );
     60}
     61add_filter( 'contact_form_subject', __NAMESPACE__ . '\grunion_unique_subject' );
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-misc.php

    r6572 r6573  
    124124
    125125/**
    126  * Prepend a unique string to contact form subjects.
    127  *
    128  * Otherwise some e-mail clients and management systems -- *cough* SupportPress *cough* -- will incorrectly group
    129  * separate messages into the same thread.
    130  *
    131  * It'd be better to have the key appended rather than prepended, but SupportPress won't always recognize the
    132  * subject as unique if we do that :|
    133  *
    134  * @param string $subject
    135  *
    136  * @return string
    137  */
    138 function wcorg_grunion_unique_subject( $subject ) {
    139     return sprintf( '[%s] %s', wp_generate_password( 8, false ), $subject );
    140 }
    141 add_filter( 'contact_form_subject', 'wcorg_grunion_unique_subject' );
    142 
    143 /**
    144126 * Modify the space allocation on a per-size basis.
    145127 *
Note: See TracChangeset for help on using the changeset viewer.