diff options
author | Yury German <blueknight@gentoo.org> | 2016-02-12 22:22:00 -0500 |
---|---|---|
committer | Yury German <blueknight@gentoo.org> | 2016-02-12 22:22:00 -0500 |
commit | 657cafe0e955cf88033597f131aa50835140c617 (patch) | |
tree | cf21a30d319cb2a238a6cfb8b4eb3b20b1b5dcff /plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-log-endpoint.php | |
parent | Adding New Mantra version 2.4.1.1 - Bug 574468 (diff) | |
download | blogs-gentoo-657cafe0e955cf88033597f131aa50835140c617.tar.gz blogs-gentoo-657cafe0e955cf88033597f131aa50835140c617.tar.bz2 blogs-gentoo-657cafe0e955cf88033597f131aa50835140c617.zip |
Updating plugins easy-table, jetpack, openid, public-post preview, talbe-of-contents-plus, wordress-mobile-pack - Bug 574468
Diffstat (limited to 'plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-log-endpoint.php')
-rw-r--r-- | plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-log-endpoint.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-log-endpoint.php b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-log-endpoint.php new file mode 100644 index 00000000..f1d0f4da --- /dev/null +++ b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-log-endpoint.php @@ -0,0 +1,16 @@ +<?php + +class Jetpack_JSON_API_Jetpack_Log_Endpoint extends Jetpack_JSON_API_Endpoint { + // GET /sites/%s/jetpack-log + protected $needed_capabilities = 'manage_options'; + + protected function result() { + $args = $this->input(); + $event = ( isset( $args['event'] ) && is_string( $args['event'] ) ) ? $code : false; + $num = ( isset( $args['num'] ) ) ? intval( $num ) : false; + + return array( + 'log' => Jetpack::get_log( $event, $num ) + ); + } +} |