jetpack
Last commit date
3rd-party
2 years ago
_inc
1 year ago
css
1 year ago
extensions
1 year ago
images
1 year ago
jetpack_vendor
1 year ago
json-endpoints
1 year ago
modules
1 year ago
sal
1 year ago
src
1 year ago
vendor
1 year ago
views
2 years ago
CHANGELOG.md
1 year ago
LICENSE.txt
5 years ago
SECURITY.md
2 years ago
class-jetpack-connection-status.php
2 years ago
class-jetpack-gallery-settings.php
3 years ago
class-jetpack-pre-connection-jitms.php
2 years ago
class-jetpack-stats-dashboard-widget.php
2 years ago
class-jetpack-xmlrpc-methods.php
1 year ago
class.frame-nonce-preview.php
4 years ago
class.jetpack-admin.php
1 year ago
class.jetpack-affiliate.php
2 years ago
class.jetpack-autoupdate.php
2 years ago
class.jetpack-bbpress-json-api.compat.php
2 years ago
class.jetpack-cli.php
1 year ago
class.jetpack-client-server.php
2 years ago
class.jetpack-gutenberg.php
1 year ago
class.jetpack-heartbeat.php
2 years ago
class.jetpack-modules-list-table.php
2 years ago
class.jetpack-network-sites-list-table.php
2 years ago
class.jetpack-network.php
2 years ago
class.jetpack-plan.php
2 years ago
class.jetpack-post-images.php
1 year ago
class.jetpack-twitter-cards.php
2 years ago
class.jetpack-user-agent.php
2 years ago
class.jetpack.php
1 year ago
class.json-api-endpoints.php
2 years ago
class.json-api.php
2 years ago
class.photon.php
3 years ago
composer.json
1 year ago
enhanced-open-graph.php
3 years ago
functions.compat.php
2 years ago
functions.cookies.php
2 years ago
functions.global.php
1 year ago
functions.is-mobile.php
2 years ago
functions.opengraph.php
1 year ago
functions.photon.php
2 years ago
global.d.ts
1 year ago
jetpack.php
1 year ago
json-api-config.php
3 years ago
json-endpoints.php
2 years ago
load-jetpack.php
2 years ago
locales.php
4 years ago
readme.txt
1 year ago
uninstall.php
2 years ago
wpml-config.xml
3 years ago
json-endpoints.php
137 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Endpoint class definitions are located inside the files that require these endpoint classes. |
| 4 | * file ordering matters |
| 5 | * |
| 6 | * @package automattic/jetpack |
| 7 | */ |
| 8 | |
| 9 | $json_endpoints_dir = __DIR__ . '/json-endpoints/'; |
| 10 | |
| 11 | // abstract endpoints |
| 12 | require_once $json_endpoints_dir . 'class.wpcom-json-api-post-endpoint.php'; |
| 13 | require_once $json_endpoints_dir . 'class.wpcom-json-api-post-v1-1-endpoint.php'; // v1.1 |
| 14 | require_once $json_endpoints_dir . 'class.wpcom-json-api-comment-endpoint.php'; |
| 15 | require_once $json_endpoints_dir . 'class.wpcom-json-api-taxonomy-endpoint.php'; |
| 16 | require_once $json_endpoints_dir . 'class.wpcom-json-api-render-endpoint.php'; |
| 17 | |
| 18 | // ********** |
| 19 | // v1 |
| 20 | // ********** |
| 21 | |
| 22 | require_once $json_endpoints_dir . 'class.wpcom-json-api-delete-media-endpoint.php'; |
| 23 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-comment-endpoint.php'; |
| 24 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-comments-tree-endpoint.php'; |
| 25 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-media-endpoint.php'; |
| 26 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-post-endpoint.php'; |
| 27 | require_once $json_endpoints_dir . 'class.wpcom-json-api-render-shortcode-endpoint.php'; |
| 28 | require_once $json_endpoints_dir . 'class.wpcom-json-api-list-shortcodes-endpoint.php'; |
| 29 | require_once $json_endpoints_dir . 'class.wpcom-json-api-render-embed-reversal-endpoint.php'; |
| 30 | require_once $json_endpoints_dir . 'class.wpcom-json-api-render-embed-endpoint.php'; |
| 31 | require_once $json_endpoints_dir . 'class.wpcom-json-api-list-embeds-endpoint.php'; |
| 32 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-site-endpoint.php'; |
| 33 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-taxonomies-endpoint.php'; |
| 34 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-taxonomy-endpoint.php'; |
| 35 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-term-endpoint.php'; |
| 36 | require_once $json_endpoints_dir . 'class.wpcom-json-api-list-comments-endpoint.php'; |
| 37 | require_once $json_endpoints_dir . 'class.wpcom-json-api-list-dropdown-pages-endpoint.php'; |
| 38 | require_once $json_endpoints_dir . 'class.wpcom-json-api-list-media-endpoint.php'; |
| 39 | require_once $json_endpoints_dir . 'class.wpcom-json-api-list-post-types-endpoint.php'; |
| 40 | require_once $json_endpoints_dir . 'class.wpcom-json-api-list-post-type-taxonomies-endpoint.php'; |
| 41 | require_once $json_endpoints_dir . 'class.wpcom-json-api-list-posts-endpoint.php'; |
| 42 | require_once $json_endpoints_dir . 'class.wpcom-json-api-list-roles-endpoint.php'; |
| 43 | require_once $json_endpoints_dir . 'class.wpcom-json-api-list-terms-endpoint.php'; |
| 44 | require_once $json_endpoints_dir . 'class.wpcom-json-api-list-users-endpoint.php'; |
| 45 | require_once $json_endpoints_dir . 'class.wpcom-json-api-site-user-endpoint.php'; |
| 46 | require_once $json_endpoints_dir . 'class.wpcom-json-api-bulk-update-comments-endpoint.php'; |
| 47 | require_once $json_endpoints_dir . 'class.wpcom-json-api-update-comment-endpoint.php'; |
| 48 | require_once $json_endpoints_dir . 'class.wpcom-json-api-update-media-endpoint.php'; |
| 49 | require_once $json_endpoints_dir . 'class.wpcom-json-api-update-post-endpoint.php'; |
| 50 | require_once $json_endpoints_dir . 'class.wpcom-json-api-update-taxonomy-endpoint.php'; |
| 51 | require_once $json_endpoints_dir . 'class.wpcom-json-api-update-term-endpoint.php'; |
| 52 | require_once $json_endpoints_dir . 'class.wpcom-json-api-update-user-endpoint.php'; |
| 53 | require_once $json_endpoints_dir . 'class.wpcom-json-api-upload-media-endpoint.php'; |
| 54 | require_once $json_endpoints_dir . 'class.wpcom-json-api-site-settings-endpoint.php'; |
| 55 | require_once $json_endpoints_dir . 'class.wpcom-json-api-sharing-buttons-endpoint.php'; |
| 56 | |
| 57 | // ********** |
| 58 | // v1.1 |
| 59 | // ********** |
| 60 | |
| 61 | // Comments |
| 62 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-comments-tree-v1-1-endpoint.php'; |
| 63 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-comment-counts-endpoint.php'; |
| 64 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-comment-history-endpoint.php'; |
| 65 | |
| 66 | // Media |
| 67 | require_once $json_endpoints_dir . 'class.wpcom-json-api-delete-media-v1-1-endpoint.php'; |
| 68 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-media-v1-1-endpoint.php'; |
| 69 | require_once $json_endpoints_dir . 'class.wpcom-json-api-list-media-v1-1-endpoint.php'; |
| 70 | require_once $json_endpoints_dir . 'class.wpcom-json-api-update-media-v1-1-endpoint.php'; |
| 71 | require_once $json_endpoints_dir . 'class.wpcom-json-api-upload-media-v1-1-endpoint.php'; |
| 72 | |
| 73 | // Posts |
| 74 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-post-v1-1-endpoint.php'; |
| 75 | require_once $json_endpoints_dir . 'class.wpcom-json-api-list-posts-v1-1-endpoint.php'; |
| 76 | require_once $json_endpoints_dir . 'class.wpcom-json-api-update-post-v1-1-endpoint.php'; |
| 77 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-autosave-v1-1-endpoint.php'; |
| 78 | require_once $json_endpoints_dir . 'class.wpcom-json-api-autosave-post-v1-1-endpoint.php'; |
| 79 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-post-counts-v1-1-endpoint.php'; |
| 80 | require_once $json_endpoints_dir . 'class.wpcom-json-api-bulk-delete-post-endpoint.php'; |
| 81 | require_once $json_endpoints_dir . 'class.wpcom-json-api-bulk-restore-post-endpoint.php'; |
| 82 | |
| 83 | // Custom Menus |
| 84 | require_once $json_endpoints_dir . 'class.wpcom-json-api-menus-v1-1-endpoint.php'; |
| 85 | |
| 86 | // Custom CSS |
| 87 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-customcss.php'; |
| 88 | require_once $json_endpoints_dir . 'class.wpcom-json-api-update-customcss.php'; |
| 89 | |
| 90 | // Logo Settings |
| 91 | require_once $json_endpoints_dir . 'class.wpcom-json-api-update-site-logo-endpoint.php'; |
| 92 | |
| 93 | // Homepage Settings |
| 94 | require_once $json_endpoints_dir . 'class.wpcom-json-api-update-site-homepage-endpoint.php'; |
| 95 | |
| 96 | // Widgets |
| 97 | require_once $json_endpoints_dir . 'class.wpcom-json-api-add-widget-endpoint.php'; |
| 98 | |
| 99 | // ********** |
| 100 | // v1.2 |
| 101 | // ********** |
| 102 | |
| 103 | // Comments |
| 104 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-comments-tree-v1-2-endpoint.php'; |
| 105 | |
| 106 | // Media |
| 107 | require_once $json_endpoints_dir . 'class.wpcom-json-api-list-media-v1-2-endpoint.php'; |
| 108 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-media-v1-2-endpoint.php'; |
| 109 | require_once $json_endpoints_dir . 'class.wpcom-json-api-edit-media-v1-2-endpoint.php'; |
| 110 | |
| 111 | require_once $json_endpoints_dir . 'class.wpcom-json-api-update-post-v1-2-endpoint.php'; |
| 112 | require_once $json_endpoints_dir . 'class.wpcom-json-api-site-settings-v1-2-endpoint.php'; |
| 113 | require_once $json_endpoints_dir . 'class.wpcom-json-api-get-site-v1-2-endpoint.php'; |
| 114 | require_once $json_endpoints_dir . 'class.wpcom-json-api-list-posts-v1-2-endpoint.php'; |
| 115 | |
| 116 | // Jetpack Only Endpoints |
| 117 | if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
| 118 | $json_jetpack_endpoints_dir = ABSPATH . 'public.api/rest/json-endpoints/jetpack/'; |
| 119 | } else { |
| 120 | $json_jetpack_endpoints_dir = __DIR__ . '/json-endpoints/jetpack/'; |
| 121 | } |
| 122 | |
| 123 | // This files instantiates the endpoints |
| 124 | require_once $json_jetpack_endpoints_dir . 'json-api-jetpack-endpoints.php'; |
| 125 | |
| 126 | // ********** |
| 127 | // v1.3 |
| 128 | // ********** |
| 129 | |
| 130 | require_once $json_endpoints_dir . 'class.wpcom-json-api-site-settings-v1-3-endpoint.php'; |
| 131 | |
| 132 | // ********** |
| 133 | // v1.4 |
| 134 | // ********** |
| 135 | |
| 136 | require_once $json_endpoints_dir . 'class.wpcom-json-api-site-settings-v1-4-endpoint.php'; |
| 137 |