on_id; } // Attached any passed meta values that have revisions enabled. if ( ! empty( $meta ) ) { foreach ( $revisioned_meta_keys as $meta_key ) { if ( isset( $meta[ $meta_key ] ) ) { update_metadata( 'post', $revision_id, $meta_key, wp_slash( $meta[ $meta_key ] ) ); } } } return $revision_id; } /** * Prepares the revision for the REST response. * * @since 5.0.0 * @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support. * * @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 ) { // Restores the more descriptive, specific name for use within this method. $post = $item; $response = $this->revisions_controller->prepare_item_for_response( $post, $request ); $fields = $this->get_fields_for_response( $request ); if ( in_array( 'preview_link', $fields, true ) ) { $parent_id = wp_is_post_autosave( $post ); $preview_post_id = false === $parent_id ? $post->ID : $parent_id; $preview_query_args = array(); if ( false !== $parent_id ) { $preview_query_args['preview_id'] = $parent_id; $preview_query_args['preview_nonce'] = wp_create_nonce( 'post_preview_' . $parent_id ); } $response->data['preview_link'] = get_preview_post_link( $preview_post_id, $preview_query_args ); } $context = ! empty( $request['context'] ) ? $request['context'] : 'view'; $response->data = $this->add_additional_fields_to_object( $response->data, $request ); $response->data = $this->filter_response_by_context( $response->data, $context ); /** * Filters a revision returned from the REST API. * * Allows modification of the revision right before it is returned. * * @since 5.0.0 * * @param WP_REST_Response $response The response object. * @param WP_Post $post The original revision object. * @param WP_REST_Request $request Request used to generate the response. */ return apply_filters( 'rest_prepare_autosave', $response, $post, $request ); } /** * Retrieves the query params for the autosaves collection. * * @since 5.0.0 * * @return array Collection parameters. */ public function get_collection_params() { return array( 'context' => $this->get_context_param( array( 'default' => 'view' ) ), ); } }
Fatal error: Uncaught Error: Class 'WP_REST_Autosaves_Controller' not found in /home/kordian1/domains/ostrabrama.pl/public_html/wp-includes/rest-api/endpoints/class-wp-rest-template-autosaves-controller.php:17 Stack trace: #0 /home/kordian1/domains/ostrabrama.pl/public_html/wp-settings.php(295): require() #1 /home/kordian1/domains/ostrabrama.pl/public_html/wp-config.php(81): require_once('/home/kordian1/...') #2 /home/kordian1/domains/ostrabrama.pl/public_html/wp-load.php(50): require_once('/home/kordian1/...') #3 /home/kordian1/domains/ostrabrama.pl/public_html/wp-blog-header.php(13): require_once('/home/kordian1/...') #4 /home/kordian1/domains/ostrabrama.pl/public_html/index.php(17): require('/home/kordian1/...') #5 {main} thrown in /home/kordian1/domains/ostrabrama.pl/public_html/wp-includes/rest-api/endpoints/class-wp-rest-template-autosaves-controller.php on line 17

Fatal error: Uncaught Error: Call to a member function set() on null in /home/kordian1/domains/ostrabrama.pl/public_html/wp-includes/l10n.php:856 Stack trace: #0 /home/kordian1/domains/ostrabrama.pl/public_html/wp-includes/l10n.php(959): load_textdomain('default', '/home/kordian1/...', 'pl_PL') #1 /home/kordian1/domains/ostrabrama.pl/public_html/wp-includes/class-wp-fatal-error-handler.php(49): load_default_textdomain() #2 [internal function]: WP_Fatal_Error_Handler->handle() #3 {main} thrown in /home/kordian1/domains/ostrabrama.pl/public_html/wp-includes/l10n.php on line 856