/** * REST API: WP_REST_Post_Types_Controller class * * @package WordPress * @subpackage REST_API * @since 4.7.0 */ /** * Core class to access post types via the REST API. * * @since 4.7.0 * * @see WP_REST_Controller */ class WP_REST_Post_Types_Controller extends WP_REST_Controller { /** * Constructor. * * @since 4.7.0 */ public function __construct() { $this->namespace = 'wp/v2'; $this->rest_base = 'types'; } /** * Registers the routes for post types. * * @since 4.7.0 * * @see register_rest_route() */ public function register_routes() { register_rest_route( $this->namespace, '/' . $this->rest_base, array( array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_items' ), 'permission_callback' => array( $this, 'get_items_permissions_check' ), 'args' => $this->get_collection_params(), ), 'schema' => array( $this, 'get_public_item_schema' ), ) ); register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P[\w-]+)', array( 'args' => array( 'type' => array( 'description' => __( 'An alphanumeric identifier for the post type.' ), 'type' => 'string', ), ), array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_item' ), 'permission_callback' => '__return_true', 'args' => array( 'context' => $this->get_context_param( array( 'default' => 'view' ) ), ), ), 'schema' => array( $this, 'get_public_item_schema' ), ) ); } /** * Checks whether a given request has permission to read types. * * @since 4.7.0 * * @param WP_REST_Request $request Full details about the request. * @return true|WP_Error True if the request has read access, WP_Error object otherwise. */ public function get_items_permissions_check( $request ) { if ( 'edit' === $request['context'] ) { $types = get_post_types( array( 'show_in_rest' => true ), 'objects' ); foreach ( $types as $type ) { if ( current_user_can( $type->cap->edit_posts ) ) { return true; } } return new WP_Error( 'rest_cannot_view', __( 'Sorry, you are not allowed to edit posts in this post type.' ), array( 'status' => rest_authorization_required_code() ) ); } return true; } /** * Retrieves all public post types. * * @since 4.7.0 * * @param WP_REST_Request $request Full details about the request. * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. */ public function get_items( $request ) { if ( $request->is_method( 'HEAD' ) ) { // Return early as this handler doesn't add any response headers. return new WP_REST_Response( array() ); } $data = array(); $types = get_post_types( array( 'show_in_rest' => true ), 'objects' ); foreach ( $types as $type ) { if ( 'edit' === $request['context'] && ! current_user_can( $type->cap->edit_posts ) ) { continue; } $post_type = $this->prepare_item_for_response( $type, $request ); $data[ $type->name ] = $this->prepare_response_for_collection( $post_type ); } return rest_ensure_response( $data ); } /** * Retrieves a specific post type. * * @since 4.7.0 * * @param WP_REST_Request $request Full details about the request. * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. */ public function get_item( $request ) { $obj = get_post_type_object( $request['type'] ); if ( empty( $obj ) ) { return new WP_Error( 'rest_type_invalid', __( 'Invalid post type.' ), array( 'status' => 404 ) ); } if ( empty( $obj->show_in_rest ) ) { return new WP_Error( 'rest_cannot_read_type', __( 'Cannot view post type.' ), array( 'status' => rest_authorization_required_code() ) ); } if ( 'edit' === $request['context'] && ! current_user_can( $obj->cap->edit_posts ) ) { return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to edit posts in this post type.' ), array( 'status' => rest_authorization_required_code() ) ); } $data = $this->prepare_item_for_response( $obj, $request ); return rest_ensure_response( $data ); } /** * Prepares a post type object for serialization. * * @since 4.7.0 * @since 5.9.0 Renamed `$post_type` to `$item` to match parent class for PHP 8 named parameter support. * * @param WP_Post_Type $item Post type object. * @param WP_REST_Request $request Full details about the request. * @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_type = $item; // Don't prepare the response body for HEAD requests. if ( $request->is_method( 'HEAD' ) ) { /** This filter is documented in wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php */ return apply_filters( 'rest_prepare_post_type', new WP_REST_Response( array() ), $post_type, $request ); } $taxonomies = wp_list_filter( get_object_taxonomies( $post_type->name, 'objects' ), array( 'show_in_rest' => true ) ); $taxonomies = wp_list_pluck( $taxonomies, 'name' ); $base = ! empty( $post_type->rest_base ) ? $post_type->rest_base : $post_type->name; $namespace = ! empty( $post_type->rest_namespace ) ? $post_type->rest_namespace : 'wp/v2'; $supports = get_all_post_type_supports( $post_type->name ); $fields = $this->get_fields_for_response( $request ); $data = array(); if ( rest_is_field_included( 'capabilities', $fields ) ) { $data['capabilities'] = $post_type->cap; } if ( rest_is_field_included( 'description', $fields ) ) { $data['description'] = $post_type->description; } if ( rest_is_field_included( 'hierarchical', $fields ) ) { $data['hierarchical'] = $post_type->hierarchical; } if ( rest_is_field_included( 'has_archive', $fields ) ) { $data['has_archive'] = $post_type->has_archive; } if ( rest_is_field_included( 'visibility', $fields ) ) { $data['visibility'] = array( 'show_in_nav_menus' => (bool) $post_type->show_in_nav_menus, 'show_ui' => (bool) $post_type->show_ui, ); } if ( rest_is_field_included( 'viewable', $fields ) ) { $data['viewable'] = is_post_type_viewable( $post_type ); } if ( rest_is_field_included( 'labels', $fields ) ) { $data['labels'] = $post_type->labels; } if ( rest_is_field_included( 'name', $fields ) ) { $data['name'] = $post_type->label; } if ( rest_is_field_included( 'slug', $fields ) ) { $data['slug'] = $post_type->name; } if ( rest_is_field_included( 'icon', $fields ) ) { $data['icon'] = $post_type->menu_icon; } if ( rest_is_field_included( 'supports', $fields ) ) { $data['supports'] = $supports; } if ( rest_is_field_included( 'taxonomies', $fields ) ) { $data['taxonomies'] = array_values( $taxonomies ); } if ( rest_is_field_included( 'rest_base', $fields ) ) { $data['rest_base'] = $base; } if ( rest_is_field_included( 'rest_namespace', $fields ) ) { $data['rest_namespace'] = $namespace; } if ( rest_is_field_included( 'template', $fields ) ) { $data['template'] = $post_type->template ?? array(); } if ( rest_is_field_included( 'template_lock', $fields ) ) { $data['template_lock'] = ! empty( $post_type->template_lock ) ? $post_type->template_lock : false; } $context = ! empty( $request['context'] ) ? $request['context'] : 'view'; $data = $this->add_additional_fields_to_object( $data, $request ); $data = $this->filter_response_by_context( $data, $context ); // Wrap the data in a response object. $response = rest_ensure_response( $data ); if ( rest_is_field_included( '_links', $fields ) || rest_is_field_included( '_embedded', $fields ) ) { $response->add_links( $this->prepare_links( $post_type ) ); } /** * Filters a post type returned from the REST API. * * Allows modification of the post type data right before it is returned. * * @since 4.7.0 * * @param WP_REST_Response $response The response object. * @param WP_Post_Type $post_type The original post type object. * @param WP_REST_Request $request Request used to generate the response. */ return apply_filters( 'rest_prepare_post_type', $response, $post_type, $request ); } /** * Prepares links for the request. * * @since 6.1.0 * * @param WP_Post_Type $post_type The post type. * @return array Links for the given post type. */ protected function prepare_links( $post_type ) { return array( 'collection' => array( 'href' => rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ), ), 'https://api.w.org/items' => array( 'href' => rest_url( rest_get_route_for_post_type_items( $post_type->name ) ), ), ); } /** * Retrieves the post type's schema, conforming to JSON Schema. * * @since 4.7.0 * @since 4.8.0 The `supports` property was added. * @since 5.9.0 The `visibility` and `rest_namespace` properties were added. * @since 6.1.0 The `icon` property was added. * * @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' => 'type', 'type' => 'object', 'properties' => array( 'capabilities' => array( 'description' => __( 'All capabilities used by the post type.' ), 'type' => 'object', 'context' => array( 'edit' ), 'readonly' => true, ), 'description' => array( 'description' => __( 'A human-readable description of the post type.' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'hierarchical' => array( 'description' => __( 'Whether or not the post type should have children.' ), 'type' => 'boolean', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'viewable' => array( 'description' => __( 'Whether or not the post type can be viewed.' ), 'type' => 'boolean', 'context' => array( 'edit' ), 'readonly' => true, ), 'labels' => array( 'description' => __( 'Human-readable labels for the post type for various contexts.' ), 'type' => 'object', 'context' => array( 'edit' ), 'readonly' => true, ), 'name' => array( 'description' => __( 'The title for the post type.' ), 'type' => 'string', 'context' => array( 'view', 'edit', 'embed' ), 'readonly' => true, ), 'slug' => array( 'description' => __( 'An alphanumeric identifier for the post type.' ), 'type' => 'string', 'context' => array( 'view', 'edit', 'embed' ), 'readonly' => true, ), 'supports' => array( 'description' => __( 'All features, supported by the post type.' ), 'type' => 'object', 'context' => array( 'edit' ), 'readonly' => true, ), 'has_archive' => array( 'description' => __( 'If the value is a string, the value will be used as the archive slug. If the value is false the post type has no archive.' ), 'type' => array( 'string', 'boolean' ), 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'taxonomies' => array( 'description' => __( 'Taxonomies associated with post type.' ), 'type' => 'array', 'items' => array( 'type' => 'string', ), 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'rest_base' => array( 'description' => __( 'REST base route for the post type.' ), 'type' => 'string', 'context' => array( 'view', 'edit', 'embed' ), 'readonly' => true, ), 'rest_namespace' => array( 'description' => __( 'REST route\'s namespace for the post type.' ), 'type' => 'string', 'context' => array( 'view', 'edit', 'embed' ), 'readonly' => true, ), 'visibility' => array( 'description' => __( 'The visibility settings for the post type.' ), 'type' => 'object', 'context' => array( 'edit' ), 'readonly' => true, 'properties' => array( 'show_ui' => array( 'description' => __( 'Whether to generate a default UI for managing this post type.' ), 'type' => 'boolean', ), 'show_in_nav_menus' => array( 'description' => __( 'Whether to make the post type available for selection in navigation menus.' ), 'type' => 'boolean', ), ), ), 'icon' => array( 'description' => __( 'The icon for the post type.' ), 'type' => array( 'string', 'null' ), 'context' => array( 'view', 'edit', 'embed' ), 'readonly' => true, ), 'template' => array( 'type' => array( 'array' ), 'description' => __( 'The block template associated with the post type.' ), 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), 'template_lock' => array( 'type' => array( 'string', 'boolean' ), 'enum' => array( 'all', 'insert', 'contentOnly', false ), 'description' => __( 'The template_lock associated with the post type, or false if none.' ), 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), ), ); $this->schema = $schema; return $this->add_additional_fields_schema( $this->schema ); } /** * Retrieves the query params for collections. * * @since 4.7.0 * * @return array Collection parameters. */ public function get_collection_params() { return array( 'context' => $this->get_context_param( array( 'default' => 'view' ) ), ); } } La pulsione del clic: tra storia, design e gioco moderno in Chicken Road 2 - Nagarjuna TMT

La pulsione del clic: tra storia, design e gioco moderno in Chicken Road 2

La pulsione del clic nell’esperienza digitale contemporanea

Il fenomeno del “click” oggi non è più solo un’azione meccanica, ma il fulcro dell’attenzione digitale. Nel gioco moderno, ogni pressione del tasto diventa un motore che spinge il player avanti, guidando il ritmo del gameplay. Questa “pulsione” si alimenta di design visivo preciso: contrasti forti, movimento fluido e tempismo calibrato, che catturano l’occhio e lo coinvolgono. Come nel cinema o nella letteratura, il gioco moderno racconta attraverso azione, e il click è il primo passo di questa narrazione visiva.

Come la progettazione visiva guida l’attenzione come motore del gameplay

Nel caso di Chicken Road 2, ogni elemento grafico – dalla strada scintillante al giaywalking in movimento – è studiato per guidare lo sguardo. La velocità dinamica e l’uso sapiente del colore creano un ritmo visivo che stimola l’immediata reazione: un clic, un’evasione, un colpo di scena. Questo approccio non è casuale: il design non serve solo a mostrare, ma a **portare** il giocatore dentro la storia, rendendo l’azione parte integrante della narrazione.

Il design non solo tecnico, ma anche culturale e psicologico

Il successo di Chicken Road 2 si fonda anche su una progettazione che parla al senso culturale italiano. Il jaywalking, simbolo di ribellione leggera e velocità urbana, richiama non solo la tradizione del Road Runner anni ’50, ma anche quella del “correre per sopravvivere” che attraversa le strade di Roma e Milano. Il contrasto tra l’apparenza semplice – pixel chiari, movimento fluido – e la tensione narrativa risuona come un linguaggio familiare, che stimola emozione e immediata partecipazione.

Dalle origini del Road Runner al reinvento digitale di Chicken Road 2

Il personaggio del Road Runner nacque nel 1949 come icona dello speed e dell’evasione, un mito popolare che ha attraversato fumetti, cartoni animati e videogiochi. Chicken Road 2 ne riprende l’anima con un design moderno, mantenendo il cuore: il movimento istantaneo, il rischio calcolato, la libertà di scelta. Questa evoluzione non è solo tecnica, ma anche culturale – un ponte tra la leggenda americana e il gameplay italiano, dove ogni clic diventa una piccola vittoria visiva.

L’impatto globale di Temple Run e la eredità del giaywalking

Con oltre 1 miliardo di download, *Temple Run* ha ridefinito il genere del “running game”, rendendo il movimento fluido e istantaneo un linguaggio universale. In Chicken Road 2, questa dinamica si fonde con il classico “giaywalking” – regola semplice ma carica di tensione – trasformandola in un’esperienza visiva ad alta pulsione. Il click non è solo un comando, ma un gesto simbolico: correre, scegliere, rischiare, ogni volta con l’occhio che segue il movimento.

Strategie visive: colore, movimento e ritmo nel design del gioco

Il design di Chicken Road 2 si basa su strategie visive che catturano l’attenzione in pochi secondi:

  • Contrasti vivaci tra strada scura e sguardo luminoso del personaggio
  • Velocità dei pixel in movimento che crea un effetto “scorrimento istantaneo” tipico del cinema d’azione italiano
  • Parallax semplice ma efficace per dare profondità al paesaggio urbano

Questi elementi non sono solo estetici: sono psicologici. Lo sguardo è attratto da ciò che si muove rapidamente; il brain riconosce immediato un segnale di pericolo o di sfida, innescando reazione automatica.

Perché Chicken Road 2 attrae il pubblico italiano

Il gioco trova terreno fertile in Italia grazie alla sua sintesi tra storia e modernità. Come nei racconti popolari – dove la velocità è metafora di libertà – Chicken Road 2 unisce estetica dinamica e narrazione visiva immediata. La guida al “giaywalking” moderno richiama strade antiche e moderne, mentre il click diventa gesto familiare, carico di significato. Inoltre, il design rispetta la tradizione visiva italiana: colori chiari, movimento fluido, attenzione al dettaglio che non sovraccarica, ma invita a giocare.

Il clic come ponte culturale tra passato e futuro digitale

In Chicken Road 2 si legge una narrazione visiva che unisce l’eredità popolare del Road Runner, il linguaggio del cinema d’azione italiano veloce e dinamico, e l’innovazione tecnologica globale. Il click non è solo un’azione tecnica: è un gesto di connessione tra il mito del “correre per vivere” e il gameplay contemporaneo. Questo ponte tra epoche fa del gioco un’esperienza visiva che racconta, coinvolge e richiama l’identità culturale italiana.

Conclusione: il clic come narrazione visiva coinvolgente

Chicken Road 2 dimostra come il design moderno possa raccontare storie potenti senza parole. Ogni pressione del tasto non è fine a sé stessa, ma parte di una narrazione fluida, visiva e culturale. Il gioco è sintesi: passato e presente che si incontrano nel movimento, il click diventa ritmo, scelta e azione. Per chi ama il gioco come mezzo culturale, Chicken Road 2 è un esempio vivo di come la “pulsione del clic” si trasforma in narrazione coinvolgente – un invito a scoprire come il design italiano possa ispirare il medium globale.

*“Nel gioco, ogni clic è una scelta, ogni movimento una storia. E in questo, il giocatore italiano trova familiarità e sorpresa.*

Sezioni principali Descrizione sintetica
  • La pulsione del clic come motore dell’attenzione visiva
  • Il design come narrazione dinamica e immediata
  • Il legame tra storia mitica e gameplay moderno
  • L’impatto globale di Temple Run e l’innovazione di Chicken Road 2
  • Strategie visive: colore, movimento e ritmo come strumenti di coinvolgimento
  • Il pubblico italiano: sintesi tra tradizione e interattività
  • Il click come ponte culturale tra epoche e linguaggi
Perché il clic conta: non è solo un comando, ma un atto di partecipazione, un ritmo che unisce storia e modernità.
“Chicken Road 2 non insegna con parole: mostra, muove, cattura lo sguardo.”

*“Il clic è più di un click: è la voce visiva del gioco, il battito che lo rende vivo.”*

Win big here!

Related Posts