Make WordPress Core


Ignore:
Timestamp:
05/16/2014 11:09:28 AM (10 years ago)
Author:
SergeyBiryukov
Message:

Filter out empty and duplicate values in Comment Moderation and Comment Blacklist settings.

props GaVrA.
fixes #23800.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r27844 r28444  
    32903290                $value = 'subscriber';
    32913291            break;
     3292
     3293        case 'moderation_keys':
     3294        case 'blacklist_keys':
     3295            $value = explode( "\n", $value );
     3296            $value = array_filter( array_map( 'trim', $value ) );
     3297            $value = array_unique( $value );
     3298            $value = implode( "\n", $value );
     3299            break;
    32923300    }
    32933301
Note: See TracChangeset for help on using the changeset viewer.