ProShell v2.0
Dashboard
Server Info
Server: 158.106.128.192
PHP: 8.2.33
home
planet5
public_html
bansibaba.com
wp-includes
2026-09-12 21:59:01
Editing: wpcom-tos.php
Cancel
Save Changes
<?php /** * Handles acceptance of WordPress.com Terms of Service for sites connected to WP.com. * * This is auto-loaded as of Jetpack v8.3 for WP.com connected-sites only. * * @package automattic/jetpack */ namespace Automattic\Jetpack\TOS; use Automattic\Jetpack\Connection\Client; if ( ! defined( 'ABSPATH' ) ) { exit( 0 ); } /** * Makes a request to the WP.com legal endpoint to mark the Terms of Service as accepted. */ function accept_tos() { check_ajax_referer( 'wp_ajax_action', '_nonce' ); $response = Client::wpcom_json_api_request_as_user( '/legal', '2', array( 'method' => 'POST', ), array( 'action' => 'accept_tos', ) ); if ( is_wp_error( $response ) ) { // @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal -- It takes null, but its phpdoc only says int. wp_send_json_error( array( 'message' => __( 'Could not accept the Terms of Service. Please try again later.', 'jetpack' ) ), null, JSON_UNESCAPED_SLASHES ); } // @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal -- It takes null, but its phpdoc only says int. wp_send_json_success( $response, null, JSON_UNESCAPED_SLASHES ); } add_action( 'wp_ajax_jetpack_accept_tos', __NAMESPACE__ . '\accept_tos' );
Upload Files
Cancel
Upload
Create New
Cancel
Create
Change Permissions
Cancel
Save
Change Date
Cancel
Save
Rename Item
Cancel
Save
Confirm Delete
Are you sure you want to delete the selected items?
Cancel
Delete