WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #40364, comment 47


Ignore:
Timestamp:
06/13/2018 09:25:25 AM (2 years ago)
Author:
flixos90
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #40364, comment 47

    initial v1  
    1 [attachment:40364.9.diff] is has a few improvements over the previous patch:
     1[attachment:40364.9.diff] has a few improvements over the previous patch:
    22
    33* Introduce a `wp_normalize_site_data` filter to normalize the data passed to `wp_insert_site()` and `wp_update_site()`. This reduces complexity of the functions significantly and reduces duplicate code. A function `wp_normalize_site_data()` is automatically hooked in for default normalization (stripping invalid characters from domain, ensuring the path has a trailing slash, maintaining BC when someone uses `site_id` instead of `network_id`).