PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
jetpack
/
json-endpoints
/
jetpack
<?php class Jetpack_JSON_API_Get_Comment_Backup_Endpoint extends Jetpack_JSON_API_Endpoint { // /sites/%s/comments/%d/backup -> $blog_id, $comment_id protected $needed_capabilities = array(); // This endpoint is only accessible using a site token protected $comment_id; function validate_input( $comment_id ) { if ( empty( $comment_id ) || ! is_numeric( $comment_id ) ) { return new WP_Error( 'comment_id_not_specified', __( 'You must specify a Comment ID', 'jetpack' ), 400 ); } $this->comment_id = (int) $comment_id; return true; } protected function result() { // Disable Sync as this is a read-only operation and triggered by sync activity. \Automattic\Jetpack\Sync\Actions::mark_sync_read_only(); $comment = get_comment( $this->comment_id ); if ( empty( $comment ) ) { return new WP_Error( 'comment_not_found', __( 'Comment not found', 'jetpack' ), 404 ); } $allowed_keys = array( 'comment_ID', 'comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_author_IP', 'comment_date', 'comment_date_gmt', 'comment_content', 'comment_karma', 'comment_approved', 'comment_agent', 'comment_type', 'comment_parent', 'user_id', ); $comment = array_intersect_key( $comment->to_array(), array_flip( $allowed_keys ) ); $comment_meta = get_comment_meta( $comment['comment_ID'] ); return array( 'comment' => $comment, 'meta' => is_array( $comment_meta ) ? $comment_meta : array(), ); } }
[-] 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]