wordpress-develop/tests/phpunit/tests/customize
Weston Ruter 4de2e30bb4 Customize: Prevent auto-draft post/page stubs from being saved with empty slugs or published with non-unique slugs.
* Allow `WP_Customize_Nav_Menus::insert_auto_draft_post()` to take full post array to pass to `wp_insert_post()`, except for `post_status`. Require `post_title`. 
* Ensure empty `post_name` gets explicitly set to slugified `post_title`.
* Explicitly allow only `post_type` and `post_title` params in `WP_Customize_Nav_Menus::ajax_insert_auto_draft_post()`.
* Use `wp_update_post()` instead of `wp_publish_post()` to ensure unique slugs are assigned to published auto-draft posts.
* Re-use `WP_Customize_Nav_Menus::insert_auto_draft_post()` when inserting stubs from starter content.
 
See #38114, #38013, #34923.
Fixes #38539.


git-svn-id: https://develop.svn.wordpress.org/trunk@39038 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-30 20:20:54 +00:00
..
control.php Customize: Allow page stubs to be created via dropdown-pages controls in the Static Front Page section. 2016-10-25 06:30:27 +00:00
custom-css-setting.php Customize: Avoid using assertNotFalse() in tests because it's not available in PHPUnit 3.6. 2016-10-30 15:41:49 +00:00
manager.php General: Introduce a wp_list_sort() helper function, v2. 2016-10-25 21:25:25 +00:00
nav-menu-item-setting.php Tests: Use a minimal theme for tests. 2016-10-21 11:02:37 +00:00
nav-menu-setting.php Tests: Use a minimal theme for tests. 2016-10-21 11:02:37 +00:00
nav-menus.php Customize: Prevent auto-draft post/page stubs from being saved with empty slugs or published with non-unique slugs. 2016-10-30 20:20:54 +00:00
panel.php Unit Tests: after [35225], make factory a method/getter on WP_UnitTestCase and add magic methods for BC for every plugin that is extending WP_UnitTestCase and accessing the $factory instance prop. 2015-10-17 18:02:16 +00:00
partial.php Tests: Use a minimal theme for tests. 2016-10-21 11:02:37 +00:00
section.php Unit Tests: 2016-08-27 08:35:16 +00:00
selective-refresh-ajax.php Tests: Use a minimal theme for tests. 2016-10-21 11:02:37 +00:00
selective-refresh.php Tests: Use a minimal theme for tests. 2016-10-21 11:02:37 +00:00
setting.php Customize: Implement customized state persistence with changesets. 2016-10-18 20:04:36 +00:00
widgets.php Install: Update sidebars_widgets option for Twenty Seventeen to match its three sidebars. 2016-10-25 19:59:31 +00:00