=> array( 'force' => array( 'type' => 'boolean', 'default' => false, 'description' => __( 'Required to be true, as revisions do not support trashing.' ), ), ), ), 'schema' => array( $this, 'get_public_item_schema' ), ) ); } /** * Gets the parent post, if the template ID is valid. * * @since 6.4.0 * * @param string $parent_template_id Supplied ID. * @return WP_Post|WP_Error Post object if ID is valid, WP_Error otherwise. */ protected function get_parent( $parent_template_id ) { $template = get_block_template( $parent_template_id, $this->parent_post_type ); if ( ! $template ) { return new WP_Error( 'rest_post_invalid_parent', __( 'Invalid template parent ID.' ), array( 'status' => 404 ) ); } return get_post( $template->wp_id ); } /** * Prepares the item for the REST response. * * @since 6.4.0 * * @param WP_Post $item Post revision object. * @param WP_REST_Request $request Request object. * @return WP_REST_Response Response object. */ public function prepare_item_for_response( $item, $request ) { $template = _build_block_template_result_from_post( $item ); $response = $this->parent_controller->prepare_item_for_response( $template, $request ); $fields = $this->get_fields_for_response( $request ); $data = $response->get_data(); if ( in_array( 'parent', $fields, true ) ) { $data['parent'] = (int) $item->post_parent; } $context = ! empty( $request['context'] ) ? $request['context'] : 'view'; $data = $this->filter_response_by_context( $data, $context ); // Wrap the data in a response object. $response = new WP_REST_Response( $data ); if ( rest_is_field_included( '_links', $fields ) || rest_is_field_included( '_embedded', $fields ) ) { $links = $this->prepare_links( $template ); $response->add_links( $links ); } return $response; } /** * Checks if a given request has access to delete a revision. * * @since 6.4.0 * * @param WP_REST_Request $request Full details about the request. * @return true|WP_Error True if the request has access to delete the item, WP_Error object otherwise. */ public function delete_item_permissions_check( $request ) { $parent = $this->get_parent( $request['parent'] ); if ( is_wp_error( $parent ) ) { return $parent; } if ( ! current_user_can( 'delete_post', $parent->ID ) ) { return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete revisions of this post.' ), array( 'status' => rest_authorization_required_code() ) ); } $revision = $this->get_revision( $request['id'] ); if ( is_wp_error( $revision ) ) { return $revision; } if ( ! current_user_can( 'edit_theme_options' ) ) { return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete this revision.' ), array( 'status' => rest_authorization_required_code() ) ); } return true; } /** * Prepares links for the request. * * @since 6.4.0 * * @param WP_Block_Template $template Template. * @return array Links for the given post. */ protected function prepare_links( $template ) { $links = array( 'self' => array( 'href' => rest_url( sprintf( '/%s/%s/%s/%s/%d', $this->namespace, $this->parent_base, $template->id, $this->rest_base, $template->wp_id ) ), ), 'parent' => array( 'href' => rest_url( sprintf( '/%s/%s/%s', $this->namespace, $this->parent_base, $template->id ) ), ), ); return $links; } /** * Retrieves the item's schema, conforming to JSON Schema. * * @since 6.4.0 * * @return array Item schema data. */ public function get_item_schema() { if ( $this->schema ) { return $this->add_additional_fields_schema( $this->schema ); } $schema = $this->parent_controller->get_item_schema(); $schema['properties']['parent'] = array( 'description' => __( 'The ID for the parent of the revision.' ), 'type' => 'integer', 'context' => array( 'view', 'edit', 'embed' ), ); $this->schema = $schema; return $this->add_additional_fields_schema( $this->schema ); } }
Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php:1) in /htdocs/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php:1) in /htdocs/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php:1) in /htdocs/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php:1) in /htdocs/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php:1) in /htdocs/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php:1) in /htdocs/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php:1) in /htdocs/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php:1) in /htdocs/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":2866,"date":"2023-07-25T08:35:58","date_gmt":"2023-07-25T06:35:58","guid":{"rendered":"https:\/\/psstore.pro\/?post_type=product&p=2866"},"modified":"2023-09-06T06:16:56","modified_gmt":"2023-09-06T04:16:56","slug":"montre-w9-noir-avec-3-bracelets","status":"publish","type":"product","link":"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/","title":{"rendered":"Montre W9 Noir avec 3 Bracelets"},"content":{"rendered":"","protected":false},"excerpt":{"rendered":"","protected":false},"featured_media":2955,"template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}}},"product_cat":[45],"product_tag":[],"class_list":{"0":"post-2866","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-montre-et-objet-connectes","7":"desktop-align-left","8":"tablet-align-left","9":"mobile-align-left","10":"ast-product-gallery-layout-horizontal-slider","11":"ast-magnify-disabled","13":"first","14":"outofstock","15":"sold-individually","16":"shipping-taxable","17":"purchasable","18":"product-type-simple"},"yoast_head":"\nMontre W9 Noir avec 3 Bracelets - PS STORE PRO LUBUMBASHI<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Montre W9 Noir avec 3 Bracelets - PS STORE PRO LUBUMBASHI\" \/>\n<meta property=\"og:url\" content=\"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/\" \/>\n<meta property=\"og:site_name\" content=\"PS STORE PRO LUBUMBASHI\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-06T04:16:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/psstore.pro\/wp-content\/uploads\/2023\/07\/Untitled-3-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"1000\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/\",\"url\":\"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/\",\"name\":\"Montre W9 Noir avec 3 Bracelets - PS STORE PRO LUBUMBASHI\",\"isPartOf\":{\"@id\":\"https:\/\/psstore.pro\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/psstore.pro\/wp-content\/uploads\/2023\/07\/Untitled-3-1.jpg\",\"datePublished\":\"2023-07-25T06:35:58+00:00\",\"dateModified\":\"2023-09-06T04:16:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/#primaryimage\",\"url\":\"https:\/\/psstore.pro\/wp-content\/uploads\/2023\/07\/Untitled-3-1.jpg\",\"contentUrl\":\"https:\/\/psstore.pro\/wp-content\/uploads\/2023\/07\/Untitled-3-1.jpg\",\"width\":1000,\"height\":1000},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Boutique\",\"item\":\"https:\/\/psstore.pro\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Montre W9 Noir avec 3 Bracelets\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/psstore.pro\/#website\",\"url\":\"https:\/\/psstore.pro\/\",\"name\":\"PS STORE PRO LUBUMBASHI\",\"description\":\"Achat en ligne \u00e0 Lubumbashi\",\"publisher\":{\"@id\":\"https:\/\/psstore.pro\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/psstore.pro\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/psstore.pro\/#organization\",\"name\":\"PS STORE PRO LUBUMBASHI\",\"url\":\"https:\/\/psstore.pro\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/psstore.pro\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/psstore.pro\/wp-content\/uploads\/2023\/07\/cropped-ps-store-gold-logo-2-1-e1688434773527.png\",\"contentUrl\":\"https:\/\/psstore.pro\/wp-content\/uploads\/2023\/07\/cropped-ps-store-gold-logo-2-1-e1688434773527.png\",\"width\":359,\"height\":119,\"caption\":\"PS STORE PRO LUBUMBASHI\"},\"image\":{\"@id\":\"https:\/\/psstore.pro\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Montre W9 Noir avec 3 Bracelets - PS STORE PRO LUBUMBASHI","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/","og_locale":"fr_FR","og_type":"article","og_title":"Montre W9 Noir avec 3 Bracelets - PS STORE PRO LUBUMBASHI","og_url":"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/","og_site_name":"PS STORE PRO LUBUMBASHI","article_modified_time":"2023-09-06T04:16:56+00:00","og_image":[{"width":1000,"height":1000,"url":"https:\/\/psstore.pro\/wp-content\/uploads\/2023\/07\/Untitled-3-1.jpg","type":"image\/jpeg"}],"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/","url":"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/","name":"Montre W9 Noir avec 3 Bracelets - PS STORE PRO LUBUMBASHI","isPartOf":{"@id":"https:\/\/psstore.pro\/#website"},"primaryImageOfPage":{"@id":"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/#primaryimage"},"image":{"@id":"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/#primaryimage"},"thumbnailUrl":"https:\/\/psstore.pro\/wp-content\/uploads\/2023\/07\/Untitled-3-1.jpg","datePublished":"2023-07-25T06:35:58+00:00","dateModified":"2023-09-06T04:16:56+00:00","breadcrumb":{"@id":"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/#primaryimage","url":"https:\/\/psstore.pro\/wp-content\/uploads\/2023\/07\/Untitled-3-1.jpg","contentUrl":"https:\/\/psstore.pro\/wp-content\/uploads\/2023\/07\/Untitled-3-1.jpg","width":1000,"height":1000},{"@type":"BreadcrumbList","@id":"https:\/\/psstore.pro\/produit\/montre-w9-noir-avec-3-bracelets\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Boutique","item":"https:\/\/psstore.pro\/"},{"@type":"ListItem","position":2,"name":"Montre W9 Noir avec 3 Bracelets"}]},{"@type":"WebSite","@id":"https:\/\/psstore.pro\/#website","url":"https:\/\/psstore.pro\/","name":"PS STORE PRO LUBUMBASHI","description":"Achat en ligne \u00e0 Lubumbashi","publisher":{"@id":"https:\/\/psstore.pro\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/psstore.pro\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/psstore.pro\/#organization","name":"PS STORE PRO LUBUMBASHI","url":"https:\/\/psstore.pro\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/psstore.pro\/#\/schema\/logo\/image\/","url":"https:\/\/psstore.pro\/wp-content\/uploads\/2023\/07\/cropped-ps-store-gold-logo-2-1-e1688434773527.png","contentUrl":"https:\/\/psstore.pro\/wp-content\/uploads\/2023\/07\/cropped-ps-store-gold-logo-2-1-e1688434773527.png","width":359,"height":119,"caption":"PS STORE PRO LUBUMBASHI"},"image":{"@id":"https:\/\/psstore.pro\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/psstore.pro\/wp-json\/wp\/v2\/product\/2866"}],"collection":[{"href":"https:\/\/psstore.pro\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/psstore.pro\/wp-json\/wp\/v2\/types\/product"}],"version-history":[{"count":1,"href":"https:\/\/psstore.pro\/wp-json\/wp\/v2\/product\/2866\/revisions"}],"predecessor-version":[{"id":2873,"href":"https:\/\/psstore.pro\/wp-json\/wp\/v2\/product\/2866\/revisions\/2873"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/psstore.pro\/wp-json\/wp\/v2\/media\/2955"}],"wp:attachment":[{"href":"https:\/\/psstore.pro\/wp-json\/wp\/v2\/media?parent=2866"}],"wp:term":[{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/psstore.pro\/wp-json\/wp\/v2\/product_cat?post=2866"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/psstore.pro\/wp-json\/wp\/v2\/product_tag?post=2866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}