PATH:
home
/
lab2454c
/
sothebankuab.com
/
wp-content
/
plugins
/
jetpack
/
json-endpoints
/
jetpack
<?php class Jetpack_JSON_API_Modules_Modify_Endpoint extends Jetpack_JSON_API_Modules_Endpoint { // POST /sites/%s/jetpack/modules/%s/activate // POST /sites/%s/jetpack/modules/%s // POST /sites/%s/jetpack/modules protected $needed_capabilities = 'activate_plugins'; protected $action = 'default_action'; public function default_action() { $args = $this->input(); if ( isset( $args['active'] ) && is_bool( $args['active'] ) ) { if ( $args['active'] ) { return $this->activate_module(); } else { return $this->deactivate_module(); } } return true; } protected function activate_module() { foreach ( $this->modules as $module ) { if ( Jetpack::is_module_active( $module ) ) { $error = $this->log[ $module ][] = __( 'The Jetpack Module is already activated.', 'jetpack' ); continue; } $result = Jetpack::activate_module( $module, false, false ); if ( false === $result || ! Jetpack::is_module_active( $module ) ) { $error = $this->log[ $module ][] = __( 'There was an error while activating the module.', 'jetpack' ); } } if ( ! $this->bulk && isset( $error ) ) { return new WP_Error( 'activation_error', $error, 400 ); } return true; } protected function deactivate_module() { foreach ( $this->modules as $module ) { if ( ! Jetpack::is_module_active( $module ) ) { $error = $this->log[ $module ][] = __( 'The Jetpack Module is already deactivated.', 'jetpack' ); continue; } $result = Jetpack::deactivate_module( $module ); if ( false === $result || Jetpack::is_module_active( $module ) ) { $error = $this->log[ $module ][] = __( 'There was an error while deactivating the module.', 'jetpack' ); } } if ( ! $this->bulk && isset( $error ) ) { return new WP_Error( 'deactivation_error', $error, 400 ); } return true; } }
[-] class.jetpack-json-api-plugins-list-endpoint.php
[edit]
[-] class.jetpack-json-api-user-create-endpoint.php
[edit]
[-] class.jetpack-json-api-modules-list-endpoint.php
[edit]
[-] class-jetpack-json-api-modules-list-v1-2-endpoint.php
[edit]
[-] class-jetpack-json-api-delete-backup-helper-script-endpoint.php
[edit]
[-] class.jetpack-json-api-themes-list-endpoint.php
[edit]
[-] class.jetpack-json-api-modules-modify-endpoint.php
[edit]
[-] class.jetpack-json-api-check-capabilities-endpoint.php
[edit]
[-] class.jetpack-json-api-modules-endpoint.php
[edit]
[-] class.jetpack-json-api-plugins-install-endpoint.php
[edit]
[-] class.jetpack-json-api-get-database-object-backup-endpoint.php
[edit]
[-] class.jetpack-json-api-plugins-delete-endpoint.php
[edit]
[-] class.jetpack-json-api-plugins-modify-endpoint.php
[edit]
[-] class.jetpack-json-api-themes-endpoint.php
[edit]
[+]
..
[-] class.jetpack-json-api-get-post-backup-endpoint.php
[edit]
[-] class.jetpack-json-api-log-endpoint.php
[edit]
[-] class.jetpack-json-api-user-connect-endpoint.php
[edit]
[-] class.jetpack-json-api-core-endpoint.php
[edit]
[-] class.jetpack-json-api-sync-endpoint.php
[edit]
[-] class.wpcom-json-api-get-option-endpoint.php
[edit]
[-] class.jetpack-json-api-get-option-backup-endpoint.php
[edit]
[-] class.jetpack-json-api-endpoint.php
[edit]
[-] class.jetpack-json-api-themes-install-endpoint.php
[edit]
[-] class.jetpack-json-api-plugins-get-endpoint.php
[edit]
[-] class.jetpack-json-api-updates-status-endpoint.php
[edit]
[-] class.jetpack-json-api-modules-get-endpoint.php
[edit]
[-] class.jetpack-json-api-plugins-modify-v1-2-endpoint.php
[edit]
[-] class.wpcom-json-api-update-option-endpoint.php
[edit]
[-] class.jetpack-json-api-themes-modify-endpoint.php
[edit]
[-] class.jetpack-json-api-get-user-backup-endpoint.php
[edit]
[-] class.jetpack-json-api-core-modify-endpoint.php
[edit]
[-] class.jetpack-json-api-jps-woocommerce-connect-endpoint.php
[edit]
[-] class.jetpack-json-api-translations-endpoint.php
[edit]
[-] class.jetpack-json-api-themes-active-endpoint.php
[edit]
[-] class.jetpack-json-api-get-term-backup-endpoint.php
[edit]
[-] class.jetpack-json-api-cron-endpoint.php
[edit]
[-] class.jetpack-json-api-plugins-new-endpoint.php
[edit]
[-] class.jetpack-json-api-themes-delete-endpoint.php
[edit]
[-] class.jetpack-json-api-themes-get-endpoint.php
[edit]
[-] class.jetpack-json-api-plugins-endpoint.php
[edit]
[-] json-api-jetpack-endpoints.php
[edit]
[-] class.jetpack-json-api-translations-modify-endpoint.php
[edit]
[-] class.jetpack-json-api-themes-new-endpoint.php
[edit]
[-] class.jetpack-json-api-maybe-auto-update-endpoint.php
[edit]
[-] class.jetpack-json-api-get-comment-backup-endpoint.php
[edit]
[-] class-jetpack-json-api-install-backup-helper-script-endpoint.php
[edit]