Making WordPress.org


Ignore:
Timestamp:
04/08/2019 08:32:21 AM (6 years ago)
Author:
dd32
Message:

Login: Only prepend GTM code when a string $message is provided, WP_Error objects may also appear here.

See [8607].
See #4371.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions.php

    r8607 r8608  
    105105 */
    106106function wporg_login_die_handler( $message, $title = '', $args = array() ) {
    107     ob_start();
    108     wporg_login_gtm();
    109     $gtm = ob_get_clean();
    110 
    111     $message = $gtm . $message;
     107    if ( is_string( $message ) ) {
     108        ob_start();
     109        wporg_login_gtm();
     110        $gtm = ob_get_clean();
     111
     112        $message = $gtm . $message;
     113    }
     114
    112115    return _default_wp_die_handler( $message, $title, $args );
    113116}
Note: See TracChangeset for help on using the changeset viewer.