← All changes
|
json-endpoints/jetpack/class-jetpack-json-api-install-backup-helper-script-endpoint.php
+10
-2
13.2.4
→
16.3-a.7
View file →
| @@ -5,17 +5,25 @@ | ||
| 5 | 5 | * |
| 6 | 6 | * @package automattic/jetpack |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -use Automattic\Jetpack\Backup\V0003\Helper_Script_Manager; | |
| 9 | +use Automattic\Jetpack\Backup\V0005\Helper_Script_Manager; | |
| 10 | 10 | |
| 11 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 12 | + exit( 0 ); | |
| 13 | +} | |
| 14 | + | |
| 11 | 15 | /** |
| 12 | 16 | * API endpoint /sites/%s/install-backup-helper-script |
| 13 | 17 | * This API endpoint installs a Helper Script to assist Jetpack Backup fetch data |
| 18 | + * | |
| 19 | + * @phan-constructor-used-for-side-effects | |
| 14 | 20 | */ |
| 15 | 21 | class Jetpack_JSON_API_Install_Backup_Helper_Script_Endpoint extends Jetpack_JSON_API_Endpoint { |
| 16 | 22 | /** |
| 17 | - * This endpoint is only accessible from Jetpack Backup; it requires no further capabilities. | |
| 23 | + * An empty capability set means this endpoint is only accessible using a site token: it is | |
| 24 | + * reachable with a Jetpack site (blog) token and denied for every user token, however | |
| 25 | + * privileged. See Jetpack_JSON_API_Endpoint::check_capability(). | |
| 18 | 26 | * |
| 19 | 27 | * @var array |
| 20 | 28 | */ |
| 21 | 29 | protected $needed_capabilities = array(); |