PATH:
home
/
lab2454c
/
sothebankuab.com
/
wp-content
/
plugins
/
jetpack
/
json-endpoints
/
jetpack
<?php // POST /sites/%s/plugins/%s/delete new Jetpack_JSON_API_Plugins_Delete_Endpoint( array( 'description' => 'Delete/Uninstall a plugin from your jetpack blog', 'group' => '__do_not_document', 'stat' => 'plugins:1:delete', 'min_version' => '1', 'max_version' => '1.1', 'method' => 'POST', 'path' => '/sites/%s/plugins/%s/delete', 'path_labels' => array( '$site' => '(int|string) The site ID, The site domain', '$plugin' => '(int|string) The plugin slug to delete', ), 'response_format' => Jetpack_JSON_API_Plugins_Endpoint::$_response_format, 'allow_jetpack_site_auth' => true, 'example_request_data' => array( 'headers' => array( 'authorization' => 'Bearer YOUR_API_TOKEN', ), ), 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/example.wordpress.org/plugins/akismet%2Fakismet/delete', ) ); // v1.2 new Jetpack_JSON_API_Plugins_Delete_Endpoint( array( 'description' => 'Delete/Uninstall a plugin from your jetpack blog', 'group' => '__do_not_document', 'stat' => 'plugins:1:delete', 'min_version' => '1.2', 'method' => 'POST', 'path' => '/sites/%s/plugins/%s/delete', 'path_labels' => array( '$site' => '(int|string) The site ID, The site domain', '$plugin' => '(int|string) The plugin slug to delete', ), 'response_format' => Jetpack_JSON_API_Plugins_Endpoint::$_response_format_v1_2, 'allow_jetpack_site_auth' => true, 'example_request_data' => array( 'headers' => array( 'authorization' => 'Bearer YOUR_API_TOKEN', ), ), 'example_request' => 'https://public-api.wordpress.com/rest/v1.2/sites/example.wordpress.org/plugins/akismet%2Fakismet/delete', ) ); class Jetpack_JSON_API_Plugins_Delete_Endpoint extends Jetpack_JSON_API_Plugins_Endpoint { // POST /sites/%s/plugins/%s/delete protected $needed_capabilities = 'delete_plugins'; protected $action = 'delete'; protected function delete() { foreach ( $this->plugins as $plugin ) { if ( Jetpack::is_plugin_active( $plugin ) ) { $error = $this->log[ $plugin ][] = __( 'You cannot delete a plugin while it is active on the main site.', 'jetpack' ); continue; } $result = delete_plugins( array( $plugin ) ); if ( is_wp_error( $result ) ) { $error = $this->log[ $plugin ][] = $result->get_error_message(); } else { $this->log[ $plugin ][] = 'Plugin deleted'; } } if ( ! $this->bulk && isset( $error ) ) { return new WP_Error( 'delete_plugin_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]