wordpress-develop/tests/phpunit/data
Sergey Biryukov c4fd562663 Widgets: Make sure WP_Widget constructor creates a correct id_base value for a namespaced widget class.
The `id_base` value is used for the widget's `id` and `class` attributes and also for the option name which stores the widget settings (unless the widget specifies a custom `option_name` value).

With this change, any backslashes in the `id_base` for a namespaced widget class are converted to hyphens, making it easier to style the output or target the widget with JavaScript.

This also avoids a `preg_match(): Compilation failed` PHP warning from `next_widget_id_number()` on the Widgets screen, previously caused by unescaped backslashes.

Props Mte90, hermpheus, rogerlos, welcher, SergeyBiryukov.
Fixes #44098.

git-svn-id: https://develop.svn.wordpress.org/trunk@50953 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-23 08:50:44 +00:00
..
blocks Blocks: Add automatic RTL handlind for block styles registered from metadata 2021-01-19 11:48:59 +00:00
export Ensure svn:eol-style is consistently set for all files (part 2). 2019-10-25 19:27:49 +00:00
feed Feed: Merge multiple header values to avoid fatal error. 2020-12-16 00:49:32 +00:00
formatting Administration: Capitalize Trash consistently in various messages and comments. 2020-02-10 04:10:09 +00:00
images Images: enable WebP support. 2021-05-04 14:43:36 +00:00
languages Blocks: Add i18n support to register_block_type_from_metadata 2021-01-19 11:04:03 +00:00
plugins I18N: Revert [49236] for now to investigate alternative implementations. 2020-11-12 14:41:19 +00:00
pomo Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
theme-file-child Themes: Improve child theme file inheritance by introducing functions for locating and fetching the URL or path to files within child and parent themes. 2016-09-08 22:53:57 +00:00
theme-file-parent Themes: Improve child theme file inheritance by introducing functions for locating and fetching the URL or path to files within child and parent themes. 2016-09-08 22:53:57 +00:00
themedir1 I18N: Revert [49236] for now to investigate alternative implementations. 2020-11-12 14:41:19 +00:00
uploads Ensure svn:eol-style is consistently set for all files (part 2). 2019-10-25 19:27:49 +00:00
widgets Widgets: Make sure WP_Widget constructor creates a correct id_base value for a namespaced widget class. 2021-05-23 08:50:44 +00:00
WPHTTP-testcase-redirection-script.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00