C">3 年 前 css-selection.js 77628cf8bf first comm 3 年 前 css-shapes.js 77628cf8bf first comm 3 年 前 css-snappoints.js 77628cf8bf first comm 3 年 前 css-sticky.js 77628cf8bf first comm 3 年 前 css-subgrid.js 77628cf8bf first comm 3 年 前 css-supports-api.js 77628cf8bf first comm 3 年 前 css-table.js 77628cf8bf first comm 3 年 前 css-text-align-last.js 77628cf8bf first comm 3 年 前 css-text-box-trim.js 77628cf8bf first comm 3 年 前 css-text-indent.js 77628cf8bf first comm 3 年 前 css-text-justify.js 77628cf8bf first comm 3 年 前 css-text-orientation.js 77628cf8bf first comm 3 年 前 css-text-spacing.js 77628cf8bf first comm 3 年 前 css-textshadow.js 77628cf8bf first comm 3 年 前 css-touch-action.js 77628cf8bf first comm 3 年 前 css-transitions.js 77628cf8bf first comm 3 年 前 css-unicode-bidi.js 77628cf8bf first comm 3 年 前 css-unset-value.js 77628cf8bf first comm 3 年 前 css-variables.js 77628cf8bf first comm 3 年 前 css-when-else.js 77628cf8bf first comm 3 年 前 css-widows-orphans.js 77628cf8bf first comm 3 年 前 css-width-stretch.js 77628cf8bf first comm 3 年 前 css-writing-mode.js 77628cf8bf first comm 3 年 前 css-zoom.js 77628cf8bf first comm 3 年 前 css3-attr.js 77628cf8bf first comm 3 年 前 css3-boxsizing.js 77628cf8bf first comm 3 年 前 css3-colors.js 77628cf8bf first comm 3 年 前 css3-cursors-grab.js 77628cf8bf first comm 3 年 前 css3-cursors-newer.js 77628cf8bf first comm 3 年 前 css3-cursors.js 77628cf8bf first comm 3 年 前 css3-tabsize.js 77628cf8bf first comm 3 年 前 currentcolor.js 77628cf8bf first comm 3 年 前 custom-elements.js 77628cf8bf first comm 3 年 前 custom-elementsv1.js 77628cf8bf first comm 3 年 前 customevent.js 77628cf8bf first comm 3 年 前 datalist.js 77628cf8bf first comm 3 年 前 dataset.js 77628cf8bf first comm 3 年 前 datauri.js 77628cf8bf first comm 3 年 前 date-tolocaledatestring.js 77628cf8bf first comm 3 年 前 declarative-shadow-dom.js 77628cf8bf first comm 3 年 前 decorators.js 77628cf8bf first comm 3 年 前 details.js 77628cf8bf first comm 3 年 前 deviceorientation.js 77628cf8bf first comm 3 年 前 devicepixelratio.js 77628cf8bf first comm 3 年 前 dialog.js 77628cf8bf first comm 3 年 前 dispatchevent.js 77628cf8bf first comm 3 年 前 dnssec.js 77628cf8bf first comm 3 年 前 do-not-track.js 77628cf8bf first comm 3 年 前 document-currentscript.js 77628cf8bf first comm 3 年 前 document-evaluate-xpath.js 77628cf8bf first comm 3 年 前 document-execcommand.js 77628cf8bf first comm 3 年 前 document-policy.js 77628cf8bf first comm 3 年 前 document-scrollingelement.js 77628cf8bf first comm 3 年 前 documenthead.js 77628cf8bf first comm 3 年 前 dom-manip-convenience.js 77628cf8bf first comm 3 年 前 dom-range.js 77628cf8bf first comm 3 年 前 domcontentloaded.js 77628cf8bf first comm 3 年 前 dommatrix.js 77628cf8bf first comm 3 年 前 download.js 77628cf8bf first comm 3 年 前 dragndrop.js 77628cf8bf first comm 3 年 前 element-closest.js 77628cf8bf first comm 3 年 前 element-from-point.js 77628cf8bf first comm 3 年 前 element-scroll-methods.js 77628cf8bf first comm 3 年 前 eme.js 77628cf8bf first comm 3 年 前 eot.js 77628cf8bf first comm 3 年 前 es5.js 77628cf8bf first comm 3 年 前 es6-class.js 77628cf8bf first comm 3 年 前 es6-generators.js 77628cf8bf first comm 3 年 前 es6-module-dynamic-import.js 77628cf8bf first comm 3 年 前 es6-module.js 77628cf8bf first comm 3 年 前 es6-number.js 77628cf8bf first comm 3 年 前 es6-string-includes.js 77628cf8bf first comm 3 年 前 es6.js 77628cf8bf first comm 3 年 前 eventsource.js 77628cf8bf first comm 3 年 前 extended-system-fonts.js 77628cf8bf first comm 3 年 前 feature-policy.js 77628cf8bf first comm 3 年 前 fetch.js 77628cf8bf first comm 3 年 前 fieldset-disabled.js 77628cf8bf first comm 3 年 前 fileapi.js 77628cf8bf first comm 3 年 前 filereader.js 77628cf8bf first comm 3 年 前 filereadersync.js 77628cf8bf first comm 3 年 前 filesystem.js 77628cf8bf first comm 3 年 前 flac.js 77628cf8bf first comm 3 年 前 flexbox-gap.js 77628cf8bf first comm 3 年 前 flexbox.js 77628cf8bf first comm 3 年 前 flow-root.js 77628cf8bf first comm 3 年 前 focusin-focusout-events.js 77628cf8bf first comm 3 年 前 font-family-system-ui.js 77628cf8bf first comm 3 年 前 font-feature.js 77628cf8bf first comm 3 年 前 font-kerning.js 77628cf8bf first comm 3 年 前 font-loading.js 77628cf8bf first comm 3 年 前 font-size-adjust.js 77628cf8bf first comm 3 年 前 font-smooth.js 77628cf8bf first comm 3 年 前 font-unicode-range.js 77628cf8bf first comm 3 年 前 font-variant-alternates.js 77628cf8bf first comm 3 年 前 font-variant-numeric.js 77628cf8bf first comm 3 年 前 fontface.js 77628cf8bf first comm 3 年 前 form-attribute.js 77628cf8bf first comm 3 年 前 form-submit-attributes.js 77628cf8bf first comm 3 年 前 form-validation.js 77628cf8bf first comm 3 年 前 forms.js 77628cf8bf first comm 3 年 前 fullscreen.js 77628cf8bf first comm 3 年 前 gamepad.js 77628cf8bf first comm 3 年 前 geolocation.js 77628cf8bf first comm 3 年 前 getboundingclientrect.js 77628cf8bf first comm 3 年 前 getcomputedstyle.js 77628cf8bf first comm 3 年 前 getelementsbyclassname.js 77628cf8bf first comm 3 年 前 getrandomvalues.js 77628cf8bf first comm 3 年 前 gyroscope.js 77628cf8bf first comm 3 年 前 hardwareconcurrency.js 77628cf8bf first comm 3 年 前 hashchange.js 77628cf8bf first comm 3 年 前 heif.js 77628cf8bf first comm 3 年 前 hevc.js 77628cf8bf first comm 3 年 前 hidden.js 77628cf8bf first comm 3 年 前 high-resolution-time.js 77628cf8bf first comm 3 年 前 history.js 77628cf8bf first comm 3 年 前 html-media-capture.js 77628cf8bf first comm 3 年 前 html5semantic.js 77628cf8bf first comm 3 年 前 http-live-streaming.js 77628cf8bf first comm 3 年 前 http2.js 77628cf8bf first comm 3 年 前 http3.js 77628cf8bf first comm 3 年 前 iframe-sandbox.js 77628cf8bf first comm 3 年 前 iframe-seamless.js 77628cf8bf first comm 3 年 前 iframe-srcdoc.js 77628cf8bf first comm 3 年 前 imagecapture.js 77628cf8bf first comm 3 年 前 ime.js 77628cf8bf first comm 3 年 前 img-naturalwidth-naturalheight.js 77628cf8bf first comm 3 年 前 import-maps.js 77628cf8bf first comm 3 年 前 imports.js 77628cf8bf first comm 3 年 前 indeterminate-checkbox.js 77628cf8bf first comm 3 年 前 indexeddb.js 77628cf8bf first comm 3 年 前 indexeddb2.js 77628cf8bf first comm 3 年 前 inline-block.js 77628cf8bf first comm 3 年 前 innertext.js 77628cf8bf first comm 3 年 前 input-autocomplete-onoff.js 77628cf8bf first comm 3 年 前 input-color.js 77628cf8bf first comm 3 年 前 input-datetime.js 77628cf8bf first comm 3 年 前 input-email-tel-url.js 77628cf8bf first comm 3 年 前 input-event.js 77628cf8bf first comm 3 年 前 input-file-accept.js 77628cf8bf first comm 3 年 前 input-file-directory.js 77628cf8bf first comm 3 年 前 input-file-multiple.js 77628cf8bf first comm 3 年 前 input-inputmode.js 77628cf8bf first comm 3 年 前 input-minlength.js 77628cf8bf first comm 3 年 前 input-number.js 77628cf8bf first comm 3 年 前 input-pattern.js 77628cf8bf first comm 3 年 前 input-placeholder.js 77628cf8bf first comm 3 年 前 input-range.js 77628cf8bf first comm 3 年 前 input-search.js 77628cf8bf first comm 3 年 前 input-selection.js 77628cf8bf first comm 3 年 前 insert-adjacent.js 77628cf8bf first comm 3 年 前 insertadjacenthtml.js 77628cf8bf first comm 3 年 前 internationalization.js 77628cf8bf first comm 3 年 前 intersectionobserver-v2.js 77628cf8bf first comm 3 年 前 intersectionobserver.js 77628cf8bf first comm 3 年 前 intl-pluralrules.js 77628cf8bf first comm 3 年 前 intrinsic-width.js 77628cf8bf first comm 3 年 前 jpeg2000.js 77628cf8bf first comm 3 年 前 jpegxl.js 77628cf8bf first comm 3 年 前 jpegxr.js 77628cf8bf first comm 3 年 前 js-regexp-lookbehind.js 77628cf8bf first comm 3 年 前 json.js 77628cf8bf first comm 3 年 前 justify-content-space-evenly.js 77628cf8bf first comm 3 年 前 kerning-pairs-ligatures.js 77628cf8bf first comm 3 年 前 keyboardevent-charcode.js 77628cf8bf first comm 3 年 前 keyboardevent-code.js 77628cf8bf first comm 3 年 前 keyboardevent-getmodifierstate.js 77628cf8bf first comm 3 年 前 keyboardevent-key.js 77628cf8bf first comm 3 年 前 keyboardevent-location.js 77628cf8bf first comm 3 年 前 keyboardevent-which.js 77628cf8bf first comm 3 年 前 lazyload.js 77628cf8bf first comm 3 年 前 let.js 77628cf8bf first comm 3 年 前 link-icon-png.js 77628cf8bf first comm 3 年 前 link-icon-svg.js 77628cf8bf first comm 3 年 前 link-rel-dns-prefetch.js 77628cf8bf first comm 3 年 前 link-rel-modulepreload.js 77628cf8bf first comm 3 年 前 link-rel-preconnect.js 77628cf8bf first comm 3 年 前 link-rel-prefetch.js 77628cf8bf first comm 3 年 前 link-rel-preload.js 77628cf8bf first comm 3 年 前 link-rel-prerender.js 77628cf8bf first comm 3 年 前 loading-lazy-attr.js 77628cf8bf first comm 3 年 前 localecompare.js 77628cf8bf first comm 3 年 前 magnetometer.js 77628cf8bf first comm 3 年 前 matchesselector.js 77628cf8bf first comm 3 年 前 matchmedia.js 77628cf8bf first comm 3 年 前 mathml.js 77628cf8bf first comm 3 年 前 maxlength.js 77628cf8bf first comm 3 年 前 mdn-css-unicode-bidi-isolate-override.js 77628cf8bf first comm 3 年 前 mdn-css-unicode-bidi-isolate.js 77628cf8bf first comm 3 年 前 mdn-css-unicode-bidi-plaintext.js 77628cf8bf first comm 3 年 前 mdn-text-decoration-color.js 77628cf8bf first comm 3 年 前 mdn-text-decoration-line.js 77628cf8bf first comm 3 年 前 mdn-text-decoration-shorthand.js 77628cf8bf first comm 3 年 前 mdn-text-decoration-style.js 77628cf8bf first comm 3 年 前 media-fragments.js 77628cf8bf first comm 3 年 前 mediacapture-fromelement.js 77628cf8bf first comm 3 年 前 mediarecorder.js 77628cf8bf first comm 3 年 前 mediasource.js 77628cf8bf first comm 3 年 前 menu.js 77628cf8bf first comm 3 年 前 meta-theme-color.js 77628cf8bf first comm 3 年 前 meter.js 77628cf8bf first comm 3 年 前 midi.js 77628cf8bf first comm 3 年 前 minmaxwh.js 77628cf8bf first comm 3 年 前 mp3.js 77628cf8bf first comm 3 年 前 mpeg-dash.js 77628cf8bf first comm 3 年 前 mpeg4.js 77628cf8bf first comm 3 年 前 multibackgrounds.js 77628cf8bf first comm 3 年 前 multicolumn.js 77628cf8bf first comm 3 年 前 mutation-events.js 77628cf8bf first comm 3 年 前 mutationobserver.js 77628cf8bf first comm 3 年 前 namevalue-storage.js 77628cf8bf first comm 3 年 前 native-filesystem-api.js 77628cf8bf first comm 3 年 前 nav-timing.js 77628cf8bf first comm 3 年 前 netinfo.js 77628cf8bf first comm 3 年 前 notifications.js 77628cf8bf first comm 3 年 前 object-entries.js 77628cf8bf first comm 3 年 前 object-fit.js 77628cf8bf first comm 3 年 前 object-observe.js 77628cf8bf first comm 3 年 前 object-values.js 77628cf8bf first comm 3 年 前 objectrtc.js 77628cf8bf first comm 3 年 前 offline-apps.js 77628cf8bf first comm 3 年 前 offscreencanvas.js 77628cf8bf first comm 3 年 前 ogg-vorbis.js 77628cf8bf first comm 3 年 前 ogv.js 77628cf8bf first comm 3 年 前 ol-reversed.js 77628cf8bf first comm 3 年 前 once-event-listener.js 77628cf8bf first comm 3 年 前 online-status.js 77628cf8bf first comm 3 年 前 opus.js 77628cf8bf first comm 3 年 前 orientation-sensor.js 77628cf8bf first comm 3 年 前 outline.js 77628cf8bf first comm 3 年 前 pad-start-end.js 77628cf8bf first comm 3 年 前 page-transition-events.js 77628cf8bf first comm 3 年 前 pagevisibility.js 77628cf8bf first comm 3 年 前 passive-event-listener.js 77628cf8bf first comm 3 年 前 passwordrules.js 77628cf8bf first comm 3 年 前 path2d.js 77628cf8bf first comm 3 年 前 payment-request.js 77628cf8bf first comm 3 年 前 pdf-viewer.js 77628cf8bf first comm 3 年 前 permissions-api.js 77628cf8bf first comm 3 年 前 permissions-policy.js 77628cf8bf first comm 3 年 前 picture-in-picture.js 77628cf8bf first comm 3 年 前 picture.js 77628cf8bf first comm 3 年 前 ping.js 77628cf8bf first comm 3 年 前 png-alpha.js 77628cf8bf first comm 3 年 前 pointer-events.js 77628cf8bf first comm 3 年 前 pointer.js 77628cf8bf first comm 3 年 前 pointerlock.js 77628cf8bf first comm 3 年 前 portals.js 77628cf8bf first comm 3 年 前 prefers-color-scheme.js 77628cf8bf first comm 3 年 前 prefers-reduced-motion.js 77628cf8bf first comm 3 年 前 progress.js 77628cf8bf first comm 3 年 前 promise-finally.js 77628cf8bf first comm 3 年 前 promises.js 77628cf8bf first comm 3 年 前 proximity.js 77628cf8bf first comm 3 年 前 proxy.js 77628cf8bf first comm 3 年 前 publickeypinning.js 77628cf8bf first comm 3 年 前 push-api.js 77628cf8bf first comm 3 年 前 queryselector.js 77628cf8bf first comm 3 年 前 readonly-attr.js 77628cf8bf first comm 3 年 前 referrer-policy.js 77628cf8bf first comm 3 年 前 registerprotocolhandler.js 77628cf8bf first comm 3 年 前 rel-noopener.js 77628cf8bf first comm 3 年 前 rel-noreferrer.js 77628cf8bf first comm 3 年 前 rellist.js 77628cf8bf first comm 3 年 前 rem.js 77628cf8bf first comm 3 年 前 requestanimationframe.js 77628cf8bf first comm 3 年 前 requestidlecallback.js 77628cf8bf first comm 3 年 前 resizeobserver.js 77628cf8bf first comm 3 年 前 resource-timing.js 77628cf8bf first comm 3 年 前 rest-parameters.js 77628cf8bf first comm 3 年 前 rtcpeerconnection.js 77628cf8bf first comm 3 年 前 ruby.js 77628cf8bf first comm 3 年 前 run-in.js 77628cf8bf first comm 3 年 前 same-site-cookie-attribute.js 77628cf8bf first comm 3 年 前 screen-orientation.js 77628cf8bf first comm 3 年 前 script-async.js 77628cf8bf first comm 3 年 前 script-defer.js 77628cf8bf first comm 3 年 前 scrollintoview.js 77628cf8bf first comm 3 年 前 scrollintoviewifneeded.js 77628cf8bf first comm 3 年 前 sdch.js 77628cf8bf first comm 3 年 前 selection-api.js 77628cf8bf first comm 3 年 前 server-timing.js 77628cf8bf first comm 3 年 前 serviceworkers.js 77628cf8bf first comm 3 年 前 setimmediate.js 77628cf8bf first comm 3 年 前 shadowdom.js 77628cf8bf first comm 3 年 前 shadowdomv1.js 77628cf8bf first comm 3 年 前 sharedarraybuffer.js 77628cf8bf first comm 3 年 前 sharedworkers.js 77628cf8bf first comm 3 年 前 sni.js 77628cf8bf first comm 3 年 前 spdy.js 77628cf8bf first comm 3 年 前 speech-recognition.js 77628cf8bf first comm 3 年 前 speech-synthesis.js 77628cf8bf first comm 3 年 前 spellcheck-attribute.js 77628cf8bf first comm 3 年 前 sql-storage.js 77628cf8bf first comm 3 年 前 srcset.js 77628cf8bf first comm 3 年 前 stream.js 77628cf8bf first comm 3 年 前 streams.js 77628cf8bf first comm 3 年 前 stricttransportsecurity.js 77628cf8bf first comm 3 年 前 style-scoped.js 77628cf8bf first comm 3 年 前 subresource-bundling.js 77628cf8bf first comm 3 年 前 subresource-integrity.js 77628cf8bf first comm 3 年 前 svg-css.js 77628cf8bf first comm 3 年 前 svg-filters.js 77628cf8bf first comm 3 年 前 svg-fonts.js 77628cf8bf first comm 3 年 前 svg-fragment.js 77628cf8bf first comm 3 年 前 svg-html.js 77628cf8bf first comm 3 年 前 svg-html5.js 77628cf8bf first comm 3 年 前 svg-img.js 77628cf8bf first comm 3 年 前 svg-smil.js 77628cf8bf first comm 3 年 前 svg.js 77628cf8bf first comm 3 年 前 sxg.js 77628cf8bf first comm 3 年 前 tabindex-attr.js 77628cf8bf first comm 3 年 前 template-literals.js 77628cf8bf first comm 3 年 前 template.js 77628cf8bf first comm 3 年 前 temporal.js 77628cf8bf first comm 3 年 前 testfeat.js 77628cf8bf first comm 3 年 前 text-decoration.js 77628cf8bf first comm 3 年 前 text-emphasis.js 77628cf8bf first comm 3 年 前 text-overflow.js 77628cf8bf first comm 3 年 前 text-size-adjust.js 77628cf8bf first comm 3 年 前 text-stroke.js 77628cf8bf first comm 3 年 前 textcontent.js 77628cf8bf first comm 3 年 前 textencoder.js 77628cf8bf first comm 3 年 前 tls1-1.js 77628cf8bf first comm 3 年 前 tls1-2.js 77628cf8bf first comm 3 年 前 tls1-3.js 77628cf8bf first comm 3 年 前 touch.js 77628cf8bf first comm 3 年 前 transforms2d.js 77628cf8bf first comm 3 年 前 transforms3d.js 77628cf8bf first comm 3 年 前 trusted-types.js 77628cf8bf first comm 3 年 前 ttf.js 77628cf8bf first comm 3 年 前 typedarrays.js 77628cf8bf first comm 3 年 前 u2f.js 77628cf8bf first comm 3 年 前 unhandledrejection.js 77628cf8bf first comm 3 年 前 upgradeinsecurerequests.js 77628cf8bf first comm 3 年 前 url-scroll-to-text-fragment.js 77628cf8bf first comm 3 年 前 url.js 77628cf8bf first comm 3 年 前 urlsearchparams.js 77628cf8bf first comm 3 年 前 use-strict.js 77628cf8bf first comm 3 年 前 user-select-none.js 77628cf8bf first comm 3 年 前 user-timing.js 77628cf8bf first comm 3 年 前 variable-fonts.js 77628cf8bf first comm 3 年 前 vector-effect.js 77628cf8bf first comm 3 年 前 vibration.js 77628cf8bf first comm 3 年 前 video.js 77628cf8bf first comm 3 年 前 videotracks.js 77628cf8bf first comm 3 年 前 viewport-unit-variants.js 77628cf8bf first comm 3 年 前 viewport-units.js 77628cf8bf first comm 3 年 前 wai-aria.js 77628cf8bf first comm 3 年 前 wake-lock.js 77628cf8bf first comm 3 年 前 wasm.js 77628cf8bf first comm 3 年 前 wav.js 77628cf8bf first comm 3 年 前 wbr-element.js 77628cf8bf first comm 3 年 前 web-animation.js 77628cf8bf first comm 3 年 前 web-app-manifest.js 77628cf8bf first comm 3 年 前 web-bluetooth.js 77628cf8bf first comm 3 年 前 web-serial.js 77628cf8bf first comm 3 年 前 web-share.js 77628cf8bf first comm 3 年 前 webauthn.js 77628cf8bf first comm 3 年 前 webcodecs.js 77628cf8bf first comm 3 年 前 webgl.js 77628cf8bf first comm 3 年 前 webgl2.js 77628cf8bf first comm 3 年 前 webgpu.js 77628cf8bf first comm 3 年 前 webhid.js 77628cf8bf first comm 3 年 前 webkit-user-drag.js 77628cf8bf first comm 3 年 前 webm.js 77628cf8bf first comm 3 年 前 webnfc.js 77628cf8bf first comm 3 年 前 webp.js 77628cf8bf first comm 3 年 前 websockets.js 77628cf8bf first comm 3 年 前 webtransport.js 77628cf8bf first comm 3 年 前 webusb.js 77628cf8bf first comm 3 年 前 webvr.js 77628cf8bf first comm 3 年 前 webvtt.js 77628cf8bf first comm 3 年 前 webworkers.js 77628cf8bf first comm 3 年 前 webxr.js 77628cf8bf first comm 3 年 前 will-change.js 77628cf8bf first comm 3 年 前 woff.js 77628cf8bf first comm 3 年 前 woff2.js 77628cf8bf first comm 3 年 前 word-break.js 77628cf8bf first comm 3 年 前 wordwrap.js 77628cf8bf first comm 3 年 前 x-doc-messaging.js 77628cf8bf first comm 3 年 前 x-frame-options.js 77628cf8bf first comm 3 年 前 xhr2.js 77628cf8bf first comm 3 年 前 xhtml.js 77628cf8bf first comm 3 年 前 xhtmlsmil.js 77628cf8bf first comm 3 年 前 xml-serializer.js 77628cf8bf first comm 3 年 前 tum/whitesports - Gogs: Simplico Git Service

