Bernie Reiter
9d039e6c91
Blocks: Call get_hooked_blocks only once per template/part/pattern.
...
Prior to this changeset, `get_hooked_blocks` was called four times ''for every parsed block'' in each template, template part, and pattern. With this changeset applied, `get_hooked_blocks` is called only once per template, template part, or pattern.
Additionally, `get_hooked_blocks` is called only once when returning the list of all registered patterns. (The latter modification brings the implementation closer to its state prior to Block Hooks.)
Finally, when there are no registered hooked blocks or `hooked_block_types` filters, parsing, hooked block insertion, and re-serializing is skipped altogether.
Props gziolo, flixos90, joemcgill, dmsnell, spacedmonkey, hellofromtonya.
Fixes #59383 .
git-svn-id: https://develop.svn.wordpress.org/trunk@56805 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-09 16:38:25 +00:00
..
2023-10-02 18:55:27 +00:00
2022-04-12 09:24:51 +00:00
2023-10-02 11:25:35 +00:00
2023-10-04 22:21:17 +00:00
2023-09-20 21:01:02 +00:00
2023-09-25 21:03:19 +00:00
2023-09-25 21:27:51 +00:00
2023-10-05 22:40:48 +00:00
2022-10-04 02:06:29 +00:00
2023-04-04 14:54:31 +00:00
2023-01-20 01:34:41 +00:00
2022-12-08 19:29:51 +00:00
2023-08-29 13:44:54 +00:00
2023-09-09 09:26:01 +00:00
2023-09-11 10:31:22 +00:00
2023-10-02 11:25:35 +00:00
2023-10-01 00:20:53 +00:00
2023-04-30 14:06:51 +00:00
2023-09-21 00:16:56 +00:00
2023-05-12 08:49:13 +00:00
2023-06-19 18:26:01 +00:00
2023-09-29 19:45:53 +00:00
2023-09-26 16:27:58 +00:00
2022-04-21 11:22:45 +00:00
2023-05-14 17:56:26 +00:00
2023-09-27 17:38:38 +00:00
2023-10-03 18:17:03 +00:00
2023-10-09 16:38:25 +00:00
2023-09-01 17:30:02 +00:00
2023-10-09 16:38:25 +00:00
2023-06-22 14:55:47 +00:00
2023-07-09 20:15:03 +00:00
2022-10-10 18:20:28 +00:00
2022-10-10 18:20:28 +00:00
2023-09-28 00:02:47 +00:00
2023-07-09 20:15:03 +00:00
2023-09-26 00:24:43 +00:00
2023-08-24 08:59:36 +00:00
2022-06-17 11:18:37 +00:00
2023-02-03 13:33:18 +00:00
2022-06-17 11:18:37 +00:00
2023-02-13 09:06:50 +00:00
2023-02-11 12:41:34 +00:00
2023-04-05 13:10:53 +00:00
2023-05-12 21:33:08 +00:00
2023-02-03 13:33:18 +00:00
2023-09-14 12:44:23 +00:00
2023-09-08 09:30:38 +00:00
2023-09-09 09:26:01 +00:00
2023-06-27 15:25:00 +00:00
2023-09-14 12:44:23 +00:00
2023-09-14 12:44:23 +00:00
2023-07-09 20:15:03 +00:00
2022-09-12 15:45:36 +00:00
2023-05-08 22:35:38 +00:00
2022-09-12 15:45:36 +00:00
2023-10-09 11:21:30 +00:00
2023-06-27 00:43:42 +00:00
2023-06-27 00:43:42 +00:00
2023-09-26 14:20:18 +00:00
2022-09-12 15:45:36 +00:00
2023-10-09 16:38:25 +00:00
2022-09-12 15:45:36 +00:00
2023-09-29 10:18:05 +00:00
2023-06-23 06:27:45 +00:00
2022-09-12 15:45:36 +00:00
2023-09-14 13:23:13 +00:00
2023-09-09 09:26:01 +00:00
2023-08-21 17:49:09 +00:00
2023-09-09 09:26:01 +00:00
2023-08-24 08:42:23 +00:00
2023-09-08 09:30:38 +00:00
2023-09-29 21:37:06 +00:00
2023-09-25 21:03:19 +00:00
2023-09-10 09:02:49 +00:00
2023-09-10 09:02:49 +00:00
2023-09-10 09:02:49 +00:00
2023-09-25 21:03:19 +00:00
2023-06-22 14:34:56 +00:00
2023-09-08 09:30:38 +00:00
2022-11-25 15:10:48 +00:00
2023-09-26 13:45:23 +00:00
2023-07-14 20:57:53 +00:00
2023-07-09 20:15:03 +00:00
2023-02-21 16:37:03 +00:00
2023-02-23 10:36:33 +00:00
2022-09-12 15:45:36 +00:00
2023-08-10 01:04:35 +00:00
2023-09-18 12:39:18 +00:00
2023-06-24 17:15:06 +00:00
2023-09-21 18:27:17 +00:00
2023-06-22 14:55:47 +00:00
2022-09-12 15:45:36 +00:00
2023-06-22 14:34:56 +00:00
2022-12-15 21:30:26 +00:00
2022-12-15 21:30:26 +00:00
2022-09-12 15:45:36 +00:00
2023-09-21 18:27:17 +00:00
2023-09-26 16:53:20 +00:00
2023-08-19 00:08:32 +00:00
2023-09-08 09:30:38 +00:00
2023-09-07 14:57:30 +00:00
2023-09-09 09:26:01 +00:00
2023-07-09 21:23:34 +00:00
2023-07-09 21:23:34 +00:00
2022-09-12 15:45:36 +00:00
2023-09-09 09:26:01 +00:00
2023-05-11 11:13:10 +00:00
2023-10-06 14:04:22 +00:00
2023-03-10 16:27:23 +00:00
2023-07-12 09:44:30 +00:00
2023-03-14 16:53:07 +00:00
2022-11-13 13:49:16 +00:00
2023-07-09 21:23:34 +00:00
2022-09-12 15:45:36 +00:00
2023-09-05 19:24:31 +00:00
2022-09-12 15:45:36 +00:00
2023-10-03 14:59:22 +00:00
2022-10-04 03:57:29 +00:00
2023-05-02 15:43:03 +00:00
2023-02-21 15:57:36 +00:00
2022-09-12 15:45:36 +00:00
2023-05-02 15:43:03 +00:00
2023-09-09 09:26:01 +00:00
2023-09-08 09:30:38 +00:00
2023-07-28 11:35:17 +00:00
2023-09-25 21:03:19 +00:00
2022-09-12 15:45:36 +00:00
2023-08-10 01:04:35 +00:00
2023-08-10 01:04:35 +00:00
2023-06-22 14:34:56 +00:00
2022-09-12 15:45:36 +00:00
2023-05-02 15:43:03 +00:00
2023-07-08 10:46:20 +00:00
2023-04-27 23:13:36 +00:00
2023-09-14 12:38:04 +00:00
2022-09-12 15:45:36 +00:00
2023-09-08 09:30:38 +00:00
2023-09-08 10:01:14 +00:00
2023-07-09 21:23:34 +00:00
2023-09-08 09:30:38 +00:00
2023-09-26 13:45:23 +00:00
2023-10-02 11:25:35 +00:00
2023-10-04 19:01:49 +00:00
2023-10-03 18:17:03 +00:00
2023-09-07 20:43:48 +00:00
2022-09-12 15:45:36 +00:00
2023-07-10 12:51:51 +00:00
2023-09-09 09:26:01 +00:00
2022-09-12 15:45:36 +00:00
2023-08-25 01:26:01 +00:00
2023-09-20 19:29:30 +00:00
2023-08-13 10:29:04 +00:00
2023-09-09 09:26:01 +00:00
2022-09-20 14:15:25 +00:00
2022-09-20 14:15:25 +00:00
2022-09-20 14:15:25 +00:00
2023-09-25 21:03:19 +00:00
2023-09-29 17:11:21 +00:00
2023-09-09 09:26:01 +00:00
2023-09-11 05:25:41 +00:00
2022-06-17 11:18:37 +00:00
2023-09-26 17:31:28 +00:00
2023-10-06 14:04:22 +00:00
2023-09-30 07:37:34 +00:00
2022-06-17 11:18:37 +00:00
2023-09-25 17:04:41 +00:00
2023-05-02 15:43:03 +00:00
2023-07-29 00:29:29 +00:00
2023-02-12 18:06:33 +00:00
2023-07-09 21:46:24 +00:00
2023-09-07 17:28:59 +00:00
2023-09-26 00:24:43 +00:00
2023-10-03 14:59:22 +00:00
2023-08-18 17:27:16 +00:00
2023-01-15 14:55:19 +00:00
2023-09-08 10:01:14 +00:00
2023-08-24 19:57:15 +00:00
2023-08-03 12:08:30 +00:00
2023-09-22 19:06:45 +00:00
2023-07-10 22:36:06 +00:00
2023-09-19 12:28:25 +00:00
2023-08-18 17:27:16 +00:00
2023-10-03 16:13:43 +00:00
2023-10-09 14:47:57 +00:00
2023-09-26 14:43:25 +00:00
2023-09-29 12:19:29 +00:00
2023-09-26 15:30:34 +00:00
2023-06-22 14:55:47 +00:00
2023-07-10 22:46:22 +00:00
2023-02-24 01:21:54 +00:00
2023-06-22 14:55:47 +00:00
2023-08-23 15:51:12 +00:00
2023-07-10 22:46:22 +00:00
2023-07-10 22:46:22 +00:00
2023-05-02 11:24:52 +00:00
2023-06-22 14:55:47 +00:00
2023-09-09 09:26:01 +00:00
2023-02-16 00:02:21 +00:00
2023-07-10 22:46:22 +00:00
2023-10-06 16:31:22 +00:00
2023-10-03 16:13:43 +00:00
2023-06-08 07:52:58 +00:00
2023-02-21 16:37:03 +00:00
2023-08-22 12:28:52 +00:00
2023-05-17 18:29:41 +00:00
2023-10-04 12:14:50 +00:00
2023-08-24 08:59:36 +00:00
2023-10-03 16:13:43 +00:00
2023-09-26 15:42:56 +00:00
2023-07-11 11:13:30 +00:00
2022-04-06 15:31:23 +00:00
2023-04-10 19:29:15 +00:00
2023-10-02 18:46:30 +00:00
2023-07-20 00:04:33 +00:00
2023-09-14 04:54:22 +00:00
2023-09-25 15:34:34 +00:00
2023-10-01 00:20:53 +00:00
2023-09-20 17:25:26 +00:00
2022-09-21 11:41:44 +00:00
2023-10-02 22:40:36 +00:00
2023-09-29 19:45:53 +00:00
2023-09-21 06:33:48 +00:00
2023-10-03 15:16:55 +00:00
2023-09-12 15:21:02 +00:00
2023-09-14 01:23:37 +00:00
2023-09-20 20:49:12 +00:00
2023-10-03 17:07:21 +00:00
2023-07-10 23:09:16 +00:00
2022-07-21 22:43:24 +00:00