SIGN IN SIGN UP

Connectors: Add `is_active` callback support to plugin registration.

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: https://github.com/WordPress/wordpress-develop/pull/11565

Props iamadisingh, jorgefilipecosta, mukesh27, gziolo.
Fixes #65020.

git-svn-id: https://develop.svn.wordpress.org/trunk@62288 602fd350-edb4-49c9-b593-d223f7449a82
J
Jorge Costa committed
b3b40be9c3fda7d731c4275c25a22722196f0804
Parent: ddb5edd