- 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
| /*============================================================ | |
| = 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; |
| <?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: |
| <?php | |
| /** | |
| * Template for displaying single course | |
| * | |
| * @since v.1.0.0 | |
| * | |
| * @author Themeum | |
| * @url https://themeum.com | |
| * | |
| * @package TutorLMS/Templates |
| /* | |
| On the Enrolled Course page, You can see all the enrolled courses, right? Now, if you click on the title of the course you will be redirected to the course page. | |
| Okay, but if you want to redirect the user to the first lesson of any course then what? Well, use this code: | |
| Go to wp-content/plugins/tutor/templates/dashboard/enrolled-courses.php at line number 39. Here you can see this code: | |
| */ | |
| $custom_url = home_url($post->post_type.'/'.$post->post_name); |
| <?php | |
| get_header(); | |
| get_template_part('lib/sub-header'); ?> | |
| <div class="<?php tutor_container_classes() ?>"> | |
| <div class="tutor-archive"> | |
| <?php | |
| $course_filter = (bool) tutor_utils()->get_option('course_archive_filter', false); | |
| $supported_filters = tutor_utils()->get_option('supported_course_filters', array()); | |
| | |
| if ($course_filter && count($supported_filters)) { |
| add_filter('tutor_courses_base_slug', 'change_tutor_course_slug'); | |
| /** | |
| * @param $slug | |
| * @return string | |
| */ | |
| if ( ! function_exists('change_tutor_course_slug')){ | |
| function change_tutor_course_slug($slug){ | |
| $slug = 'example-course-slug'; | |
| return $slug; |
| Disable vim automatic visual mode on mouse select | |
| issue: :set mouse-=a | |
| add to ~/.vimrc: set mouse-=a | |
| my ~/.vimrc for preserving global defaults and only changing one option: | |
| source $VIMRUNTIME/defaults.vim | |
| set mouse-=a |
WSL2 uses Hyper-V for networking. The WSL2 network settings are ephemeral and configured on demand when any WSL2 instance is first started in a Windows session. The configuration is reset on each Windows restart and the IP addresses change each time. The Windows host creates a hidden switch named "WSL" and a network adapter named "WSL" (appears as "vEthernet (WSL)" in the "Network Connections" panel). The Ubuntu instance creates a corresponding network interface named "eth0".
Assigning static IP addresses to the network interfaces on the Windows host or the WSL2 Ubuntu instance enables support for the following scenarios: