audrasjb
987bf2ede8
Administration: Allow to wrap Settings sections with custom HTML content.
...
This changeset improves the `add_settings_section()` function to allow developers to pass extra HTML mark-up to be rendered before and after the settings section. Extra argument `$args` can now be passed to the function, and is an array that can contain the following items:
- `before_section`: HTML content to prepend to the section's HTML output. Receives the section's class name provided with the `section_class` argument via an optional `%s` placeholder. Default empty.
- `after_section`: HTML content to append to the section's HTML output. Default empty.
- `section_class`: The class name to use for the section. Used by `before_section` if a `%s` placeholder is present. Default empty.
The HTML passed using these extra arguments is escaped using `wp_kses_post()` just before rendering. This changeset also provides a set of unit tests for this new feature.
Props griffinjt, nacin, scribu, ross_ritchey, ryan, chriscct7, palmiak, rehanali, costdev, martinkrcho, chaion07, audrasjb, hellofromtonya.
Fixes #17851 .
Built from https://develop.svn.wordpress.org/trunk@54247
git-svn-id: http://core.svn.wordpress.org/trunk@53806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 09:59:12 +00:00
..
2022-09-15 16:45:40 +00:00
2022-04-12 09:26:16 +00:00
2022-09-19 20:14:10 +00:00
2022-08-23 15:42:33 +00:00
2021-10-03 17:51:06 +00:00
2022-09-20 04:02:10 +00:00
2022-09-12 15:47:14 +00:00
2020-07-17 17:11:03 +00:00
2021-11-26 03:06:03 +00:00
2021-11-16 00:04:01 +00:00
2021-05-24 02:18:58 +00:00
2022-09-20 03:52:10 +00:00
2022-04-06 15:20:06 +00:00
2022-08-22 12:26:12 +00:00
2022-09-12 17:52:08 +00:00
2022-02-16 21:19:04 +00:00
2021-12-06 21:30:03 +00:00
2022-09-19 19:51:09 +00:00
2021-12-20 19:33:00 +00:00
2022-09-12 15:47:14 +00:00
2022-09-14 00:13:14 +00:00
2022-09-14 12:48:16 +00:00
2022-03-22 16:25:03 +00:00
2022-03-22 16:25:03 +00:00
2022-09-11 21:57:09 +00:00
2022-08-13 22:44:09 +00:00
2022-04-21 11:24:17 +00:00
2022-06-14 14:43:12 +00:00
2022-09-19 19:51:09 +00:00
2021-08-11 09:08:01 +00:00
2022-08-25 15:42:10 +00:00
2022-09-19 19:51:09 +00:00
2022-07-20 13:21:08 +00:00
2022-09-15 13:29:13 +00:00
2022-06-23 22:57:12 +00:00
2022-08-30 15:17:08 +00:00
2022-07-23 14:58:12 +00:00
2022-07-23 14:58:12 +00:00
2022-04-01 03:25:01 +00:00
2022-09-19 20:49:10 +00:00
2022-08-19 23:06:09 +00:00
2022-08-04 14:52:11 +00:00
2020-02-06 06:33:11 +00:00
2022-06-17 11:20:13 +00:00
2020-02-06 06:33:11 +00:00
2022-08-31 13:41:08 +00:00
2022-06-17 11:20:13 +00:00
2021-05-25 18:47:59 +00:00
2020-07-21 12:58:02 +00:00
2020-05-01 20:12:06 +00:00
2021-12-06 21:30:03 +00:00
2021-12-24 18:06:06 +00:00
2021-01-26 13:45:57 +00:00
2020-05-01 19:07:09 +00:00
2022-01-30 19:25:03 +00:00
2022-01-30 19:25:03 +00:00
2022-01-30 19:25:03 +00:00
2022-09-15 12:32:08 +00:00
2022-05-01 22:01:10 +00:00
2022-01-30 19:25:03 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-17 17:31:11 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-19 19:51:09 +00:00
2022-09-14 10:52:08 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 21:50:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2021-12-06 21:30:03 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-19 22:53:10 +00:00
2022-09-19 22:53:10 +00:00
2022-09-19 22:53:10 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-19 20:49:10 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-20 09:37:09 +00:00
2022-09-12 15:47:14 +00:00
2022-09-15 20:28:18 +00:00
2022-09-20 01:36:09 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-12 15:47:14 +00:00
2022-09-20 02:51:09 +00:00
2022-09-12 15:47:14 +00:00
2022-09-13 15:58:12 +00:00
2022-04-26 14:59:08 +00:00
2022-09-12 17:52:08 +00:00
2022-08-26 01:03:14 +00:00
2022-05-08 00:29:14 +00:00
2022-09-19 19:51:09 +00:00
2022-06-17 11:20:13 +00:00
2022-09-20 01:36:09 +00:00
2022-09-19 22:53:10 +00:00
2021-05-25 08:27:57 +00:00
2022-09-14 13:08:14 +00:00
2022-06-17 11:20:13 +00:00
2022-08-19 22:06:09 +00:00
2022-04-29 19:17:11 +00:00
2020-02-09 16:55:09 +00:00
2021-11-29 09:52:00 +00:00
2020-01-29 00:45:18 +00:00
2020-07-23 19:06:03 +00:00
2020-01-29 00:45:18 +00:00
2020-01-29 00:45:18 +00:00
2022-06-20 21:46:16 +00:00
2022-09-19 23:48:08 +00:00
2022-09-20 02:51:09 +00:00
2022-04-04 18:26:06 +00:00
2021-11-19 15:14:00 +00:00
2022-09-19 22:26:10 +00:00
2022-09-14 18:44:09 +00:00
2022-09-14 13:08:14 +00:00
2022-08-11 14:11:08 +00:00
2021-02-02 00:10:01 +00:00
2022-09-15 13:29:13 +00:00
2022-09-19 19:51:09 +00:00
2022-09-13 18:05:09 +00:00
2022-09-20 02:24:12 +00:00
2022-09-20 04:02:10 +00:00
2022-09-19 22:53:10 +00:00
2022-08-11 14:03:09 +00:00
2022-09-06 11:28:13 +00:00
2022-07-14 13:35:13 +00:00
2022-09-20 02:51:09 +00:00
2022-09-20 02:51:09 +00:00
2021-07-06 20:21:57 +00:00
2022-09-20 02:51:09 +00:00
2022-05-13 12:21:13 +00:00
2022-09-06 11:28:13 +00:00
2020-05-16 18:42:12 +00:00
2022-08-26 01:03:14 +00:00
2022-02-07 14:01:05 +00:00
2022-06-15 13:37:10 +00:00
2022-09-13 19:29:12 +00:00
2020-01-11 18:32:05 +00:00
2022-09-19 21:36:10 +00:00
2022-08-01 11:15:14 +00:00
2020-11-24 21:27:05 +00:00
2022-09-19 17:54:11 +00:00
2022-03-15 15:22:05 +00:00
2022-09-20 01:15:11 +00:00
2022-06-21 13:34:13 +00:00
2020-11-12 11:17:07 +00:00
2020-11-12 11:17:07 +00:00
2022-08-11 14:03:09 +00:00
2022-08-11 14:03:09 +00:00
2022-08-07 23:05:10 +00:00
2022-04-06 15:33:03 +00:00
2020-11-16 22:52:05 +00:00
2022-03-22 16:25:03 +00:00
2022-09-20 01:42:10 +00:00
2020-02-06 06:33:11 +00:00
2022-06-28 20:37:15 +00:00
2021-05-15 17:38:05 +00:00
2020-11-12 11:17:07 +00:00
2022-09-14 12:48:16 +00:00
2022-08-26 01:03:14 +00:00
2021-12-10 20:30:05 +00:00
2020-05-26 09:37:10 +00:00
2022-09-15 12:49:08 +00:00
2022-03-31 10:53:04 +00:00
2022-05-02 13:13:08 +00:00
2022-09-14 18:44:09 +00:00
2022-09-15 12:20:09 +00:00
2022-09-09 09:15:12 +00:00
2022-09-15 16:45:40 +00:00
2022-04-27 13:47:11 +00:00
2022-09-20 09:59:12 +00:00
2022-06-01 18:14:10 +00:00
2022-07-21 22:45:11 +00:00
2020-02-06 06:33:11 +00:00