Felix Arntz
e2b654efe6
Media: Introduce wp_content_img_tag
filter.
...
This filter allows modifying individual `img` tags within a blob of content that are by default processed by the `wp_filter_content_tags()` function. The addition of this filter facilitates plugins that tweak images to accomplish this goal without re-implementing duplicate content image parser logic, which furthermore can have a negative performance impact due to additional regular expressions.
In addition to the filterable `img` tag, the filter receives the context (typically the function or filter in which the content is parsed) and the attachment ID. The latter may be 0, in case the image is not an attachment (for example when it is an external image URL).
Props adamsilverstein, flixos90, pbearne, peterwilsoncc.
Fixes #55347 .
Built from https://develop.svn.wordpress.org/trunk@53028
git-svn-id: http://core.svn.wordpress.org/trunk@52617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-29 23:58:18 +00:00
..
2022-02-17 19:18:25 +00:00
2021-11-09 02:17:17 +00:00
2022-03-29 13:06:07 +00:00
2022-02-17 19:18:25 +00:00
2021-10-03 17:51:06 +00:00
2022-02-17 19:18:25 +00:00
2022-03-22 16:25: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-03-24 20:07:05 +00:00
2021-08-10 13:45:57 +00:00
2022-02-28 21:38:09 +00:00
2022-02-09 12:33:05 +00:00
2022-02-16 21:19:04 +00:00
2021-12-06 21:30:03 +00:00
2022-03-22 16:25:03 +00:00
2021-12-20 19:33:00 +00:00
2022-03-10 04:01:05 +00:00
2022-03-24 15:20:08 +00:00
2022-03-22 16:25:03 +00:00
2022-03-22 16:25:03 +00:00
2022-03-22 16:25:03 +00:00
2021-12-25 03:17:04 +00:00
2022-01-12 11:17:08 +00:00
2022-02-17 14:14:01 +00:00
2021-08-11 09:08:01 +00:00
2022-01-18 20:29:06 +00:00
2022-03-11 23:30:07 +00:00
2022-02-09 13:22:03 +00:00
2022-03-16 10:22:03 +00:00
2021-11-08 23:06:58 +00:00
2021-05-20 00:04:56 +00:00
2022-02-18 12:06:03 +00:00
2022-02-18 12:06:03 +00:00
2022-03-09 15:08:06 +00:00
2021-11-15 01:09:59 +00:00
2022-03-20 14:57:07 +00:00
2021-11-07 01:36:57 +00:00
2021-05-25 18:47:59 +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
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-01-30 19:25:03 +00:00
2022-01-30 19:25:03 +00:00
2022-01-30 19:25:03 +00:00
2021-11-15 03:43:59 +00:00
2021-10-30 20:26:59 +00:00
2022-03-17 03:37:05 +00:00
2021-08-03 11:12:55 +00:00
2021-02-02 05:17:13 +00:00
2021-11-19 19:05:59 +00:00
2022-03-17 04:13:07 +00:00
2021-11-28 13:53:00 +00:00
2021-11-23 21:37:01 +00:00
2021-12-21 00:28:00 +00:00
2021-06-15 15:22:58 +00:00
2022-01-30 19:25:03 +00:00
2021-12-01 12:17:00 +00:00
2022-03-22 14:56:05 +00:00
2021-01-03 22:04:04 +00:00
2021-10-22 16:09:59 +00:00
2022-01-20 23:53:05 +00:00
2022-03-22 16:25:03 +00:00
2022-01-24 05:34:04 +00:00
2021-12-11 19:50:59 +00:00
2021-10-18 17:52:58 +00:00
2022-03-22 16:25:03 +00:00
2022-01-30 19:25:03 +00:00
2022-03-22 16:25:03 +00:00
2021-11-30 17:18:01 +00:00
2021-06-05 15:46:57 +00:00
2021-12-01 13:22:01 +00:00
2021-09-22 21:23:00 +00:00
2022-03-20 16:24:03 +00:00
2022-01-18 20:29:06 +00:00
2021-10-01 15:00:58 +00:00
2021-12-01 12:17:00 +00:00
2021-12-06 21:30:03 +00:00
2021-12-06 21:30:03 +00:00
2022-03-20 16:02:04 +00:00
2022-03-20 16:02:04 +00:00
2022-03-22 16:25:03 +00:00
2022-03-22 16:25:03 +00:00
2022-01-13 19:14:05 +00:00
2022-01-30 19:25:03 +00:00
2022-03-18 21:18:03 +00:00
2022-01-06 17:05:02 +00:00
2021-01-03 21:57:09 +00:00
2022-03-22 14:56:05 +00:00
2021-01-03 22:04:04 +00:00
2022-02-11 19:21:01 +00:00
2021-06-15 10:24:57 +00:00
2021-10-15 05:04:56 +00:00
2022-01-30 19:25:03 +00:00
2022-03-25 09:56:05 +00:00
2022-01-15 08:44:03 +00:00
2021-02-22 19:18:12 +00:00
2022-01-30 19:25:03 +00:00
2021-07-30 19:35:58 +00:00
2021-05-15 17:38:05 +00:00
2022-02-04 16:28:00 +00:00
2022-03-22 14:56:05 +00:00
2021-02-20 17:10:11 +00:00
2022-01-06 17:05:02 +00:00
2022-01-30 19:25:03 +00:00
2022-03-22 14:56:05 +00:00
2020-12-10 23:53:07 +00:00
2022-02-04 16:28:00 +00:00
2022-02-17 09:04:05 +00:00
2021-12-02 20:45:01 +00:00
2022-02-23 23:17:01 +00:00
2022-03-22 16:25:03 +00:00
2022-03-22 14:56:05 +00:00
2022-03-07 13:07:03 +00:00
2022-02-24 13:33:01 +00:00
2021-06-23 01:34:58 +00:00
2021-11-16 01:43:00 +00:00
2022-03-22 16:25:03 +00:00
2022-03-02 15:40:01 +00:00
2021-12-07 17:49:01 +00:00
2022-03-15 16:00:02 +00:00
2022-01-20 23:53:05 +00:00
2022-03-03 20:33:59 +00:00
2022-02-11 18:51:59 +00:00
2021-12-31 13:55:03 +00:00
2021-11-23 21:37:01 +00:00
2022-03-18 20:48:02 +00:00
2022-03-29 12:42:13 +00:00
2021-05-25 08:27:57 +00:00
2022-03-22 16:25:03 +00:00
2022-01-04 15:23:59 +00:00
2021-11-29 09:52:00 +00:00
2021-05-15 17:38:05 +00:00
2022-03-04 14:11:02 +00:00
2022-03-29 15:59:22 +00:00
2021-09-02 08:30:58 +00:00
2021-11-19 15:14:00 +00:00
2022-03-28 10:25:01 +00:00
2022-02-17 16:18:03 +00:00
2022-03-10 16:02:01 +00:00
2021-12-07 12:20:02 +00:00
2021-02-02 00:10:01 +00:00
2022-03-21 00:30:04 +00:00
2022-03-14 18:01:02 +00:00
2022-03-20 15:05:05 +00:00
2021-12-21 02:45:03 +00:00
2021-11-17 15:56:03 +00:00
2022-03-29 23:58:18 +00:00
2022-02-11 18:51:59 +00:00
2021-08-17 22:08:57 +00:00
2022-03-29 12:42:13 +00:00
2021-07-06 20:21:57 +00:00
2022-03-29 12:42:13 +00:00
2022-03-22 16:25:03 +00:00
2022-02-11 18:51:59 +00:00
2022-03-03 16:13:03 +00:00
2022-02-07 14:01:05 +00:00
2022-03-29 11:07:11 +00:00
2022-02-11 18:51:59 +00:00
2022-02-25 13:48:00 +00:00
2022-03-18 18:23:04 +00:00
2022-03-15 15:22:05 +00:00
2022-03-15 15:22:05 +00:00
2022-03-22 16:25:03 +00:00
2021-06-15 15:22:58 +00:00
2021-12-06 21:30:03 +00:00
2022-01-04 00:20:01 +00:00
2022-03-25 21:34:01 +00:00
2021-03-23 23:02:05 +00:00
2022-03-22 16:25:03 +00:00
2022-03-29 19:57:16 +00:00
2021-06-15 15:22:58 +00:00
2021-05-15 17:38:05 +00:00
2022-03-25 16:53:01 +00:00
2021-12-10 20:30:05 +00:00
2021-05-25 14:20:57 +00:00
2021-11-08 19:19:58 +00:00
2021-12-09 09:56:04 +00:00
2021-12-21 07:02:34 +00:00
2022-03-16 18:30:03 +00:00
2022-03-29 12:42:13 +00:00
2022-03-29 13:53:14 +00:00
2022-03-07 02:38:01 +00:00
2022-03-29 23:58:18 +00:00
2021-12-13 10:21:07 +00:00
2022-03-22 16:25:03 +00:00