LLMS_REST_Webhooks::load()
Load webhooks
Return Return
(int) Number of hooks loaded.
Source Source
File: libraries/lifterlms-rest/includes/class-llms-rest-webhooks.php
* * @since 1.0.0-beta.1 * @since 1.0.0-beta.16 * * @return int Number of hooks loaded. */ public function load() { /** * Limit the number of webhooks that are loaded. By default all webhooks are loaded. * * @since 1.0.0-beta.1 * @since 1.0.0-beta.16 When retrieving the webhooks, instantiate the webhooks query passing `no_found_rows` arg as `true`, * to improve performance (no pagination is needed). * @param int $limit Number of webhooks to load. Default `null` loads all webhooks. */ $limit = apply_filters( 'llms_load_webhooks_limit', null ); $hooks = new LLMS_REST_Webhooks_Query( array( 'status' => 'active', 'per_page' => $limit ? $limit : 999, 'no_found_rows' => true, ) ); $loaded = 0; foreach ( $hooks->get_webhooks() as $hook ) { $hook->enqueue();
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.16 | |
1.0.0-beta.1 | Introduced. |