Changeset 1982801
- Timestamp:
- 11/29/2018 07:41:27 PM (7 years ago)
- Location:
- wp-oer/trunk
- Files:
-
- 1 added
- 1 edited
-
oer_template/archive-resource.php (added)
-
open-educational-resources.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-oer/trunk/open-educational-resources.php
r1973228 r1982801 4 4 Plugin URI: https://www.wp-oer.com 5 5 Description: Open Educational Resource management and curation, metadata publishing, and alignment to Common Core State Standards. 6 Version: 0.6. 66 Version: 0.6.7 7 7 Author: Navigation North 8 8 Author URI: https://www.navigationnorth.com … … 11 11 License URI: https://www.gnu.org/licenses/gpl-3.0.html 12 12 13 Copyright (C) 201 7Navigation North13 Copyright (C) 2018 Navigation North 14 14 15 15 This program is free software: you can redistribute it and/or modify … … 37 37 define( 'OER_PLUGIN_NAME', 'WP OER Plugin' ); 38 38 define( 'OER_ADMIN_PLUGIN_NAME', 'WP OER Plugin'); 39 define( 'OER_VERSION', '0.6. 6' );39 define( 'OER_VERSION', '0.6.7' ); 40 40 41 41 include_once(OER_PATH.'includes/oer-functions.php'); … … 279 279 $file = $theme_file; 280 280 } else { 281 $file = OER_PATH . ' /oer_template/' . $template;281 $file = OER_PATH . 'oer_template/' . $template; 282 282 } 283 283 … … 324 324 // Get Current Object if it belongs to Resource Category taxonomy 325 325 $resource_term = get_term_by( 'id' , $_id , 'resource-subject-area' ); 326 326 //var_dump($resource_term); 327 327 //Check if the loaded resource is a category 328 328 if ($resource_term && !is_wp_error( $resource_term )) { … … 354 354 if ($resource_tag && !is_wp_error( $resource_tag )) { 355 355 return oer_get_template_hierarchy('tag-resource'); 356 } elseif (is_post_type_archive('resource')) { 357 return oer_get_template_hierarchy('archive-resource'); 356 358 } else { 357 359 return $template; 358 360 } 361 } 362 363 /** 364 * Add filter to use plugin default archive template 365 **/ 366 add_filter( 'archive_template' , 'oer_custom_archive_template' ); 367 368 /** 369 * Function to choose template for the resource archive 370 **/ 371 function oer_custom_archive_template( $template ) { 372 global $wp_query; 373 374 if (is_post_type_archive('resource')) { 375 $template = realpath(oer_get_template_hierarchy('archive-resource')); 376 } 377 378 return $template; 359 379 } 360 380
Note: See TracChangeset
for help on using the changeset viewer.