Skip to content

Instantly share code, notes, and snippets.

View bernhardkaindl's full-sized avatar

Bernhard Kaindl bernhardkaindl

View GitHub Profile
@bernhardkaindl
bernhardkaindl / single-course.php
Created July 13, 2023 16:12 — forked from creativeartbd/single-course.php
Tutor LMS - Hide the content as well as the topic list for password protected course. So, go to wp-content/plugins/tutor/templates/single-course.php file and then replace all the code by this gist code.
<?php
/**
* Template for displaying single course
*
* @since v.1.0.0
*
* @author Themeum
* @url https://themeum.com
*
* @package TutorLMS/Templates
<?php /* Template Name: Tutor Advanced Course Filter */?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css">
<style>
:root{--tutor-major-color:#008CC9;--tutor-hover-color:#006fa0;--tutor-heading-color:#2A3235;--tutor-text-color:#6F7F86;--tutor-success-button-color:var(--tutor-major-color)}.tutor-sidebar-filter .single-filter{margin-bottom:25px;color:var(--tutor-heading-color)}.tutor-sidebar-filter .single-filter:last-child{margin-bottom:0}.tutor-course-col .tutor-course .tutor-loop-rating-wrap.no-rating .tutor-star-rating-group{color:#ddd}.tutor-sidebar-filter .single-filter label{display:block;cursor:pointer;transition:.3s}.tutor-sidebar-filter .single-filter label:hover{color:var(--tutor-major-color)}.tutor-sidebar-filter .single-filter label input{display:none}.tutor-sidebar-filter .single-filter label .filter-checkbox{height:17px;width:

Prepare CentOS 7.0 Server for LearningLocker (v1) LRS

Assumptions:

  • CentOS 7.0 x64 is installed (default install from DigitalOcean Droplet Manager)
  • Logged in via ssh key with root privileges
  • Using MongoDB as database

Install Remi Collet Repository:

yum install epel-release
@bernhardkaindl
bernhardkaindl / record-custom-post-type-in-buddyPress-activity.php
Created June 20, 2023 22:47 — forked from charleslouis/record-custom-post-type-in-buddyPress-activity.php
php - wordpress - buddy press - record custom post type in activity
/*============================================================
= record custom post types in activity =
============================================================*/
add_action( 'save_post', 'record_activity', 10, 2 );
function record_activity( $post_id, $post, $user_id = false ) {
global $bp, $wpdb;
$post_id = (int)$post_id;