urn $pattern; } /** * Prepare a raw block pattern before it gets output in a REST API response. * * @since 6.0.0 * @since 6.3.0 Added `source` property. * * @param array $item Raw pattern as registered, before any changes. * @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 ) { // Resolve pattern blocks so they don't need to be resolved client-side // in the editor, improving performance. $blocks = parse_blocks( $item['content'] ); $blocks = resolve_pattern_blocks( $blocks ); $item['content'] = serialize_blocks( $blocks ); $fields = $this->get_fields_for_response( $request ); $keys = array( 'name' => 'name', 'title' => 'title', 'content' => 'content', 'description' => 'description', 'viewportWidth' => 'viewport_width', 'inserter' => 'inserter', 'categories' => 'categories', 'keywords' => 'keywords', 'blockTypes' => 'block_types', 'postTypes' => 'post_types', 'templateTypes' => 'template_types', 'source' => 'source', ); $data = array(); foreach ( $keys as $item_key => $rest_key ) { if ( isset( $item[ $item_key ] ) && rest_is_field_included( $rest_key, $fields ) ) { $data[ $rest_key ] = $item[ $item_key ]; } } $context = ! empty( $request['context'] ) ? $request['context'] : 'view'; $data = $this->add_additional_fields_to_object( $data, $request ); $data = $this->filter_response_by_context( $data, $context ); return rest_ensure_response( $data ); } /** * Retrieves the block pattern schema, conforming to JSON Schema. * * @since 6.0.0 * @since 6.3.0 Added `source` property. * * @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' => 'block-pattern', 'type' => 'object', 'properties' => array( 'name' => array( 'description' => __( 'The pattern name.' ), 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), 'title' => array( 'description' => __( 'The pattern title, in human readable format.' ), 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), 'content' => array( 'description' => __( 'The pattern content.' ), 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), 'description' => array( 'description' => __( 'The pattern detailed description.' ), 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), 'viewport_width' => array( 'description' => __( 'The pattern viewport width for inserter preview.' ), 'type' => 'number', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), 'inserter' => array( 'description' => __( 'Determines whether the pattern is visible in inserter.' ), 'type' => 'boolean', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), 'categories' => array( 'description' => __( 'The pattern category slugs.' ), 'type' => 'array', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), 'keywords' => array( 'description' => __( 'The pattern keywords.' ), 'type' => 'array', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), 'block_types' => array( 'description' => __( 'Block types that the pattern is intended to be used with.' ), 'type' => 'array', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), 'post_types' => array( 'description' => __( 'An array of post types that the pattern is restricted to be used with.' ), 'type' => 'array', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), 'template_types' => array( 'description' => __( 'An array of template types where the pattern fits.' ), 'type' => 'array', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), ), 'source' => array( 'description' => __( 'Where the pattern comes from e.g. core' ), 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit', 'embed' ), 'enum' => array( 'core', 'plugin', 'theme', 'pattern-directory/core', 'pattern-directory/theme', 'pattern-directory/featured', ), ), ), ); $this->schema = $schema; return $this->add_additional_fields_schema( $this->schema ); } } https://www.emploitogo.info/post-sitemap1.xml 2026-06-07T10:49:24+00:00 https://www.emploitogo.info/post-sitemap2.xml 2026-06-07T10:36:16+00:00 https://www.emploitogo.info/post-sitemap3.xml 2026-06-07T10:25:22+00:00 https://www.emploitogo.info/post-sitemap4.xml 2026-06-07T10:14:33+00:00 https://www.emploitogo.info/post-sitemap5.xml 2026-06-07T10:01:35+00:00 https://www.emploitogo.info/post-sitemap6.xml 2026-06-06T21:35:13+00:00 https://www.emploitogo.info/post-sitemap7.xml 2026-06-06T21:24:05+00:00 https://www.emploitogo.info/post-sitemap8.xml 2026-06-06T21:03:13+00:00 https://www.emploitogo.info/post-sitemap9.xml 2026-06-06T20:45:52+00:00 https://www.emploitogo.info/post-sitemap10.xml 2026-06-06T20:27:25+00:00 https://www.emploitogo.info/post-sitemap11.xml 2026-06-06T20:17:24+00:00 https://www.emploitogo.info/post-sitemap12.xml 2026-06-06T19:59:50+00:00 https://www.emploitogo.info/post-sitemap13.xml 2026-06-06T16:00:51+00:00 https://www.emploitogo.info/post-sitemap14.xml 2026-06-06T15:57:35+00:00 https://www.emploitogo.info/post-sitemap15.xml 2026-06-06T15:44:56+00:00 https://www.emploitogo.info/post-sitemap16.xml 2026-06-05T22:02:33+00:00 https://www.emploitogo.info/post-sitemap17.xml 2026-06-05T21:44:43+00:00 https://www.emploitogo.info/post-sitemap18.xml 2026-06-05T16:51:54+00:00 https://www.emploitogo.info/post-sitemap19.xml 2026-06-05T13:40:20+00:00 https://www.emploitogo.info/post-sitemap20.xml 2026-06-05T13:22:50+00:00 https://www.emploitogo.info/post-sitemap21.xml 2026-06-05T10:18:09+00:00 https://www.emploitogo.info/post-sitemap22.xml 2026-06-05T10:05:18+00:00 https://www.emploitogo.info/post-sitemap23.xml 2026-06-05T09:42:25+00:00 https://www.emploitogo.info/post-sitemap24.xml 2026-06-05T09:32:22+00:00 https://www.emploitogo.info/post-sitemap25.xml 2026-06-05T09:22:22+00:00 https://www.emploitogo.info/post-sitemap26.xml 2026-06-04T23:47:24+00:00 https://www.emploitogo.info/post-sitemap27.xml 2026-06-04T22:31:38+00:00 https://www.emploitogo.info/post-sitemap28.xml 2026-06-04T21:58:45+00:00 https://www.emploitogo.info/post-sitemap29.xml 2026-06-04T15:36:02+00:00 https://www.emploitogo.info/post-sitemap30.xml 2026-06-04T13:13:13+00:00 https://www.emploitogo.info/post-sitemap31.xml 2026-06-04T13:06:13+00:00 https://www.emploitogo.info/page-sitemap.xml 2026-04-30T20:35:44+00:00 https://www.emploitogo.info/job-sitemap1.xml 2026-06-06T14:54:32+00:00 https://www.emploitogo.info/job-sitemap2.xml 2026-06-05T16:41:38+00:00 https://www.emploitogo.info/job-sitemap3.xml 2026-06-05T16:41:38+00:00 https://www.emploitogo.info/job-sitemap4.xml 2026-06-05T16:41:37+00:00 https://www.emploitogo.info/resume-sitemap1.xml 2026-06-06T16:09:41+00:00 https://www.emploitogo.info/resume-sitemap2.xml 2026-06-06T16:09:09+00:00 https://www.emploitogo.info/resume-sitemap3.xml 2026-06-06T16:08:55+00:00 https://www.emploitogo.info/resume-sitemap4.xml 2026-06-06T16:08:49+00:00 https://www.emploitogo.info/resume-sitemap5.xml 2026-06-06T16:08:15+00:00 https://www.emploitogo.info/resume-sitemap6.xml 2026-06-06T16:08:08+00:00 https://www.emploitogo.info/resume-sitemap7.xml 2026-06-06T16:07:56+00:00 https://www.emploitogo.info/resume-sitemap8.xml 2026-06-06T16:07:08+00:00 https://www.emploitogo.info/resume-sitemap9.xml 2026-06-06T16:06:35+00:00 https://www.emploitogo.info/resume-sitemap10.xml 2026-06-01T14:09:42+00:00 https://www.emploitogo.info/resume-sitemap11.xml 2026-06-01T14:09:36+00:00 https://www.emploitogo.info/resume-sitemap12.xml 2026-06-01T14:09:11+00:00 https://www.emploitogo.info/resume-sitemap13.xml 2026-06-01T14:08:41+00:00 https://www.emploitogo.info/resume-sitemap14.xml 2026-06-01T14:03:43+00:00 https://www.emploitogo.info/resume-sitemap15.xml 2026-05-27T23:18:14+00:00 https://www.emploitogo.info/resume-sitemap16.xml 2026-05-27T23:18:10+00:00 https://www.emploitogo.info/resume-sitemap17.xml 2026-05-27T23:18:06+00:00 https://www.emploitogo.info/resume-sitemap18.xml 2026-05-25T02:23:47+00:00 https://www.emploitogo.info/resume-sitemap19.xml 2026-05-25T02:23:42+00:00 https://www.emploitogo.info/resume-sitemap20.xml 2026-05-22T08:53:35+00:00 https://www.emploitogo.info/resume-sitemap21.xml 2026-05-21T21:11:14+00:00 https://www.emploitogo.info/resume-sitemap22.xml 2026-05-20T22:35:11+00:00 https://www.emploitogo.info/resume-sitemap23.xml 2026-05-20T22:34:25+00:00 https://www.emploitogo.info/company-sitemap1.xml 2026-06-06T16:09:50+00:00 https://www.emploitogo.info/company-sitemap2.xml 2026-05-27T21:46:43+00:00 https://www.emploitogo.info/company-sitemap3.xml 2026-05-25T02:27:39+00:00 https://www.emploitogo.info/company-sitemap4.xml 2026-05-20T22:35:50+00:00 https://www.emploitogo.info/company-sitemap5.xml 2026-05-13T12:06:03+00:00 https://www.emploitogo.info/category-sitemap.xml 2026-06-07T10:49:24+00:00