Commit f86048c
committed
Connectors: Add
Adds an optional `is_active` callable to the `plugin` definition accepted by
`WP_Connector_Registry::register()`. The callback receives no arguments, must
return a boolean, and is used by the Connectors screen to decide whether a
connector's backing plugin is currently active. When omitted, it defaults to
`__return_true`; when provided but not callable, registration fails with a
`_doing_it_wrong()` notice.
Developed in: WordPress/wordpress-develop#11565
Props iamadisingh, jorgefilipecosta, mukesh27, gziolo.
Fixes #65020.
Built from https://develop.svn.wordpress.org/trunk@62288
git-svn-id: http://core.svn.wordpress.org/trunk@61568 1a063a9b-81f0-0310-95a4-ce76da25c4cdis_active callback support to plugin registration.1 parent be69a1f commit f86048c
3 files changed
Lines changed: 46 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
112 | | - | |
113 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
114 | 119 | | |
115 | 120 | | |
116 | 121 | | |
| |||
243 | 248 | | |
244 | 249 | | |
245 | 250 | | |
246 | | - | |
247 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
248 | 275 | | |
249 | 276 | | |
250 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
370 | 381 | | |
371 | 382 | | |
372 | 383 | | |
| |||
638 | 649 | | |
639 | 650 | | |
640 | 651 | | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | 652 | | |
646 | 653 | | |
647 | 654 | | |
| |||
674 | 681 | | |
675 | 682 | | |
676 | 683 | | |
677 | | - | |
678 | | - | |
| 684 | + | |
| 685 | + | |
679 | 686 | | |
680 | 687 | | |
681 | 688 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments