Commit 142b772a authored by Dave Lane's avatar Dave Lane

starting to make this a distributable theme. Also added a new 'purple' colour scheme

parent ea5d6064
......@@ -7,3 +7,5 @@ This is for noting down things we need to do with this theme.
- tune help information depending on modal context (e.g. Login, Register, or Update/Logout)
- make the enter key do the right thing (submitting the form via the highlighted button)
- we should probably enable the email verification workflow for new Wordpress accounts generated via the registration process.
Update 2019: much of this ambiguity has been extracted from the default theme by the OERu's [Register Enrol plugin](https://git.oeru.org/oeru/register-enrol) although it doesn't fix what in this theme, it just bypasses it, rendering it irrelevant.
......@@ -12,7 +12,7 @@ add_action( 'wp_install', 'oeru_theme_defaults' );
function oeru_theme_menu_default() {
if(!get_option("oeru_theme_menu_create")){
require_once("inc/theme_guidance.php");
$menu_id = oeru_theme_create_menu();
if($menu_id == false){
......@@ -24,7 +24,7 @@ function oeru_theme_menu_default() {
$locations['primary'] = $menu_id;
set_theme_mod('nav_menu_locations', $locations);
add_option("oeru_theme_menu_create", "true");
}
}
......@@ -47,24 +47,24 @@ add_action( 'widgets_init', 'oeru_theme_widgets_init' );
function oeru_theme_setup() {
if(!get_option("oeru_course_colour_profile_setup")){
require_once("inc/install_profile.php");
add_option("oeru_course_colour_profile_setup", "true");
}
load_theme_textdomain( 'oeru_theme', get_template_directory() . '/languages' );
add_theme_support( 'post-thumbnails' );
$chargs = array(
'width' => 980,
'height' => 150,
'uploads' => true,
);
add_theme_support( 'custom-header', $chargs );
set_post_thumbnail_size( 672, 372, true );
register_nav_menus( array(
......@@ -74,7 +74,7 @@ function oeru_theme_setup() {
add_theme_support( 'html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
) );
}
add_action( 'after_setup_theme', 'oeru_theme_setup' );
......@@ -83,14 +83,14 @@ function oeru_theme_add_category(){
'cat_name' => "Front Page Featured",
'category_description' => "Items to feature on the front page",
'category_nicename' => "front-page",
'taxonomy' => 'category'
'taxonomy' => 'category'
);
wp_insert_term("Front Page", "category", $catarr);
}
add_action( 'after_setup_theme', 'oeru_theme_add_category' );
function oeru_theme_scripts_and_styles() {
wp_enqueue_style( 'wordpress-oeru-theme-bootstrap', get_template_directory_uri() . '/css/bootstrap.css', array(), '1' );
wp_enqueue_style( 'wordpress-oeru-theme-font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), '1' );
wp_enqueue_style( 'wordpress-oeru-theme-layout', get_template_directory_uri() . '/css/layout.css', array(), '1' );
......@@ -99,7 +99,7 @@ function oeru_theme_scripts_and_styles() {
wp_enqueue_style( 'wordpress-oeru-theme-core-alter', get_template_directory_uri() . '/css/oeru_theme_core_alter.css', array(), '1' );
wp_enqueue_style( 'wordpress-oeru-theme-jquery-ui', get_template_directory_uri() . '/css/jquery-ui.min.css', array(), '1' );
wp_enqueue_style( 'wordpress-oeru-theme-open-sans-font', '//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,800,700,600&subset=latin,greek-ext,greek,cyrillic,latin-ext,vietnamese,cyrillic-ext', array(), '1' );
wp_enqueue_script( 'wordpress-oeru_theme-bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '20131205', true );
if ( get_theme_mod( 'swipe' ) === 'on' ) {
wp_enqueue_script( 'wordpress-oeru_theme-swipe', get_template_directory_uri() . '/js/jquery.touchSwipe.min.js', array('jquery'), '20131205', true );
......@@ -208,7 +208,7 @@ function oeru_login_response($a) {
function oeru_login() {
check_ajax_referer('oeru_user_nonce', 'security');
$blogid = get_current_blog_id();
$bdo = (isset($_POST['do'])) ? $_POST['do'] : '';
switch ($bdo) {
......@@ -369,7 +369,7 @@ function add_user_blog_column( $columns ) {
unset( $columns['role'] );
unset( $columns['posts'] );
return $columns;
}
}
add_filter( 'manage_users_columns', 'add_user_blog_column' );
function add_blog_column_data( $v = '', $column_name, $user_id ) {
......@@ -420,4 +420,3 @@ require_once("inc/icon_set.php");
//Add analytics configuration
require_once("inc/analytics.php");
......@@ -572,10 +572,6 @@ function oeru_login() {
foreach($meta as $k => $v) {
update_user_meta($user_id, $k, $v);
}
// update Mautic - moved to Mautic plug-in!
//require_once 'mautic-api-library/lib/MauticApi.php';
//$oeru_config = parse_ini_file('config/oeru_course.conf');
// end of Mautic stuff
oeru_login_response(array(
'registered' => true,
'result' => 'Registered, redirecting...'
......
This diff is collapsed.
screenshot.png

48.2 KB | W: | H:

screenshot.png

227 KB | W: | H:

screenshot.png
screenshot.png
screenshot.png
screenshot.png
  • 2-up
  • Swipe
  • Onion skin
/*
Theme Name: OERu Course Theme
Author: Pgogy Webstuff
Theme URI: https://git.oeru.org/oeru/oeru_course
Author: Pgogy Webstuff, and more recently, Dave Lane (OER Foundation)
Author URI: http://pgogywebstuff.com
Description: Open Class Theme for the OERu
Version: 0.9.4
Description: Open Class Theme for the OERu, updated to comply with WordPress theme review requirements https://make.wordpress.org/themes/handbook/review/
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: fixed-layout, responsive-layout, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, full-width-template, rtl-language-support, sticky-post, theme-options
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment