Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 35ec8f2

Browse files
committed
Merge branch 'staging' into develop
2 parents 690a6ba + f5cd638 commit 35ec8f2

25 files changed

+22
-987
lines changed

api/frontend/wp/comments/mutationAddComment.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const mutationAddComment = gql`
1818
postId: $postId,
1919
content: $content
2020
) @rest(type: "Comments", path: "${wpDataEndpoints.postComment}?{args}") {
21+
success
2122
comment {
2223
${commentsFields}
2324
}

api/wordpress/_global/getPostTypeArchive.js

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,19 @@
11
import {initializeWpApollo} from '../connector'
22
import queryPostsArchive from '../posts/queryPostsArchive'
33
import {postTypes} from './postTypes'
4-
import queryEventsArchive from '../events/queryEventsArchive'
5-
import queryCareersArchive from '../careers/queryCareersArchive'
6-
import queryServicesArchive from '../services/queryServicesArchive'
74
import queryTeamsArchive from '../teams/queryTeamsArchive'
8-
import queryPortfoliosArchive from '../portfolios/queryPortfoliosArchive'
9-
import queryTestimonialsArchive from '../testimonials/queryTestimonialsArchive'
105
import formatDefaultSeoData from '@/functions/formatDefaultSeoData'
116
import getMenus from '../menus/getMenus'
127

138
// Define SEO for archives.
149
export const archiveSeo = {
15-
career: {
16-
title: 'Careers',
17-
description: ''
18-
},
19-
event: {
20-
title: 'Events',
21-
description: ''
22-
},
23-
portfolio: {
24-
title: 'Portfolio',
25-
description: ''
26-
},
2710
post: {
2811
title: 'Blog',
2912
description: ''
3013
},
31-
service: {
32-
title: 'Services',
33-
description: ''
34-
},
3514
team: {
3615
title: 'Team Members',
3716
description: ''
38-
},
39-
testimonial: {
40-
title: 'Testimonials',
41-
description: ''
4217
}
4318
}
4419

@@ -64,13 +39,8 @@ export default async function getPostTypeArchive(
6439
) {
6540
// Define single post query based on post type.
6641
const postTypeQuery = {
67-
career: queryCareersArchive,
68-
event: queryEventsArchive,
69-
portfolio: queryPortfoliosArchive,
7042
post: queryPostsArchive,
71-
service: queryServicesArchive,
72-
team: queryTeamsArchive,
73-
testimonial: queryTestimonialsArchive
43+
team: queryTeamsArchive
7444
}
7545

7646
// Retrieve post type query.

api/wordpress/_global/getPostTypeById.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
import queryPostById from '../posts/queryPostById'
22
import queryPageById from '../pages/queryPageById'
33
import {isHierarchicalPostType} from './postTypes'
4-
import queryEventById from '../events/queryEventById'
5-
import queryCareerById from '../careers/queryCareerById'
6-
import queryServiceById from '../services/queryServiceById'
74
import queryTeamById from '../teams/queryTeamById'
8-
import queryPortfolioById from '../portfolios/queryPortfolioById'
9-
import queryTestimonialById from '../testimonials/queryTestimonialById'
105
import processPostTypeQuery from './processPostTypeQuery'
116

127
/**
@@ -27,14 +22,9 @@ export default async function getPostTypeById(
2722
) {
2823
// Define single post query based on post type.
2924
const postTypeQuery = {
30-
career: queryCareerById,
31-
event: queryEventById,
3225
page: queryPageById,
33-
portfolio: queryPortfolioById,
3426
post: queryPostById,
35-
service: queryServiceById,
36-
team: queryTeamById,
37-
testimonial: queryTestimonialById
27+
team: queryTeamById
3828
}
3929

4030
// Check if post type is hierarchical.

api/wordpress/_global/postCommentToPost.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export default async function postCommentToPost(
3636
// Set up return object.
3737
const response = {
3838
apolloClient,
39+
success: false,
3940
comment: null
4041
}
4142

@@ -61,6 +62,7 @@ export default async function postCommentToPost(
6162
return null
6263
}
6364

65+
response.success = data.createComment.success
6466
response.comment = data.createComment.comment
6567
})
6668
.catch((error) => {

api/wordpress/_global/postTypes.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
// Define valid WP post types (singular and plural GraphQL names).
22
export const postTypes = {
3-
career: {
4-
pluralName: 'careers',
5-
route: 'careers'
6-
},
73
comment: {
84
pluralName: 'comments',
95
route: null
106
},
11-
event: {
12-
pluralName: 'events',
13-
route: 'events'
14-
},
157
mediaItem: {
168
pluralName: 'mediaItems',
179
route: null
@@ -20,25 +12,13 @@ export const postTypes = {
2012
pluralName: 'pages',
2113
route: ''
2214
},
23-
portfolio: {
24-
pluralName: 'portfolios',
25-
route: 'portfolio'
26-
},
2715
post: {
2816
pluralName: 'posts',
2917
route: 'blog'
3018
},
31-
service: {
32-
pluralName: 'services',
33-
route: 'service'
34-
},
3519
team: {
3620
pluralName: 'teams',
3721
route: 'team'
38-
},
39-
testimonial: {
40-
pluralName: 'testimonials',
41-
route: 'testimonial'
4222
}
4323
}
4424

api/wordpress/careers/queryCareerById.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

api/wordpress/careers/queryCareersArchive.js

Lines changed: 0 additions & 46 deletions
This file was deleted.

api/wordpress/comments/mutationCommentToPost.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const mutationCommentToPost = gql`
1919
content: $content
2020
}
2121
) {
22+
success
2223
comment {
2324
${commentsFields}
2425
}

api/wordpress/events/queryEventById.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

api/wordpress/events/queryEventsArchive.js

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)