object on failure. */ public function get_item( $request ) { $slug = $request->get_param( 'slug' ); $collection = WP_Font_Library::get_instance()->get_font_collection( $slug ); if ( ! $collection ) { return new WP_Error( 'rest_font_collection_not_found', __( 'Font collection not found.' ), array( 'status' => 404 ) ); } return $this->prepare_item_for_response( $collection, $request ); } /** * Prepare a single collection output for response. * * @since 6.5.0 * * @param WP_Font_Collection $item Font collection object. * @param WP_REST_Request $request Request object. * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. */ public function prepare_item_for_response( $item, $request ) { $fields = $this->get_fields_for_response( $request ); $data = array(); if ( rest_is_field_included( 'slug', $fields ) ) { $data['slug'] = $item->slug; } // If any data fields are requested, get the collection data. $data_fields = array( 'name', 'description', 'font_families', 'categories' ); if ( ! empty( array_intersect( $fields, $data_fields ) ) ) { $collection_data = $item->get_data(); if ( is_wp_error( $collection_data ) ) { $collection_data->add_data( array( 'status' => 500 ) ); return $collection_data; } /** * Don't prepare the response body for HEAD requests. * Can't exit at the beginning of the method due to the potential need to return a WP_Error object. */ if ( $request->is_method( 'HEAD' ) ) { /** This filter is documented in wp-includes/rest-api/endpoints/class-wp-rest-font-collections-controller.php */ return apply_filters( 'rest_prepare_font_collection', new WP_REST_Response( array() ), $item, $request ); } foreach ( $data_fields as $field ) { if ( rest_is_field_included( $field, $fields ) ) { $data[ $field ] = $collection_data[ $field ]; } } } /** * Don't prepare the response body for HEAD requests. * Can't exit at the beginning of the method due to the potential need to return a WP_Error object. */ if ( $request->is_method( 'HEAD' ) ) { /** This filter is documented in wp-includes/rest-api/endpoints/class-wp-rest-font-collections-controller.php */ return apply_filters( 'rest_prepare_font_collection', new WP_REST_Response( array() ), $item, $request ); } $response = rest_ensure_response( $data ); if ( rest_is_field_included( '_links', $fields ) ) { $links = $this->prepare_links( $item ); $response->add_links( $links ); } $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 the font collection data for a REST API response. * * @since 6.5.0 * * @param WP_REST_Response $response The response object. * @param WP_Font_Collection $item The font collection object. * @param WP_REST_Request $request Request used to generate the response. */ return apply_filters( 'rest_prepare_font_collection', $response, $item, $request ); } /** * Retrieves the font collection's schema, conforming to JSON Schema. * * @since 6.5.0 * * @return array Item schema data. */ public function get_item_schema() { if ( $this->schema ) { return $this->add_additional_fields_schema( $this->schema ); } $schema = array( '$schema' => 'http://json-schema.org/draft-04/schema#', 'title' => 'font-collection', 'type' => 'object', 'properties' => array( 'slug' => array( 'description' => __( 'Unique identifier for the font collection.' ), 'type' => 'string', 'context' => array( 'view', 'edit', 'embed' ), 'readonly' => true, ), 'name' => array( 'description' => __( 'The name for the font collection.' ), 'type' => 'string', 'context' => array( 'view', 'edit', 'embed' ), ), 'description' => array( 'description' => __( 'The description for the font collection.' ), 'type' => 'string', 'context' => array( 'view', 'edit', 'embed' ), ), 'font_families' => array( 'description' => __( 'The font families for the font collection.' ), 'type' => 'array', 'context' => array( 'view', 'edit', 'embed' ), ), 'categories' => array( 'description' => __( 'The categories for the font collection.' ), 'type' => 'array', 'context' => array( 'view', 'edit', 'embed' ), ), ), ); $this->schema = $schema; return $this->add_additional_fields_schema( $this->schema ); } /** * Prepares links for the request. * * @since 6.5.0 * * @param WP_Font_Collection $collection Font collection data * @return array Links for the given font collection. */ protected function prepare_links( $collection ) { return array( 'self' => array( 'href' => rest_url( sprintf( '%s/%s/%s', $this->namespace, $this->rest_base, $collection->slug ) ), ), 'collection' => array( 'href' => rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ), ), ); } /** * Retrieves the search params for the font collections. * * @since 6.5.0 * * @return array Collection parameters. */ public function get_collection_params() { $query_params = parent::get_collection_params(); $query_params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); unset( $query_params['search'] ); /** * Filters REST API collection parameters for the font collections controller. * * @since 6.5.0 * * @param array $query_params JSON Schema-formatted collection parameters. */ return apply_filters( 'rest_font_collections_collection_params', $query_params ); } /** * Checks whether the user has permissions to use the Fonts Collections. * * @since 6.5.0 * * @return true|WP_Error True if the request has write access for the item, WP_Error object otherwise. */ public function get_items_permissions_check( $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable if ( current_user_can( 'edit_theme_options' ) ) { return true; } return new WP_Error( 'rest_cannot_read', __( 'Sorry, you are not allowed to access font collections.' ), array( 'status' => rest_authorization_required_code(), ) ); } } Zauber Archives - Seite 2 von 2 -

Sophie und die Magie – Eine zauberhafte Klassenfahrt: Band 2


Sophie und die Magie – Eine zauberhafte Klassenfahrt: Band 2 Autorin : Katharina Martin Illustratorin : Angela Glökler Verlag : Boje Seiten : 192 Alter : ab 8 Jahren Sophie und ihre magischen Freunde sind sehr glücklich.Sie fahren mit ihren Klasse ins Landschulheim, mitten in der Natur, wo sie 4 Tage verbringen werden, um den […]

Daliahs Garten – Das Geheimnis des grünen Nachtfeuers


Daliahs Garten – Das Geheimnis des grünen Nachtfeuers (Amazon) Autorin : Fabiola Turan Illustratorin : Verena Körting Verlag : Cbj Seiten : 288 Alter : ab 10 Jahren Musstet ihr einmal gegen euren Willen umziehen?Wie habt ihr das erlebt?Für Daliah, die vom Schloss Lilienfels zu einer einsamen Wohnung umzog ,war es sehr schwer.Erstens weil sie […]

Lenas geheimes Tagebuch-Eine Reise durch die Wolken


Lenas geheimes Tagebuch-Eine Reise durch die Wolken (Amazon) Autorin : Yvonne Giehl Illustratorin : Erika Giehl Verlag : BoD – Books on Demand Seiten : 48 Alter : ab 6 jahre alt / Vorlesen ☁️🦄☁️🦄☁️ Lena hat zauberhafte Träume 🦄Sie hat auch die beste Idee der Welt: sie schreibt all ihre Träume in einem Tagebuch […]

Bazilla Feen-Internat in Gefahr


Bazilla Feen-Internat in Gefahr (Amazon) Autorin : Heike Eva Schmidt Illustratorin : Angela Gstalter Verlag : Boje Seiten : 178 Alter : ab 10 jahre alt 🧛‍♀️🧚🏻‍♀️🧛‍♀️🧚🏻‍♀️🧛‍♀️ Bazilla, das Vampirmädchen, das eigentlich eine Fee ist, fängt an, sich an ihr neues Leben im Feeninternat zu gewöhnen, obwohl sie immer noch einige Schwierigkeiten hat, wie ihre […]

Sophie im Land der Zauberponys


Sophie im Land der Zauberponys (Amazon) Autorin : Patricia Schröder Illustratorin : Silke Voigt Verlag : Cbj Seiten : 80 Alter : ab 6 jahre alt 👧🐎👧🐎👧 Heute möchte ich euch ein Buch aus der Reihe „Erst ich ein Stück, dann du“ vorstellen❤️ Für Sophie beginnen morgen die Sommerferien.Sie ist sehr glücklich.Plötzlich findet sie sich […]

Lea Lavendel und das Gänseblümchenwunder


Lea Lavendel und das Gänseblümchenwunder (Amazon) Autorin : Corinna Wieja Illustratorin : Thessa Rath Verlag : arsEdition Seiten : 176 Alter : ab 8 jahre alt 💐👧💐👧💐 Lea Lavendel lebt ein normales Leben wie jedes andere Mädchen, bis sie den Garten ihrer Nachbarin Frau Pfeffer besucht.Dort entdeckt sie, dass sie mit Pflanzen sprechen kann, genau […]

Lia Sturmgold – Das Geheimnis der Meereselfe (Lia Sturmgold-Reihe, Band 2)


Lia Sturmgold – Das Geheimnis der Meereselfe (Amazon) Autorin : Aniela Ley Illustratorin : Isabelle Hirtz Verlag : dtv Seiten : 256 Alter : ab 10 jahre alt 🌼💫🌼💫🌼 Nach einem missglückten Zauber steckt Lia Dornmeier im Körper von Asalia, der Luftelfenprinzessin, fest.Obwohl sie ihre Mutter sehr vermisst, hat Lia begonnen, ihr neues Leben im […]