Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add course-group, and relevant course-index, course-page contexts, templates, stylings #104

Merged
merged 12 commits into from
Mar 18, 2025
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
9 changes: 9 additions & 0 deletions src/footer-course_embed.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- <footer>

</footer> -->

<script src="<?php echo get_bloginfo( 'template_directory' ); ?>/vocabulary/js/vocabulary.js"></script>

<?php wp_footer(); ?>
</body>
</html>
8 changes: 8 additions & 0 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,14 @@ function person_disable_redirect_canonical($redirect_url) {
return $redirect_url;
}

// register custom embedded URL parameter for course-page template

add_action('init','add_embedded');
function add_embedded() {
global $wp;
$wp->add_query_var('embedded');
}

// remove edit_post_link from non-editors
function remove_get_edit_post_link( $link ) {
if ( current_user_can( 'edit_posts' ) ) {
Expand Down
28 changes: 28 additions & 0 deletions src/header-course_embed.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en-US">
<head>

<title><?php wp_title('-',true,'right'); //this requires YOAST SEO plugin to be active to output ?></title>

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="<?php echo get_bloginfo( 'template_directory' ); ?>/vocabulary/favicon/favicon.ico" sizes="any" />
<link rel="icon" href="<?php echo get_bloginfo( 'template_directory' ); ?>/vocabulary/favicon/favicon.svg" type="image/svg+xml" />
<link rel="manifest" href="<?php echo get_bloginfo( 'template_directory' ); ?>/vocabulary/favicon/manifest.webmanifest" />
<link rel="apple-touch-icon" sizes="180x180" href="<?php echo get_bloginfo( 'template_directory' ); ?>/vocabulary/favicon/apple-touch-icon.png" />

<link rel="stylesheet" media="all" href="<?php echo get_bloginfo( 'template_directory' ); ?>/style.css" />

<?php wp_head(); ?>
</head>

<body class="<?php echo $args['body-classes']; ?>">
<a class="skip-to-content" href="#main-content-marker">Skip to content</a>

<!-- <header>

<h1>CC Thing</h1>

</header> -->

<span id="main-content-marker"></span>
57 changes: 57 additions & 0 deletions src/inc/acf-json/group_67cb243b2be03.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"key": "group_67cb243b2be03",
"title": "Course Settings",
"fields": [
{
"key": "field_67cb243bce2b1",
"label": "Course Content",
"name": "course_content",
"aria-label": "",
"type": "relationship",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"post_type": [
"course_group"
],
"post_status": [
"publish"
],
"taxonomy": "",
"filters": [
"search"
],
"return_format": "object",
"min": "",
"max": "",
"allow_in_bindings": 0,
"elements": "",
"bidirectional": 0,
"bidirectional_target": []
}
],
"location": [
[
{
"param": "post_type",
"operator": "==",
"value": "course"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"hide_on_screen": "",
"active": false,
"description": "",
"show_in_rest": 0,
"modified": 1741639646
}
90 changes: 90 additions & 0 deletions src/inc/acf-json/post_type_67cb1ed68c270.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"key": "post_type_67cb1ed68c270",
"title": "Courses",
"menu_order": 0,
"active": true,
"post_type": "course",
"advanced_configuration": true,
"import_source": "",
"import_date": "",
"labels": {
"name": "Courses",
"singular_name": "Course",
"menu_name": "Courses",
"all_items": "All Courses",
"edit_item": "Edit Course Item",
"view_item": "View Course Item",
"view_items": "View Courses",
"add_new_item": "Add New Course Item",
"add_new": "Add New Item",
"new_item": "New Course",
"parent_item_colon": "Parent Course:",
"search_items": "Search Courses",
"not_found": "No courses found",
"not_found_in_trash": "No courses found in Trash",
"archives": "Course Archives",
"attributes": "Course Attributes",
"featured_image": "",
"set_featured_image": "",
"remove_featured_image": "",
"use_featured_image": "",
"insert_into_item": "Insert into course",
"uploaded_to_this_item": "Uploaded to this course",
"filter_items_list": "Filter courses list",
"filter_by_date": "Filter courses by date",
"items_list_navigation": "Courses list navigation",
"items_list": "Courses list",
"item_published": "Course published.",
"item_published_privately": "Course published privately.",
"item_reverted_to_draft": "Course reverted to draft.",
"item_scheduled": "Course scheduled.",
"item_updated": "Course updated.",
"item_link": "Course Link",
"item_link_description": "A link to a course."
},
"description": "",
"public": true,
"hierarchical": true,
"exclude_from_search": false,
"publicly_queryable": true,
"show_ui": true,
"show_in_menu": true,
"admin_menu_parent": "",
"show_in_admin_bar": true,
"show_in_nav_menus": true,
"show_in_rest": true,
"rest_base": "",
"rest_namespace": "wp\/v2",
"rest_controller_class": "WP_REST_Posts_Controller",
"menu_position": "",
"menu_icon": {
"type": "dashicons",
"value": "dashicons-book-alt"
},
"rename_capabilities": false,
"singular_capability_name": "post",
"plural_capability_name": "posts",
"supports": [
"title",
"editor",
"page-attributes",
"thumbnail",
"custom-fields"
],
"taxonomies": "",
"has_archive": false,
"has_archive_slug": "",
"rewrite": {
"permalink_rewrite": "post_type_key",
"with_front": "1",
"feeds": "0",
"pages": "1"
},
"query_var": "post_type_key",
"query_var_name": "",
"can_export": true,
"delete_with_user": false,
"register_meta_box_cb": "",
"enter_title_here": "",
"modified": 1741639547
}
86 changes: 86 additions & 0 deletions src/inc/acf-json/post_type_67cb1f862d318.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"key": "post_type_67cb1f862d318",
"title": "Course Units",
"menu_order": 0,
"active": false,
"post_type": "course_unit",
"advanced_configuration": true,
"import_source": "",
"import_date": "",
"labels": {
"name": "Course Units",
"singular_name": "Course Unit",
"menu_name": "Course Units",
"all_items": "Units",
"edit_item": "Edit Course Unit",
"view_item": "View Course Unit",
"view_items": "View Course Unites",
"add_new_item": "Add New Course Unit",
"add_new": "Add New Course Unit",
"new_item": "New Course Unit",
"parent_item_colon": "Parent Course Unit:",
"search_items": "Search Course Unites",
"not_found": "No course unites found",
"not_found_in_trash": "No course unites found in Trash",
"archives": "Course Unit Archives",
"attributes": "Course Unit Attributes",
"featured_image": "",
"set_featured_image": "",
"remove_featured_image": "",
"use_featured_image": "",
"insert_into_item": "Insert into course unit",
"uploaded_to_this_item": "Uploaded to this course unit",
"filter_items_list": "Filter course unites list",
"filter_by_date": "Filter course unites by date",
"items_list_navigation": "Course Unites list navigation",
"items_list": "Course Unites list",
"item_published": "Course Unit published.",
"item_published_privately": "Course Unit published privately.",
"item_reverted_to_draft": "Course Unit reverted to draft.",
"item_scheduled": "Course Unit scheduled.",
"item_updated": "Course Unit updated.",
"item_link": "Course Unit Link",
"item_link_description": "A link to a course unit."
},
"description": "",
"public": true,
"hierarchical": false,
"exclude_from_search": false,
"publicly_queryable": true,
"show_ui": true,
"show_in_menu": true,
"admin_menu_parent": "edit.php?post_type=course",
"show_in_admin_bar": true,
"show_in_nav_menus": false,
"show_in_rest": true,
"rest_base": "",
"rest_namespace": "wp\/v2",
"rest_controller_class": "WP_REST_Posts_Controller",
"menu_position": -2,
"menu_icon": "",
"rename_capabilities": false,
"singular_capability_name": "post",
"plural_capability_name": "posts",
"supports": [
"title",
"editor",
"thumbnail",
"custom-fields"
],
"taxonomies": "",
"has_archive": false,
"has_archive_slug": "",
"rewrite": {
"permalink_rewrite": "post_type_key",
"with_front": "1",
"feeds": "0",
"pages": "1"
},
"query_var": "post_type_key",
"query_var_name": "",
"can_export": true,
"delete_with_user": false,
"register_meta_box_cb": "",
"enter_title_here": "",
"modified": 1741366034
}
86 changes: 86 additions & 0 deletions src/inc/acf-json/post_type_67cb2064ad042.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"key": "post_type_67cb2064ad042",
"title": "Course Chapters",
"menu_order": 0,
"active": false,
"post_type": "course_chapter",
"advanced_configuration": true,
"import_source": "",
"import_date": "",
"labels": {
"name": "Course Chapters",
"singular_name": "Course Chapter",
"menu_name": "Course Chapters",
"all_items": "Chapters",
"edit_item": "Edit Course Chapter",
"view_item": "View Course Chapter",
"view_items": "View Course Chapters",
"add_new_item": "Add New Course Chapter",
"add_new": "Add New Course Chapter",
"new_item": "New Course Chapter",
"parent_item_colon": "Parent Course Chapter:",
"search_items": "Search Course Chapters",
"not_found": "No course chapters found",
"not_found_in_trash": "No course chapters found in Trash",
"archives": "Course Chapter Archives",
"attributes": "Course Chapter Attributes",
"featured_image": "",
"set_featured_image": "",
"remove_featured_image": "",
"use_featured_image": "",
"insert_into_item": "Insert into course chapter",
"uploaded_to_this_item": "Uploaded to this course chapter",
"filter_items_list": "Filter course chapters list",
"filter_by_date": "Filter course chapters by date",
"items_list_navigation": "Course Chapters list navigation",
"items_list": "Course Chapters list",
"item_published": "Course Chapter published.",
"item_published_privately": "Course Chapter published privately.",
"item_reverted_to_draft": "Course Chapter reverted to draft.",
"item_scheduled": "Course Chapter scheduled.",
"item_updated": "Course Chapter updated.",
"item_link": "Course Chapter Link",
"item_link_description": "A link to a course chapter."
},
"description": "",
"public": true,
"hierarchical": false,
"exclude_from_search": false,
"publicly_queryable": true,
"show_ui": true,
"show_in_menu": true,
"admin_menu_parent": "edit.php?post_type=course",
"show_in_admin_bar": true,
"show_in_nav_menus": false,
"show_in_rest": true,
"rest_base": "",
"rest_namespace": "wp\/v2",
"rest_controller_class": "WP_REST_Posts_Controller",
"menu_position": 10,
"menu_icon": "",
"rename_capabilities": false,
"singular_capability_name": "post",
"plural_capability_name": "posts",
"supports": [
"title",
"editor",
"thumbnail",
"custom-fields"
],
"taxonomies": "",
"has_archive": false,
"has_archive_slug": "",
"rewrite": {
"permalink_rewrite": "post_type_key",
"with_front": "1",
"feeds": "0",
"pages": "1"
},
"query_var": "post_type_key",
"query_var_name": "",
"can_export": true,
"delete_with_user": false,
"register_meta_box_cb": "",
"enter_title_here": "",
"modified": 1741366031
}
Loading