Skip to content

Commit 3f156b8

Browse files
Merge pull request #74 from MITLibraries/lm149
Add custom post type plugins for News site
2 parents bda7f8e + acb5bef commit 3f156b8

39 files changed

+1891
-5
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,14 @@ web/app/plugins/*
7878
!web/app/plugins/mitlib-multisearch-widget
7979
!web/app/plugins/mitlib-pending-posts
8080
!web/app/plugins/mitlib-plugin-canary
81+
!web/app/plugins/mitlib-post-bibliotechs
8182
!web/app/plugins/mitlib-post-events
8283
!web/app/plugins/mitlib-post-exhibits
8384
!web/app/plugins/mitlib-post-experts
8485
!web/app/plugins/mitlib-post-locations
86+
!web/app/plugins/mitlib-post-site-news
87+
!web/app/plugins/mitlib-post-site-parent
88+
!web/app/plugins/mitlib-post-spotlights
8589
!web/app/plugins/mitlib-pull-events
8690
!web/app/plugins/mitlib-pull-hours
8791

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"key": "group_54dd062c123b5-2",
3+
"title": "Subtitle (Bibliotech)",
4+
"fields": [
5+
{
6+
"key": "field_54b54d9262fa8",
7+
"label": "Subtitle",
8+
"name": "subtitle",
9+
"type": "text",
10+
"instructions": "",
11+
"required": 0,
12+
"conditional_logic": 0,
13+
"wrapper": {
14+
"width": "",
15+
"class": "",
16+
"id": ""
17+
},
18+
"default_value": "",
19+
"placeholder": "",
20+
"prepend": "",
21+
"append": "",
22+
"formatting": "html",
23+
"maxlength": "",
24+
"readonly": 0,
25+
"disabled": 0
26+
}
27+
],
28+
"location": [
29+
[
30+
{
31+
"param": "post_type",
32+
"operator": "==",
33+
"value": "bibliotech"
34+
}
35+
]
36+
],
37+
"menu_order": 1,
38+
"position": "acf_after_title",
39+
"style": "seamless",
40+
"label_placement": "top",
41+
"instruction_placement": "label",
42+
"hide_on_screen": [
43+
"permalink",
44+
"excerpt",
45+
"custom_fields",
46+
"discussion",
47+
"comments",
48+
"revisions",
49+
"slug",
50+
"author",
51+
"format",
52+
"featured_image",
53+
"send-trackbacks"
54+
],
55+
"active": true,
56+
"description": "Add a subtitle to Bibliotech records",
57+
"show_in_rest": false
58+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"key": "group_54dd062c4f33d",
3+
"title": "Bibliotech Author",
4+
"fields": [
5+
{
6+
"key": "field_54b8223f87188",
7+
"label": "Bilbiotech author",
8+
"name": "bauthor",
9+
"type": "text",
10+
"instructions": "This field will be displayed as the author if it is filled out, if it is left blank then the author will be the logged in user that is creating the post.",
11+
"required": 0,
12+
"conditional_logic": 0,
13+
"wrapper": {
14+
"width": "",
15+
"class": "",
16+
"id": ""
17+
},
18+
"default_value": "",
19+
"placeholder": "",
20+
"prepend": "",
21+
"append": "",
22+
"formatting": "html",
23+
"maxlength": "",
24+
"readonly": 0,
25+
"disabled": 0
26+
}
27+
],
28+
"location": [
29+
[
30+
{
31+
"param": "post_type",
32+
"operator": "==",
33+
"value": "bibliotech"
34+
},
35+
{
36+
"param": "current_user_role",
37+
"operator": "==",
38+
"value": "super_admin"
39+
}
40+
],
41+
[
42+
{
43+
"param": "post_type",
44+
"operator": "==",
45+
"value": "bibliotech"
46+
},
47+
{
48+
"param": "current_user_role",
49+
"operator": "==",
50+
"value": "administrator"
51+
}
52+
]
53+
],
54+
"menu_order": 6,
55+
"position": "normal",
56+
"style": "seamless",
57+
"label_placement": "top",
58+
"instruction_placement": "label",
59+
"hide_on_screen": [
60+
"permalink",
61+
"the_content",
62+
"excerpt",
63+
"custom_fields",
64+
"discussion",
65+
"comments",
66+
"revisions",
67+
"slug",
68+
"author",
69+
"format",
70+
"featured_image",
71+
"categories",
72+
"tags",
73+
"send-trackbacks"
74+
],
75+
"active": true,
76+
"description": "News site: Add a field for article author to Bibliotech records - visible only for admins and above",
77+
"show_in_rest": false
78+
}
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
{
2+
"key": "group_54dd062c59653-2",
3+
"title": "Surrogate images (Bibliotech)",
4+
"fields": [
5+
{
6+
"key": "field_549485f7cbb49",
7+
"label": "Grid view long top image",
8+
"name": "featuredListImg",
9+
"type": "image_crop",
10+
"instructions": "This image is for the homepage and should be the exact dimensions 662px width by 256px height",
11+
"required": 0,
12+
"conditional_logic": 0,
13+
"wrapper": {
14+
"width": "",
15+
"class": "",
16+
"id": ""
17+
},
18+
"crop_type": "hard",
19+
"target_size": "news-feature",
20+
"width": "662px",
21+
"height": "256px",
22+
"preview_size": "full",
23+
"force_crop": "yes",
24+
"save_in_media_library": "yes",
25+
"retina_mode": "no",
26+
"save_format": "url",
27+
"library": "all"
28+
},
29+
{
30+
"key": "field_549489d7cbb4b",
31+
"label": "Libraries homepage image",
32+
"name": "homeImg",
33+
"type": "image_crop",
34+
"instructions": "This image is for the homepage and should be the exact dimensions 113px width by 206px height",
35+
"required": 0,
36+
"conditional_logic": 0,
37+
"wrapper": {
38+
"width": "",
39+
"class": "",
40+
"id": ""
41+
},
42+
"crop_type": "hard",
43+
"target_size": "news-home",
44+
"width": "",
45+
"height": "",
46+
"preview_size": "full",
47+
"force_crop": "yes",
48+
"save_in_media_library": "yes",
49+
"retina_mode": "no",
50+
"save_format": "url",
51+
"library": "all"
52+
},
53+
{
54+
"key": "field_54cfa8ab5b6f2",
55+
"label": "Grid view regular box image",
56+
"name": "listImg",
57+
"type": "image_crop",
58+
"instructions": "This image is for the news homepage and should be the exact dimensions 323px width by 111px height",
59+
"required": 0,
60+
"conditional_logic": 0,
61+
"wrapper": {
62+
"width": "",
63+
"class": "",
64+
"id": ""
65+
},
66+
"crop_type": "hard",
67+
"target_size": "news-listing",
68+
"width": "",
69+
"height": "",
70+
"preview_size": "full",
71+
"force_crop": "yes",
72+
"save_in_media_library": "yes",
73+
"retina_mode": "no",
74+
"save_format": "url",
75+
"library": "all"
76+
}
77+
],
78+
"location": [
79+
[
80+
{
81+
"param": "post_type",
82+
"operator": "==",
83+
"value": "bibliotech"
84+
},
85+
{
86+
"param": "current_user_role",
87+
"operator": "==",
88+
"value": "super_admin"
89+
}
90+
],
91+
[
92+
{
93+
"param": "post_type",
94+
"operator": "==",
95+
"value": "bibliotech"
96+
},
97+
{
98+
"param": "current_user_role",
99+
"operator": "==",
100+
"value": "administrator"
101+
}
102+
],
103+
],
104+
"menu_order": 7,
105+
"position": "normal",
106+
"style": "seamless",
107+
"label_placement": "top",
108+
"instruction_placement": "label",
109+
"hide_on_screen": [
110+
"permalink",
111+
"excerpt",
112+
"custom_fields",
113+
"discussion",
114+
"comments",
115+
"revisions",
116+
"slug",
117+
"author",
118+
"format",
119+
"featured_image",
120+
"categories",
121+
"tags",
122+
"send-trackbacks"
123+
],
124+
"active": true,
125+
"description": "Add fields for specifically-sized images when Bibliotech records are promoted - visible only to admins and above",
126+
"show_in_rest": false
127+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"key": "group_54dd062c84904-2",
3+
"title": "Featured Article flag (Bibliotech)",
4+
"fields": [
5+
{
6+
"key": "field_5474bef390af8",
7+
"label": "Featured Article on News Page",
8+
"name": "featuredArticle",
9+
"type": "radio",
10+
"instructions": "Should this be featured on the front page of the news?",
11+
"required": 0,
12+
"conditional_logic": 0,
13+
"wrapper": {
14+
"width": "",
15+
"class": "",
16+
"id": ""
17+
},
18+
"choices": {
19+
"false": "Should not display on homepage",
20+
"True": "Feature on homepage"
21+
},
22+
"other_choice": 0,
23+
"save_other_choice": 0,
24+
"default_value": "false : Should not display on homepage",
25+
"layout": "vertical",
26+
"allow_null": 0,
27+
"return_format": "value"
28+
}
29+
],
30+
"location": [
31+
[
32+
{
33+
"param": "current_user_role",
34+
"operator": "==",
35+
"value": "super_admin"
36+
},
37+
{
38+
"param": "post_type",
39+
"operator": "==",
40+
"value": "bibliotech"
41+
}
42+
],
43+
[
44+
{
45+
"param": "current_user_role",
46+
"operator": "==",
47+
"value": "administrator"
48+
},
49+
{
50+
"param": "post_type",
51+
"operator": "==",
52+
"value": "bibliotech"
53+
}
54+
]
55+
],
56+
"menu_order": 2000,
57+
"position": "normal",
58+
"style": "seamless",
59+
"label_placement": "top",
60+
"instruction_placement": "label",
61+
"hide_on_screen": "",
62+
"active": true,
63+
"description": "Add a flag to promote news site content (Bibliotech) to parent site front page - visible only to admins and above",
64+
"show_in_rest": false
65+
}

0 commit comments

Comments
 (0)