Nav apraksta

class.wpcom-json-api-get-autosave-v1-1-endpoint.php 2.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
  2. /**
  3. * WPCOM_JSON_API_Get_Autosave_v1_1_Endpoint
  4. *
  5. * @package automattic/jetpack
  6. */
  7. new WPCOM_JSON_API_Get_Autosave_v1_1_Endpoint(
  8. array(
  9. 'description' => 'Get the most recent autosave for a post.',
  10. 'group' => '__do_not_document',
  11. 'stat' => 'posts:autosave',
  12. 'min_version' => '1.1',
  13. 'method' => 'GET',
  14. 'path' => '/sites/%s/posts/%d/autosave',
  15. 'path_labels' => array(
  16. '$site' => '(int|string) Site ID or domain',
  17. '$post_ID' => '(int) The post ID',
  18. ),
  19. 'response_format' => array(
  20. 'ID' => '(int) autodraft post ID',
  21. 'post_ID' => '(int) post ID',
  22. 'author_ID' => '(int) author ID',
  23. 'title' => '(HTML) The post title.',
  24. 'content' => '(HTML) The post content.',
  25. 'excerpt' => '(HTML) The post excerpt.',
  26. 'preview_URL' => '(string) preview URL for the post',
  27. 'modified' => '(ISO 8601 datetime) modified time',
  28. ),
  29. 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/posts/1/autosave',
  30. )
  31. );
  32. // phpcs:disable PEAR.NamingConventions.ValidClassName.Invalid
  33. /**
  34. * Class WPCOM_JSON_API_Get_Autosave_v1_1_Endpoint
  35. */
  36. class WPCOM_JSON_API_Get_Autosave_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_Endpoint {
  37. /**
  38. * Get Autosave callback
  39. * /sites/%s/posts/%d/autosave -> $blog_id, $post_id
  40. *
  41. * @param string $path Path.
  42. * @param int $blog_id Blog ID.
  43. * @param int $post_id Post ID.
  44. *
  45. * @return array|int|mixed|WP_Error
  46. */
  47. public function callback( $path = '', $blog_id = 0, $post_id = 0 ) {
  48. $blog_id = $this->api->switch_to_blog_and_validate_user( $this->api->get_blog_id( $blog_id ) );
  49. if ( is_wp_error( $blog_id ) ) {
  50. return $blog_id;
  51. }
  52. $post = get_post( $post_id );
  53. if ( ! $post || is_wp_error( $post ) ) {
  54. return new WP_Error( 'unknown_post', 'Unknown post', 404 );
  55. }
  56. if ( ! current_user_can( 'edit_post', $post->ID ) ) {
  57. return new WP_Error( 'unauthorized', 'User cannot edit post', 403 );
  58. }
  59. $autosave = wp_get_post_autosave( $post->ID );
  60. if ( $autosave ) {
  61. $preview_url = add_query_arg( 'preview', 'true', get_permalink( $post->ID ) );
  62. $nonce = wp_create_nonce( 'post_preview_' . $post->ID );
  63. $preview_url = add_query_arg(
  64. array(
  65. 'preview_id' => $post->ID,
  66. 'preview_nonce' => $nonce,
  67. ),
  68. $preview_url
  69. );
  70. return array(
  71. 'ID' => $autosave->ID,
  72. 'author_ID' => $autosave->post_author,
  73. 'post_ID' => $autosave->post_parent,
  74. 'title' => $autosave->post_title,
  75. 'content' => $autosave->post_content,
  76. 'excerpt' => $autosave->post_excerpt,
  77. 'preview_URL' => $preview_url,
  78. 'modified' => $this->format_date( $autosave->post_modified_gmt, $autosave->post_modified ),
  79. );
  80. } else {
  81. return new WP_Error( 'not_found', 'No autosaves exist for this post', 404 );
  82. }
  83. }
  84. }