Skip to content

Commit d65d200

Browse files
Merge pull request #104 from creativecommons/cert-groups
add course-group, and relevant course-index, course-page contexts, templates, stylings
2 parents 88b55c8 + a38eec0 commit d65d200

10 files changed

+742
-0
lines changed

src/footer-course_embed.php

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- <footer>
2+
3+
</footer> -->
4+
5+
<script src="<?php echo get_bloginfo( 'template_directory' ); ?>/vocabulary/js/vocabulary.js"></script>
6+
7+
<?php wp_footer(); ?>
8+
</body>
9+
</html>

src/functions.php

+8
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,14 @@ function person_disable_redirect_canonical($redirect_url) {
277277
return $redirect_url;
278278
}
279279

280+
// register custom embedded URL parameter for course-page template
281+
282+
add_action('init','add_embedded');
283+
function add_embedded() {
284+
global $wp;
285+
$wp->add_query_var('embedded');
286+
}
287+
280288
// remove edit_post_link from non-editors
281289
function remove_get_edit_post_link( $link ) {
282290
if ( current_user_can( 'edit_posts' ) ) {

src/header-course_embed.php

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html lang="en-US">
3+
<head>
4+
5+
<title><?php wp_title('-',true,'right'); //this requires YOAST SEO plugin to be active to output ?></title>
6+
7+
<meta charset="UTF-8">
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
<link rel="icon" href="<?php echo get_bloginfo( 'template_directory' ); ?>/vocabulary/favicon/favicon.ico" sizes="any" />
10+
<link rel="icon" href="<?php echo get_bloginfo( 'template_directory' ); ?>/vocabulary/favicon/favicon.svg" type="image/svg+xml" />
11+
<link rel="manifest" href="<?php echo get_bloginfo( 'template_directory' ); ?>/vocabulary/favicon/manifest.webmanifest" />
12+
<link rel="apple-touch-icon" sizes="180x180" href="<?php echo get_bloginfo( 'template_directory' ); ?>/vocabulary/favicon/apple-touch-icon.png" />
13+
14+
<link rel="stylesheet" media="all" href="<?php echo get_bloginfo( 'template_directory' ); ?>/style.css" />
15+
16+
<?php wp_head(); ?>
17+
</head>
18+
19+
<body class="<?php echo $args['body-classes']; ?>">
20+
<a class="skip-to-content" href="#main-content-marker">Skip to content</a>
21+
22+
<!-- <header>
23+
24+
<h1>CC Thing</h1>
25+
26+
</header> -->
27+
28+
<span id="main-content-marker"></span>
+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"key": "group_67cb243b2be03",
3+
"title": "Course Settings",
4+
"fields": [
5+
{
6+
"key": "field_67cb243bce2b1",
7+
"label": "Course Content",
8+
"name": "course_content",
9+
"aria-label": "",
10+
"type": "relationship",
11+
"instructions": "",
12+
"required": 0,
13+
"conditional_logic": 0,
14+
"wrapper": {
15+
"width": "",
16+
"class": "",
17+
"id": ""
18+
},
19+
"post_type": [
20+
"course_group"
21+
],
22+
"post_status": [
23+
"publish"
24+
],
25+
"taxonomy": "",
26+
"filters": [
27+
"search"
28+
],
29+
"return_format": "object",
30+
"min": "",
31+
"max": "",
32+
"allow_in_bindings": 0,
33+
"elements": "",
34+
"bidirectional": 0,
35+
"bidirectional_target": []
36+
}
37+
],
38+
"location": [
39+
[
40+
{
41+
"param": "post_type",
42+
"operator": "==",
43+
"value": "course"
44+
}
45+
]
46+
],
47+
"menu_order": 0,
48+
"position": "normal",
49+
"style": "default",
50+
"label_placement": "top",
51+
"instruction_placement": "label",
52+
"hide_on_screen": "",
53+
"active": false,
54+
"description": "",
55+
"show_in_rest": 0,
56+
"modified": 1741639646
57+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"key": "post_type_67cb1ed68c270",
3+
"title": "Courses",
4+
"menu_order": 0,
5+
"active": true,
6+
"post_type": "course",
7+
"advanced_configuration": true,
8+
"import_source": "",
9+
"import_date": "",
10+
"labels": {
11+
"name": "Courses",
12+
"singular_name": "Course",
13+
"menu_name": "Courses",
14+
"all_items": "All Courses",
15+
"edit_item": "Edit Course Item",
16+
"view_item": "View Course Item",
17+
"view_items": "View Courses",
18+
"add_new_item": "Add New Course Item",
19+
"add_new": "Add New Item",
20+
"new_item": "New Course",
21+
"parent_item_colon": "Parent Course:",
22+
"search_items": "Search Courses",
23+
"not_found": "No courses found",
24+
"not_found_in_trash": "No courses found in Trash",
25+
"archives": "Course Archives",
26+
"attributes": "Course Attributes",
27+
"featured_image": "",
28+
"set_featured_image": "",
29+
"remove_featured_image": "",
30+
"use_featured_image": "",
31+
"insert_into_item": "Insert into course",
32+
"uploaded_to_this_item": "Uploaded to this course",
33+
"filter_items_list": "Filter courses list",
34+
"filter_by_date": "Filter courses by date",
35+
"items_list_navigation": "Courses list navigation",
36+
"items_list": "Courses list",
37+
"item_published": "Course published.",
38+
"item_published_privately": "Course published privately.",
39+
"item_reverted_to_draft": "Course reverted to draft.",
40+
"item_scheduled": "Course scheduled.",
41+
"item_updated": "Course updated.",
42+
"item_link": "Course Link",
43+
"item_link_description": "A link to a course."
44+
},
45+
"description": "",
46+
"public": true,
47+
"hierarchical": true,
48+
"exclude_from_search": false,
49+
"publicly_queryable": true,
50+
"show_ui": true,
51+
"show_in_menu": true,
52+
"admin_menu_parent": "",
53+
"show_in_admin_bar": true,
54+
"show_in_nav_menus": true,
55+
"show_in_rest": true,
56+
"rest_base": "",
57+
"rest_namespace": "wp\/v2",
58+
"rest_controller_class": "WP_REST_Posts_Controller",
59+
"menu_position": "",
60+
"menu_icon": {
61+
"type": "dashicons",
62+
"value": "dashicons-book-alt"
63+
},
64+
"rename_capabilities": false,
65+
"singular_capability_name": "post",
66+
"plural_capability_name": "posts",
67+
"supports": [
68+
"title",
69+
"editor",
70+
"page-attributes",
71+
"thumbnail",
72+
"custom-fields"
73+
],
74+
"taxonomies": "",
75+
"has_archive": false,
76+
"has_archive_slug": "",
77+
"rewrite": {
78+
"permalink_rewrite": "post_type_key",
79+
"with_front": "1",
80+
"feeds": "0",
81+
"pages": "1"
82+
},
83+
"query_var": "post_type_key",
84+
"query_var_name": "",
85+
"can_export": true,
86+
"delete_with_user": false,
87+
"register_meta_box_cb": "",
88+
"enter_title_here": "",
89+
"modified": 1741639547
90+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"key": "post_type_67cb1f862d318",
3+
"title": "Course Units",
4+
"menu_order": 0,
5+
"active": false,
6+
"post_type": "course_unit",
7+
"advanced_configuration": true,
8+
"import_source": "",
9+
"import_date": "",
10+
"labels": {
11+
"name": "Course Units",
12+
"singular_name": "Course Unit",
13+
"menu_name": "Course Units",
14+
"all_items": "Units",
15+
"edit_item": "Edit Course Unit",
16+
"view_item": "View Course Unit",
17+
"view_items": "View Course Unites",
18+
"add_new_item": "Add New Course Unit",
19+
"add_new": "Add New Course Unit",
20+
"new_item": "New Course Unit",
21+
"parent_item_colon": "Parent Course Unit:",
22+
"search_items": "Search Course Unites",
23+
"not_found": "No course unites found",
24+
"not_found_in_trash": "No course unites found in Trash",
25+
"archives": "Course Unit Archives",
26+
"attributes": "Course Unit Attributes",
27+
"featured_image": "",
28+
"set_featured_image": "",
29+
"remove_featured_image": "",
30+
"use_featured_image": "",
31+
"insert_into_item": "Insert into course unit",
32+
"uploaded_to_this_item": "Uploaded to this course unit",
33+
"filter_items_list": "Filter course unites list",
34+
"filter_by_date": "Filter course unites by date",
35+
"items_list_navigation": "Course Unites list navigation",
36+
"items_list": "Course Unites list",
37+
"item_published": "Course Unit published.",
38+
"item_published_privately": "Course Unit published privately.",
39+
"item_reverted_to_draft": "Course Unit reverted to draft.",
40+
"item_scheduled": "Course Unit scheduled.",
41+
"item_updated": "Course Unit updated.",
42+
"item_link": "Course Unit Link",
43+
"item_link_description": "A link to a course unit."
44+
},
45+
"description": "",
46+
"public": true,
47+
"hierarchical": false,
48+
"exclude_from_search": false,
49+
"publicly_queryable": true,
50+
"show_ui": true,
51+
"show_in_menu": true,
52+
"admin_menu_parent": "edit.php?post_type=course",
53+
"show_in_admin_bar": true,
54+
"show_in_nav_menus": false,
55+
"show_in_rest": true,
56+
"rest_base": "",
57+
"rest_namespace": "wp\/v2",
58+
"rest_controller_class": "WP_REST_Posts_Controller",
59+
"menu_position": -2,
60+
"menu_icon": "",
61+
"rename_capabilities": false,
62+
"singular_capability_name": "post",
63+
"plural_capability_name": "posts",
64+
"supports": [
65+
"title",
66+
"editor",
67+
"thumbnail",
68+
"custom-fields"
69+
],
70+
"taxonomies": "",
71+
"has_archive": false,
72+
"has_archive_slug": "",
73+
"rewrite": {
74+
"permalink_rewrite": "post_type_key",
75+
"with_front": "1",
76+
"feeds": "0",
77+
"pages": "1"
78+
},
79+
"query_var": "post_type_key",
80+
"query_var_name": "",
81+
"can_export": true,
82+
"delete_with_user": false,
83+
"register_meta_box_cb": "",
84+
"enter_title_here": "",
85+
"modified": 1741366034
86+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"key": "post_type_67cb2064ad042",
3+
"title": "Course Chapters",
4+
"menu_order": 0,
5+
"active": false,
6+
"post_type": "course_chapter",
7+
"advanced_configuration": true,
8+
"import_source": "",
9+
"import_date": "",
10+
"labels": {
11+
"name": "Course Chapters",
12+
"singular_name": "Course Chapter",
13+
"menu_name": "Course Chapters",
14+
"all_items": "Chapters",
15+
"edit_item": "Edit Course Chapter",
16+
"view_item": "View Course Chapter",
17+
"view_items": "View Course Chapters",
18+
"add_new_item": "Add New Course Chapter",
19+
"add_new": "Add New Course Chapter",
20+
"new_item": "New Course Chapter",
21+
"parent_item_colon": "Parent Course Chapter:",
22+
"search_items": "Search Course Chapters",
23+
"not_found": "No course chapters found",
24+
"not_found_in_trash": "No course chapters found in Trash",
25+
"archives": "Course Chapter Archives",
26+
"attributes": "Course Chapter Attributes",
27+
"featured_image": "",
28+
"set_featured_image": "",
29+
"remove_featured_image": "",
30+
"use_featured_image": "",
31+
"insert_into_item": "Insert into course chapter",
32+
"uploaded_to_this_item": "Uploaded to this course chapter",
33+
"filter_items_list": "Filter course chapters list",
34+
"filter_by_date": "Filter course chapters by date",
35+
"items_list_navigation": "Course Chapters list navigation",
36+
"items_list": "Course Chapters list",
37+
"item_published": "Course Chapter published.",
38+
"item_published_privately": "Course Chapter published privately.",
39+
"item_reverted_to_draft": "Course Chapter reverted to draft.",
40+
"item_scheduled": "Course Chapter scheduled.",
41+
"item_updated": "Course Chapter updated.",
42+
"item_link": "Course Chapter Link",
43+
"item_link_description": "A link to a course chapter."
44+
},
45+
"description": "",
46+
"public": true,
47+
"hierarchical": false,
48+
"exclude_from_search": false,
49+
"publicly_queryable": true,
50+
"show_ui": true,
51+
"show_in_menu": true,
52+
"admin_menu_parent": "edit.php?post_type=course",
53+
"show_in_admin_bar": true,
54+
"show_in_nav_menus": false,
55+
"show_in_rest": true,
56+
"rest_base": "",
57+
"rest_namespace": "wp\/v2",
58+
"rest_controller_class": "WP_REST_Posts_Controller",
59+
"menu_position": 10,
60+
"menu_icon": "",
61+
"rename_capabilities": false,
62+
"singular_capability_name": "post",
63+
"plural_capability_name": "posts",
64+
"supports": [
65+
"title",
66+
"editor",
67+
"thumbnail",
68+
"custom-fields"
69+
],
70+
"taxonomies": "",
71+
"has_archive": false,
72+
"has_archive_slug": "",
73+
"rewrite": {
74+
"permalink_rewrite": "post_type_key",
75+
"with_front": "1",
76+
"feeds": "0",
77+
"pages": "1"
78+
},
79+
"query_var": "post_type_key",
80+
"query_var_name": "",
81+
"can_export": true,
82+
"delete_with_user": false,
83+
"register_meta_box_cb": "",
84+
"enter_title_here": "",
85+
"modified": 1741366031
86+
}

0 commit comments

Comments
 (0)