Make WordPress Core

Changeset 44454

Timestamp:
01/08/2019 03:46:58 AM (6 years ago)
Author:
pento
Message:

Permalinks: Add a pre_wp_unique_post_slug filter.

Returning a non-null value on this fillter will cause wp_unique_post_slug() to return early with that value, skipping potentially expensive database queries on some sites.

Props coffee2code, javorszky, iCaleb.
Fixes #21112.

Location:
trunk
Files:
2 edited

Legend:

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

    r44347 r44454  
    41184118    }
    41194119
     4120
     4121
     4122
     4123
     4124
     4125
     4126
     4127
     4128
     4129
     4130
     4131
     4132
     4133
     4134
     4135
     4136
     4137
     4138
     4139
    41204140    global $wpdb, $wp_rewrite;
    41214141
  • trunk/tests/phpunit/tests/post.php

    r43571 r44454  
    13581358    }
    13591359
     1360
     1361
     1362
     1363
     1364
     1365
     1366
     1367
     1368
     1369
     1370
     1371
     1372
     1373
     1374
     1375
     1376
     1377
     1378
     1379
     1380
     1381
     1382
     1383
     1384
     1385
    13601386}
Note: See TracChangeset for help on using the changeset viewer.