Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ web/app/plugins/*
!web/app/plugins/mitlib-post-events
!web/app/plugins/mitlib-post-exhibits
!web/app/plugins/mitlib-post-experts
!web/app/plugins/mitlib-post-interviewees
!web/app/plugins/mitlib-post-interviews
!web/app/plugins/mitlib-post-locations
!web/app/plugins/mitlib-post-site-news
!web/app/plugins/mitlib-post-site-parent
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
"wpackagist-plugin/redirection": "^5.3",
"wpackagist-plugin/seamless-sticky-custom-post-types": "^1.4",
"wpackagist-plugin/shortcode-variables": "^4.0",
"wpackagist-plugin/tablepress": "^1.14",
"wpackagist-plugin/tinymce-advanced": "^5.6",
"wpackagist-plugin/ultimate-posts-widget": "^2.2",
"wpackagist-plugin/what-the-file": "^1.6",
Expand Down
20 changes: 1 addition & 19 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
<exclude-pattern>web/app/plugins/seamless-sticky-custom-post-types</exclude-pattern>
<exclude-pattern>web/app/plugins/shortcode-variables</exclude-pattern>
<exclude-pattern>web/app/plugins/slideshow-gallery</exclude-pattern>
<exclude-pattern>web/app/plugins/tablepress</exclude-pattern>
<exclude-pattern>web/app/plugins/tinymce-advanced</exclude-pattern>
<exclude-pattern>web/app/plugins/types</exclude-pattern>
<exclude-pattern>web/app/plugins/ultimate-posts-widget</exclude-pattern>
Expand Down
218 changes: 218 additions & 0 deletions web/app/mu-plugins/mitlib-post/data/interview/group_643050c28b8ca.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
{
"key": "group_643050c28b8ca",
"title": "Interview",
"fields": [
{
"key": "field_6435b30eba933",
"label": "Interviewee",
"name": "interviewee",
"type": "relationship",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"post_type": [
"interviewee"
],
"taxonomy": "",
"filters": [
"search",
"post_type",
"taxonomy"
],
"elements": "",
"min": "",
"max": "",
"return_format": "object"
},
{
"key": "field_643050f9aeb4e",
"label": "Audio (MP3)",
"name": "audio",
"type": "url",
"instructions": "The audio file in MP3 format.",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": ""
},
{
"key": "field_6430519832e29",
"label": "Transcript (PDF)",
"name": "transcript",
"type": "file",
"instructions": "The transcript of the audio file in PDF format.",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"return_format": "url",
"library": "all",
"min_size": "",
"max_size": "",
"mime_types": "pdf"
},
{
"key": "field_643051ccc7d85",
"label": "CD available in library",
"name": "cd",
"type": "text",
"instructions": "Lets the user know that the CD is available in the MIT Libraries.",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_643051e4c7d86",
"label": "Print transcript available in library",
"name": "print",
"type": "text",
"instructions": "Lets the user know the transcript is available in the MIT Libraries.",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_64308ffa709e9",
"label": "YouTube Video ID",
"name": "youtube-id",
"type": "text",
"instructions": "The ID of the YouTube video to be used",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_64309010709ea",
"label": "3Play Transcript ID",
"name": "3play-id",
"type": "text",
"instructions": "The ID of the 3Play transcript that matches the video",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_64309034709eb",
"label": "Interview chapters",
"name": "chapters",
"type": "repeater",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"collapsed": "",
"min": 0,
"max": 0,
"layout": "table",
"button_label": "",
"sub_fields": [
{
"key": "field_64309266beaba",
"label": "Chapter",
"name": "chapter",
"type": "text",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_643092abbeabb",
"label": "Time",
"name": "time",
"type": "time_picker",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"display_format": "g:i:s",
"return_format": "g:i:s"
}
]
}
],
"location": [
[
{
"param": "post_type",
"operator": "==",
"value": "interview"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"hide_on_screen": "",
"active": true,
"description": "",
"show_in_rest": 0
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"key": "group_643063071d212",
"title": "Interviewee",
"fields": [
{
"key": "field_6430633a34d39",
"label": "Last Name",
"name": "sort-name",
"type": "text",
"instructions": "Put the last name of the Interviewee here. This enables the Index of Interviewees to be sorted by last name.",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_6430635234d3a",
"label": "MIT Affiliation",
"name": "mit-affiliation",
"type": "text",
"instructions": "e.g. Professor of Communications, 1947-1960",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_6430637134d3b",
"label": "Music\/Professional Work",
"name": "music-professional-work",
"type": "text",
"instructions": "e.g. Drummer",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
}
],
"location": [
[
{
"param": "post_type",
"operator": "==",
"value": "interviewee"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"hide_on_screen": "",
"active": true,
"description": "",
"show_in_rest": 0
}
12 changes: 12 additions & 0 deletions web/app/plugins/mitlib-post-interviewees/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# MITlib Post Interviewees

This defines an Interviewee custom post type, extending the Base class provided
by Mitlib Post. The original content type was defined via CPT-onomies, with the
fields defined using Toolset Types. This setup was then migrated to Mitlib Post
and ACF in 2023.

The Interviewee post type is referenced by the Interview post type, and also
includes a few controlled vocabularies to group Interviewee records.

The fields for this post type are defined in a JSON file that can be found in
the Mitlib Post data folder.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
/**
* Plugin Name: MITlib Post Interviewees
* Description: Defines the custom Interviewees post type
* Version: 1.0.0
* Author: MIT Libraries
* License: GPL2
*
* @package MITlib Post Interviewees
* @author MIT Libraries
*/

namespace Mitlib\PostTypes;

// Don't call the file directly!
if ( ! defined( 'ABSPATH' ) ) {
exit;
}

// Require the necessary classes.
require_once( plugin_dir_path( __FILE__ ) . 'src/class-interviewee.php' );

// Register class methods with the WordPress hooks which will call them.
add_action( 'init', array( 'Mitlib\PostTypes\Interviewee', 'define' ) );
add_filter( 'acf/settings/load_json', array( 'Mitlib\PostTypes\Interviewee', 'load_point' ) );
add_filter( 'acf/settings/save_json', array( 'Mitlib\PostTypes\Interviewee', 'save_point' ) );
Loading