generated from pascalmartineau/wp-skeleton
fix: GraphQL breadcrumbs and address
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
<exclude name="WordPress.DB.SlowDBQuery.slow_db_query_tax_query"/>
|
||||
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
|
||||
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores"/>
|
||||
<exclude name="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase"/>
|
||||
<exclude name="WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode"/>
|
||||
<exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict"/>
|
||||
<exclude name="WordPress.PHP.YodaConditions.NotYoda"/>
|
||||
|
||||
@@ -2,6 +2,10 @@ query nodeByUri($uri: String!) {
|
||||
nodeByUri(uri: $uri) {
|
||||
__typename
|
||||
id
|
||||
breadcrumbs {
|
||||
label
|
||||
uri
|
||||
}
|
||||
... on Page {
|
||||
...ThePage
|
||||
}
|
||||
|
||||
@@ -17,6 +17,11 @@ import {
|
||||
TheResource,
|
||||
} from "#components";
|
||||
|
||||
interface BreadcrumbItem {
|
||||
label: string;
|
||||
to?: string;
|
||||
}
|
||||
|
||||
export async function useNodeByUri() {
|
||||
const route = useRoute();
|
||||
const uri = computed(() => route.path);
|
||||
@@ -25,21 +30,34 @@ export async function useNodeByUri() {
|
||||
throw createError({ statusCode: 500, message: "Erreur lors de la récupération du contenu", fatal: true });
|
||||
}
|
||||
const node = data.value?.data.nodeByUri;
|
||||
|
||||
const breadcrumbs: BreadcrumbItem[] = [];
|
||||
if (node?.breadcrumbs) {
|
||||
breadcrumbs.push(
|
||||
...node.breadcrumbs
|
||||
.filter((item: any) => item.label)
|
||||
.map((item: any) => ({
|
||||
label: item.label,
|
||||
to: item.uri || undefined,
|
||||
})),
|
||||
);
|
||||
}
|
||||
|
||||
switch (node?.__typename) {
|
||||
case "Page":
|
||||
return { component: ThePage, node: node as ThePageFragment };
|
||||
return { component: ThePage, node: node as ThePageFragment, breadcrumbs };
|
||||
case "Post":
|
||||
return { component: TheArticle, node: node as TheArticleFragment };
|
||||
return { component: TheArticle, node: node as TheArticleFragment, breadcrumbs };
|
||||
case "Event":
|
||||
return { component: TheEvent, node: node as TheEventFragment };
|
||||
return { component: TheEvent, node: node as TheEventFragment, breadcrumbs };
|
||||
case "Location":
|
||||
return { component: TheLocation, node: node as TheLocationFragment };
|
||||
return { component: TheLocation, node: node as TheLocationFragment, breadcrumbs };
|
||||
case "Membership":
|
||||
return { component: TheMembership, node: node as TheMembershipFragment };
|
||||
return { component: TheMembership, node: node as TheMembershipFragment, breadcrumbs };
|
||||
case "Project":
|
||||
return { component: TheProject, node: node as TheProjectFragment };
|
||||
return { component: TheProject, node: node as TheProjectFragment, breadcrumbs };
|
||||
case "Resource":
|
||||
return { component: TheResource, node: node as TheResourceFragment };
|
||||
return { component: TheResource, node: node as TheResourceFragment, breadcrumbs };
|
||||
default:
|
||||
throw createError({ statusCode: 404, message: "Page non trouvée", fatal: true });
|
||||
}
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
const { node, component } = await useNodeByUri();
|
||||
const { node, component, breadcrumbs } = await useNodeByUri();
|
||||
useSeoMeta({ title: node?.title });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<component :is="component" :node="node" />
|
||||
<div>
|
||||
<div class="">
|
||||
<pre>{{ breadcrumbs }}</pre>
|
||||
<UBreadcrumb :items="breadcrumbs" />
|
||||
</div>
|
||||
<component :is="component" :node="node" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -24,6 +24,7 @@ require_once __DIR__ . '/includes/taxonomies/resource-category.php';
|
||||
|
||||
// GraphQL
|
||||
require_once __DIR__ . '/includes/graphql/address.php';
|
||||
require_once __DIR__ . '/includes/graphql/breadcrumbs.php';
|
||||
require_once __DIR__ . '/includes/graphql/user-switching.php';
|
||||
|
||||
// Roles
|
||||
|
||||
@@ -38,7 +38,7 @@ function ccat_location_register_post_type() {
|
||||
'item_scheduled' => __( "Location scheduled.", 'ccat' ),
|
||||
'item_updated' => __( "Location updated.", 'ccat' ),
|
||||
),
|
||||
'public' => false,
|
||||
'public' => true,
|
||||
'hierarchical' => true,
|
||||
'show_ui' => true,
|
||||
'show_in_nav_menus' => false,
|
||||
|
||||
@@ -16,6 +16,14 @@ function ccat_graphql_address_register() {
|
||||
'type' => 'String',
|
||||
'description' => 'Name of the location (e.g., street address)',
|
||||
),
|
||||
'streetNumber' => array(
|
||||
'type' => 'String',
|
||||
'description' => 'Street number',
|
||||
),
|
||||
'streetName' => array(
|
||||
'type' => 'String',
|
||||
'description' => 'Street name',
|
||||
),
|
||||
'city' => array(
|
||||
'type' => 'String',
|
||||
'description' => 'City name',
|
||||
@@ -67,7 +75,7 @@ function ccat_graphql_address_register_field_type() {
|
||||
return 'Address';
|
||||
},
|
||||
'resolve' => static function ( $root, $args, $context, $info, $field_type, $field_config ) {
|
||||
$value = get_field( $field_config['name'], $root, false );
|
||||
$value = get_field( $field_config->get_acf_field()['key'], $root['node']->data->ID, false );
|
||||
if ( empty( $value ) || ! is_array( $value ) ) {
|
||||
return null;
|
||||
}
|
||||
@@ -83,6 +91,12 @@ function ccat_graphql_address_register_field_type() {
|
||||
case 'name':
|
||||
$address_data['name'] = $field_value;
|
||||
break;
|
||||
case 'street_number':
|
||||
$address_data['streetNumber'] = $field_value;
|
||||
break;
|
||||
case 'street_name':
|
||||
$address_data['streetName'] = $field_value;
|
||||
break;
|
||||
case 'city':
|
||||
$address_data['city'] = $field_value;
|
||||
break;
|
||||
|
||||
204
wp-content/themes/ccat/includes/graphql/breadcrumbs.php
Normal file
204
wp-content/themes/ccat/includes/graphql/breadcrumbs.php
Normal file
@@ -0,0 +1,204 @@
|
||||
<?php
|
||||
|
||||
// Register GraphQL types and fields for breadcrumbs
|
||||
add_action( 'graphql_register_types', 'ccat_register_breadcrumb_graphql_types' );
|
||||
function ccat_register_breadcrumb_graphql_types() {
|
||||
register_graphql_object_type(
|
||||
'BreadcrumbItem',
|
||||
array(
|
||||
'description' => 'A single breadcrumb item',
|
||||
'fields' => array(
|
||||
'label' => array(
|
||||
'type' => array( 'non_null' => 'String' ),
|
||||
'description' => 'The display label for the breadcrumb',
|
||||
),
|
||||
'uri' => array(
|
||||
'type' => 'String',
|
||||
'description' => 'The URI for the breadcrumb link (null for current page)',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Add 'breadcrumbs' field to all Node types
|
||||
add_action( 'graphql_register_types', 'ccat_register_breadcrumb_graphql_fields' );
|
||||
function ccat_register_breadcrumb_graphql_fields() {
|
||||
register_graphql_field(
|
||||
'Node',
|
||||
'breadcrumbs',
|
||||
array(
|
||||
'type' => array( 'list_of' => 'BreadcrumbItem' ),
|
||||
'description' => 'Breadcrumb navigation items for this content',
|
||||
'resolve' => function ( $node ) {
|
||||
return ccat_get_breadcrumbs( $node );
|
||||
},
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Helper: Get breadcrumbs for a given node
|
||||
function ccat_get_breadcrumbs( $node ) {
|
||||
$breadcrumbs = array();
|
||||
if ( ! $node ) {
|
||||
return $breadcrumbs;
|
||||
}
|
||||
|
||||
// Handle WPGraphQL Model objects
|
||||
if ( $node instanceof \WPGraphQL\Model\Post ) {
|
||||
$post = get_post( $node->databaseId );
|
||||
if ( $post ) {
|
||||
$breadcrumbs = ccat_get_post_breadcrumbs( $post );
|
||||
$breadcrumbs[] = array(
|
||||
'label' => get_the_title( $post->ID ),
|
||||
'uri' => null,
|
||||
);
|
||||
}
|
||||
} elseif ( $node instanceof \WPGraphQL\Model\Term ) {
|
||||
$term = get_term( $node->databaseId );
|
||||
if ( $term && ! is_wp_error( $term ) ) {
|
||||
$breadcrumbs = ccat_get_term_breadcrumbs( $term );
|
||||
$breadcrumbs[] = array(
|
||||
'label' => $term->name,
|
||||
'uri' => null,
|
||||
);
|
||||
}
|
||||
}
|
||||
return $breadcrumbs;
|
||||
}
|
||||
|
||||
// Helper: Get breadcrumbs for a given post
|
||||
function ccat_get_post_breadcrumbs( $post ) {
|
||||
$breadcrumbs = array();
|
||||
$post_type = get_post_type( $post->ID );
|
||||
switch ( $post_type ) {
|
||||
case 'page':
|
||||
$ancestors = get_post_ancestors( $post->ID );
|
||||
if ( ! empty( $ancestors ) ) {
|
||||
$ancestors = array_reverse( $ancestors );
|
||||
foreach ( $ancestors as $ancestor_id ) {
|
||||
$breadcrumbs[] = array(
|
||||
'label' => html_entity_decode( get_the_title( $ancestor_id ), ENT_QUOTES, 'UTF-8' ),
|
||||
'uri' => str_replace( home_url(), '', get_permalink( $ancestor_id ) ),
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'post':
|
||||
$breadcrumbs[] = array(
|
||||
'label' => 'Actualités',
|
||||
'uri' => '/actualites/',
|
||||
);
|
||||
break;
|
||||
|
||||
case 'event':
|
||||
$breadcrumbs[] = array(
|
||||
'label' => 'Événements',
|
||||
'uri' => '/evenements/',
|
||||
);
|
||||
break;
|
||||
|
||||
case 'location':
|
||||
$breadcrumbs[] = array(
|
||||
'label' => 'Lieux',
|
||||
'uri' => '/lieux/',
|
||||
);
|
||||
break;
|
||||
|
||||
case 'membership':
|
||||
$breadcrumbs[] = array(
|
||||
'label' => 'Membres',
|
||||
'uri' => '/membres/',
|
||||
);
|
||||
break;
|
||||
|
||||
case 'project':
|
||||
$breadcrumbs[] = array(
|
||||
'label' => 'Projets',
|
||||
'uri' => '/projets/',
|
||||
);
|
||||
break;
|
||||
|
||||
case 'resource':
|
||||
$breadcrumbs[] = array(
|
||||
'label' => 'Ressources',
|
||||
'uri' => '/ressources/',
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
return $breadcrumbs;
|
||||
}
|
||||
|
||||
// Helper: Get breadcrumbs for a given term
|
||||
function ccat_get_term_breadcrumbs( $term ) {
|
||||
$breadcrumbs = array();
|
||||
$taxonomy = $term->taxonomy;
|
||||
if ( $term->parent ) {
|
||||
$ancestors = get_ancestors( $term->term_id, $taxonomy );
|
||||
if ( ! empty( $ancestors ) ) {
|
||||
$ancestors = array_reverse( $ancestors );
|
||||
foreach ( $ancestors as $ancestor_id ) {
|
||||
$ancestor_term = get_term( $ancestor_id, $taxonomy );
|
||||
if ( $ancestor_term && ! is_wp_error( $ancestor_term ) ) {
|
||||
$breadcrumbs[] = array(
|
||||
'label' => html_entity_decode( $ancestor_term->name, ENT_QUOTES, 'UTF-8' ),
|
||||
'uri' => str_replace( home_url(), '', get_term_link( $ancestor_term ) ),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
switch ( $taxonomy ) {
|
||||
case 'category':
|
||||
$breadcrumbs = array_merge(
|
||||
array(
|
||||
array(
|
||||
'label' => 'Catégories',
|
||||
'uri' => '/categories/',
|
||||
),
|
||||
),
|
||||
$breadcrumbs
|
||||
);
|
||||
break;
|
||||
|
||||
case 'discipline':
|
||||
$breadcrumbs = array_merge(
|
||||
array(
|
||||
array(
|
||||
'label' => 'Disciplines',
|
||||
'uri' => '/disciplines/',
|
||||
),
|
||||
),
|
||||
$breadcrumbs
|
||||
);
|
||||
break;
|
||||
|
||||
case 'project-category':
|
||||
$breadcrumbs = array_merge(
|
||||
array(
|
||||
array(
|
||||
'label' => 'Catégories de projets',
|
||||
'uri' => '/categories-projets/',
|
||||
),
|
||||
),
|
||||
$breadcrumbs
|
||||
);
|
||||
break;
|
||||
|
||||
case 'resource-category':
|
||||
$breadcrumbs = array_merge(
|
||||
array(
|
||||
array(
|
||||
'label' => 'Catégories de ressources',
|
||||
'uri' => '/categories-ressources/',
|
||||
),
|
||||
),
|
||||
$breadcrumbs
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
return $breadcrumbs;
|
||||
}
|
||||
@@ -15,6 +15,6 @@ function ccat_acf_init() {
|
||||
// Google Maps API key
|
||||
add_filter( 'acf/fields/google_map/api', 'ccat_acf_google_map_api' );
|
||||
function ccat_acf_google_map_api( $api ) {
|
||||
$api['key'] = 'AIzaSyAg30RB3c6ICeAklV_9CSJ_80uPThr4Qn8';
|
||||
$api['key'] = 'AIzaSyCoB9_Um059jyenVcFfpXTBq-zZAxlBPqk';
|
||||
return $api;
|
||||
}
|
||||
|
||||
@@ -209,6 +209,9 @@ type AcfMediaItemConnectionEdge implements Edge & MediaItemConnectionEdge & OneT
|
||||
|
||||
"""Options Page registered by ACF"""
|
||||
interface AcfOptionsPage implements Node {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The globally unique ID for the object"""
|
||||
id: ID!
|
||||
|
||||
@@ -359,6 +362,15 @@ enum AvatarRatingEnum {
|
||||
X
|
||||
}
|
||||
|
||||
"""A single breadcrumb item"""
|
||||
type BreadcrumbItem {
|
||||
"""The display label for the breadcrumb"""
|
||||
label: String!
|
||||
|
||||
"""The URI for the breadcrumb link (null for current page)"""
|
||||
uri: String
|
||||
}
|
||||
|
||||
"""
|
||||
A taxonomy term that classifies content. Categories support hierarchy and can be used to create a nested structure.
|
||||
"""
|
||||
@@ -384,6 +396,9 @@ type Category implements DatabaseIdentifier & HierarchicalNode & HierarchicalTer
|
||||
last: Int
|
||||
): CategoryToAncestorsCategoryConnection
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The id field matches the WP_Post->ID field."""
|
||||
categoryId: Int @deprecated(reason: "Deprecated in favor of databaseId")
|
||||
|
||||
@@ -1071,6 +1086,9 @@ type Comment implements DatabaseIdentifier & Node & UniformResourceIdentifiable
|
||||
"""
|
||||
authorIp: String @deprecated(reason: "Use the ipAddress field on the edge between the comment and author")
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""ID for the comment, unique among comments."""
|
||||
commentId: Int @deprecated(reason: "Deprecated in favor of databaseId")
|
||||
|
||||
@@ -1197,6 +1215,9 @@ type CommentAuthor implements Commenter & DatabaseIdentifier & Node {
|
||||
size: Int = 96
|
||||
): Avatar
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The unique identifier stored in the database"""
|
||||
databaseId: Int!
|
||||
|
||||
@@ -1582,6 +1603,9 @@ interface Commenter implements DatabaseIdentifier & Node {
|
||||
"""
|
||||
avatar: Avatar
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Identifies the primary key from the database."""
|
||||
databaseId: Int!
|
||||
|
||||
@@ -1691,6 +1715,9 @@ interface Connection {
|
||||
Base interface for content objects like posts, pages, and media items. Provides common fields available across these content types.
|
||||
"""
|
||||
interface ContentNode implements Node & UniformResourceIdentifiable {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Connection between the ContentNode type and the ContentType type"""
|
||||
contentType: ContentNodeToContentTypeConnectionEdge
|
||||
|
||||
@@ -2007,6 +2034,9 @@ interface ContentTemplate {
|
||||
|
||||
"""An Post Type object"""
|
||||
type ContentType implements Node & UniformResourceIdentifiable {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Whether this content type should can be exported."""
|
||||
canExport: Boolean
|
||||
|
||||
@@ -2472,6 +2502,9 @@ type Contributor implements ContentNode & DatabaseIdentifier & HierarchicalConte
|
||||
"""The globally unique identifier of the author of the node"""
|
||||
authorId: ID
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""
|
||||
Connection between the HierarchicalContentNode type and the ContentNode type
|
||||
"""
|
||||
@@ -4777,6 +4810,9 @@ type Discipline implements DatabaseIdentifier & HierarchicalNode & HierarchicalT
|
||||
last: Int
|
||||
): DisciplineToAncestorsDisciplineConnection
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Connection between the Discipline type and its children Disciplines."""
|
||||
children(
|
||||
"""
|
||||
@@ -5612,6 +5648,9 @@ type EnqueuedScript implements EnqueuedAsset & Node {
|
||||
"""The inline code to be run before the asset is loaded."""
|
||||
before: [String]
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""
|
||||
The HTML conditional comment for the enqueued asset. E.g. IE 6, lte IE 7, etc
|
||||
"""
|
||||
@@ -5705,6 +5744,9 @@ type EnqueuedStylesheet implements EnqueuedAsset & Node {
|
||||
"""The inline code to be run before the asset is loaded."""
|
||||
before: [String]
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""
|
||||
The HTML conditional comment for the enqueued asset. E.g. IE 6, lte IE 7, etc
|
||||
"""
|
||||
@@ -5826,6 +5868,9 @@ type Event implements ContentNode & DatabaseIdentifier & HierarchicalContentNode
|
||||
where: HierarchicalContentNodeToContentNodeAncestorsConnectionWhereArgs
|
||||
): HierarchicalContentNodeToContentNodeAncestorsConnection
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""
|
||||
Connection between the HierarchicalContentNode type and the ContentNode type
|
||||
"""
|
||||
@@ -8702,6 +8747,9 @@ interface HierarchicalContentNode implements ContentNode & DatabaseIdentifier &
|
||||
where: HierarchicalContentNodeToContentNodeAncestorsConnectionWhereArgs
|
||||
): HierarchicalContentNodeToContentNodeAncestorsConnection
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""
|
||||
Connection between the HierarchicalContentNode type and the ContentNode type
|
||||
"""
|
||||
@@ -9094,6 +9142,9 @@ type HierarchicalContentNodeToParentContentNodeConnectionEdge implements Content
|
||||
Content that can exist in a parent-child structure. Provides fields for navigating up (parent) and down (children) through the hierarchy.
|
||||
"""
|
||||
interface HierarchicalNode implements DatabaseIdentifier & Node {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The unique identifier stored in the database"""
|
||||
databaseId: Int!
|
||||
|
||||
@@ -9109,6 +9160,9 @@ interface HierarchicalNode implements DatabaseIdentifier & Node {
|
||||
|
||||
"""Term node with hierarchical (parent/child) relationships"""
|
||||
interface HierarchicalTermNode implements DatabaseIdentifier & HierarchicalNode & Node & TermNode & UniformResourceIdentifiable {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The number of objects connected to the object"""
|
||||
count: Int
|
||||
|
||||
@@ -9231,6 +9285,9 @@ type Location implements ContentNode & DatabaseIdentifier & HierarchicalContentN
|
||||
where: HierarchicalContentNodeToContentNodeAncestorsConnectionWhereArgs
|
||||
): HierarchicalContentNodeToContentNodeAncestorsConnection
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""
|
||||
Connection between the HierarchicalContentNode type and the ContentNode type
|
||||
"""
|
||||
@@ -9737,6 +9794,9 @@ type MediaItem implements ContentNode & DatabaseIdentifier & HierarchicalContent
|
||||
"""The globally unique identifier of the author of the node"""
|
||||
authorId: ID
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The caption for the resource"""
|
||||
caption(
|
||||
"""Format of the field output"""
|
||||
@@ -10193,6 +10253,9 @@ type Membership implements ContentNode & DatabaseIdentifier & Node & NodeWithAut
|
||||
"""The globally unique identifier of the author of the node"""
|
||||
authorId: ID
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Connection between the ContentNode type and the ContentType type"""
|
||||
contentType: ContentNodeToContentTypeConnectionEdge
|
||||
|
||||
@@ -10635,6 +10698,9 @@ input MembershipToRevisionConnectionWhereArgs {
|
||||
Collections of navigation links. Menus can be assigned to designated locations and used to build site navigation structures.
|
||||
"""
|
||||
type Menu implements DatabaseIdentifier & Node {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The number of items in the menu"""
|
||||
count: Int
|
||||
|
||||
@@ -10732,6 +10798,9 @@ interface MenuConnectionPageInfo implements PageInfo & WPPageInfo {
|
||||
Navigation menu items are the individual items assigned to a menu. These are rendered as the links in a navigation menu.
|
||||
"""
|
||||
type MenuItem implements DatabaseIdentifier & Node {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Connection between the MenuItem type and the MenuItem type"""
|
||||
childItems(
|
||||
"""
|
||||
@@ -10867,6 +10936,9 @@ interface MenuItemConnectionPageInfo implements PageInfo & WPPageInfo {
|
||||
Content that can be referenced by navigation menu items. Provides the essential fields needed to create links within navigation structures.
|
||||
"""
|
||||
interface MenuItemLinkable implements DatabaseIdentifier & Node & UniformResourceIdentifiable {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The unique identifier stored in the database"""
|
||||
databaseId: Int!
|
||||
|
||||
@@ -11384,6 +11456,9 @@ enum MimeTypeEnum {
|
||||
An object with a globally unique identifier. All objects that can be identified by a unique ID implement this interface.
|
||||
"""
|
||||
interface Node {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The globally unique ID for the object"""
|
||||
id: ID!
|
||||
}
|
||||
@@ -11401,6 +11476,9 @@ interface NodeWithAuthor implements Node {
|
||||
"""The globally unique identifier of the author of the node"""
|
||||
authorId: ID
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The globally unique ID for the object"""
|
||||
id: ID!
|
||||
}
|
||||
@@ -11420,6 +11498,9 @@ type NodeWithAuthorToUserConnectionEdge implements Edge & OneToOneConnection & U
|
||||
Content that has a main body field which can contain formatted text and media. Provides access to both raw (with appropriate permissions) and rendered versions of the content.
|
||||
"""
|
||||
interface NodeWithContentEditor implements Node {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The content of the post."""
|
||||
content(
|
||||
"""Format of the field output"""
|
||||
@@ -11434,6 +11515,9 @@ interface NodeWithContentEditor implements Node {
|
||||
A node which provides an excerpt field, which is a condensed summary of the main content. Excerpts can be manually created or automatically generated and are often used in content listings and search results.
|
||||
"""
|
||||
interface NodeWithExcerpt implements Node {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The excerpt of the post."""
|
||||
excerpt(
|
||||
"""Format of the field output"""
|
||||
@@ -11448,6 +11532,9 @@ interface NodeWithExcerpt implements Node {
|
||||
Content that can have a primary image attached. This image is typically used for thumbnails, social sharing, and prominent display in the presentation layer.
|
||||
"""
|
||||
interface NodeWithFeaturedImage implements Node {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""
|
||||
Connection between the NodeWithFeaturedImage type and the MediaItem type
|
||||
"""
|
||||
@@ -11482,6 +11569,9 @@ type NodeWithFeaturedImageToMediaItemConnectionEdge implements Edge & MediaItemC
|
||||
Content that supports ordering metadata. Includes a menu order field which can be used for custom sorting in navigation menus and other ordered collections.
|
||||
"""
|
||||
interface NodeWithPageAttributes implements Node {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The globally unique ID for the object"""
|
||||
id: ID!
|
||||
|
||||
@@ -11495,6 +11585,9 @@ interface NodeWithPageAttributes implements Node {
|
||||
Content that maintains a history of changes. Provides access to previous versions of the content and the ability to restore earlier revisions.
|
||||
"""
|
||||
interface NodeWithRevisions implements Node {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The globally unique ID for the object"""
|
||||
id: ID!
|
||||
|
||||
@@ -11522,6 +11615,9 @@ type NodeWithRevisionsToContentNodeConnectionEdge implements ContentNodeConnecti
|
||||
Content that provides template metadata. The template can help inform how the content is might be structured, styled, and presented to the user.
|
||||
"""
|
||||
interface NodeWithTemplate implements Node {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The globally unique ID for the object"""
|
||||
id: ID!
|
||||
|
||||
@@ -11533,6 +11629,9 @@ interface NodeWithTemplate implements Node {
|
||||
Content with a dedicated title field. The title typically serves as the main heading and identifier for the content.
|
||||
"""
|
||||
interface NodeWithTitle implements Node {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The globally unique ID for the object"""
|
||||
id: ID!
|
||||
|
||||
@@ -11610,6 +11709,9 @@ type Page implements ContentNode & DatabaseIdentifier & HierarchicalContentNode
|
||||
"""The globally unique identifier of the author of the node"""
|
||||
authorId: ID
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""
|
||||
Connection between the HierarchicalContentNode type and the ContentNode type
|
||||
"""
|
||||
@@ -12063,6 +12165,9 @@ type Plugin implements Node {
|
||||
"""URI for the related author(s)/company website."""
|
||||
authorUri: String
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Description of the plugin."""
|
||||
description: String
|
||||
|
||||
@@ -12191,6 +12296,9 @@ type Post implements ContentNode & DatabaseIdentifier & MenuItemLinkable & Node
|
||||
"""The globally unique identifier of the author of the node"""
|
||||
authorId: ID
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Connection between the Post type and the category type"""
|
||||
categories(
|
||||
"""
|
||||
@@ -12581,6 +12689,9 @@ interface PostConnectionPageInfo implements PageInfo & WPPageInfo {
|
||||
A standardized classification system for content presentation styles. These formats can be used to display content differently based on type, such as "standard", "gallery", "video", etc.
|
||||
"""
|
||||
type PostFormat implements DatabaseIdentifier & Node & TermNode & UniformResourceIdentifiable {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Connection between the PostFormat type and the ContentNode type"""
|
||||
contentNodes(
|
||||
"""
|
||||
@@ -14068,6 +14179,9 @@ type Project implements ContentNode & DatabaseIdentifier & MenuItemLinkable & No
|
||||
last: Int
|
||||
): ProjectToProjectConnection @deprecated(reason: "This content type is not hierarchical and typically will not have ancestors")
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Connection between the ContentNode type and the ContentType type"""
|
||||
contentType: ContentNodeToContentTypeConnectionEdge
|
||||
|
||||
@@ -14321,6 +14435,9 @@ type Project implements ContentNode & DatabaseIdentifier & MenuItemLinkable & No
|
||||
|
||||
"""The ProjectCategory type"""
|
||||
type ProjectCategory implements DatabaseIdentifier & Node & TermNode & UniformResourceIdentifiable {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Connection between the ProjectCategory type and the ContentNode type"""
|
||||
contentNodes(
|
||||
"""
|
||||
@@ -15397,6 +15514,9 @@ type Representation implements ContentNode & DatabaseIdentifier & Node & NodeWit
|
||||
last: Int
|
||||
): RepresentationToRepresentationConnection @deprecated(reason: "This content type is not hierarchical and typically will not have ancestors")
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Connection between the ContentNode type and the ContentType type"""
|
||||
contentType: ContentNodeToContentTypeConnectionEdge
|
||||
|
||||
@@ -15857,6 +15977,9 @@ type Resource implements ContentNode & DatabaseIdentifier & Node & NodeWithExcer
|
||||
last: Int
|
||||
): ResourceToResourceConnection @deprecated(reason: "This content type is not hierarchical and typically will not have ancestors")
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Connection between the ContentNode type and the ContentType type"""
|
||||
contentType: ContentNodeToContentTypeConnectionEdge
|
||||
|
||||
@@ -16110,6 +16233,9 @@ type Resource implements ContentNode & DatabaseIdentifier & Node & NodeWithExcer
|
||||
|
||||
"""The ResourceCategory type"""
|
||||
type ResourceCategory implements DatabaseIdentifier & Node & TermNode & UniformResourceIdentifiable {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Connection between the ResourceCategory type and the ContentNode type"""
|
||||
contentNodes(
|
||||
"""
|
||||
@@ -21632,6 +21758,9 @@ type Settings {
|
||||
}
|
||||
|
||||
type SiteOptions implements AcfOptionsPage & Node & WithAcfGroupCcat {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Fields of the GroupCcat ACF Field Group"""
|
||||
groupCcat: GroupCcat
|
||||
|
||||
@@ -21652,6 +21781,9 @@ type SiteOptions implements AcfOptionsPage & Node & WithAcfGroupCcat {
|
||||
A taxonomy term used to organize and classify content. Tags do not have a hierarchy and are generally used for more specific classifications.
|
||||
"""
|
||||
type Tag implements DatabaseIdentifier & MenuItemLinkable & Node & TermNode & UniformResourceIdentifiable {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Connection between the Tag type and the ContentNode type"""
|
||||
contentNodes(
|
||||
"""
|
||||
@@ -22116,6 +22248,9 @@ type TagToTaxonomyConnectionEdge implements Edge & OneToOneConnection & Taxonomy
|
||||
|
||||
"""A taxonomy object"""
|
||||
type Taxonomy implements Node {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""List of Content Types associated with the Taxonomy"""
|
||||
connectedContentTypes(
|
||||
"""
|
||||
@@ -22403,6 +22538,9 @@ type Template implements ContentNode & DatabaseIdentifier & Node & NodeWithRevis
|
||||
last: Int
|
||||
): TemplateToTemplateConnection @deprecated(reason: "This content type is not hierarchical and typically will not have ancestors")
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""Connection between the ContentNode type and the ContentType type"""
|
||||
contentType: ContentNodeToContentTypeConnectionEdge
|
||||
|
||||
@@ -22816,6 +22954,9 @@ type TemplateToTemplateConnectionPageInfo implements PageInfo & TemplateConnecti
|
||||
Base interface for taxonomy terms such as categories and tags. Terms are used to organize and classify content.
|
||||
"""
|
||||
interface TermNode implements Node & UniformResourceIdentifiable {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The number of objects connected to the object"""
|
||||
count: Int
|
||||
|
||||
@@ -23086,6 +23227,9 @@ type Theme implements Node {
|
||||
"""
|
||||
authorUri: String
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""
|
||||
The description of the theme. This field is equivalent to WP_Theme->get( "Description" ).
|
||||
"""
|
||||
@@ -23178,6 +23322,9 @@ interface ThemeConnectionPageInfo implements PageInfo & WPPageInfo {
|
||||
An interface for content that can be accessed via a unique URI/URL path. Implemented by content types that have their own permalinks.
|
||||
"""
|
||||
interface UniformResourceIdentifiable implements Node {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The globally unique ID for the object"""
|
||||
id: ID!
|
||||
|
||||
@@ -24296,6 +24443,9 @@ type User implements Commenter & DatabaseIdentifier & Node & UniformResourceIden
|
||||
size: Int = 96
|
||||
): Avatar
|
||||
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""
|
||||
User metadata option name. Usually it will be "wp_capabilities".
|
||||
"""
|
||||
@@ -24709,6 +24859,9 @@ enum UserNodeIdTypeEnum {
|
||||
|
||||
"""A user role object"""
|
||||
type UserRole implements Node {
|
||||
"""Breadcrumb navigation items for this content"""
|
||||
breadcrumbs: [BreadcrumbItem]
|
||||
|
||||
"""The capabilities that belong to this role"""
|
||||
capabilities: [String]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user