You appear to be a bot. Output may be restricted
Description
Decides if the sender should run on shutdown for this request.
Usage
$bool = Actions::should_initialize_sender();
Parameters
Returns
bool
Source
File name: jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php
Lines:
1 to 41 of 41
public static function should_initialize_sender() { // Allow for explicit disable of Sync from request param jetpack_sync_read_only. if ( isset( $_REQUEST['jetpack_sync_read_only'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification self::mark_sync_read_only(); return false; } if ( Constants::is_true( 'DOING_CRON' ) ) { return self::sync_via_cron_allowed(); } /** * For now, if dedicated Sync is enabled we will always initialize send, even for GET and unauthenticated requests. */ if ( Settings::is_dedicated_sync_enabled() ) { return true; } if ( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === $_SERVER['REQUEST_METHOD'] ) { return true; } if ( current_user_can( 'manage_options' ) ) { return true; } if ( is_admin() ) { return true; } if ( defined( 'PHPUNIT_JETPACK_TESTSUITE' ) ) { return true; } if ( Constants::get_constant( 'WP_CLI' ) ) { return true; } return false; }