Skip to content

Instantly share code, notes, and snippets.

View ibrahim-kardi's full-sized avatar

Mohammad Ibrahim ibrahim-kardi

  • Mirpur, Dhaka -1216,Bangladesh
View GitHub Profile
@ibrahim-kardi
ibrahim-kardi / course-topics.php
Created November 18, 2021 06:41
To disable course first lesson content auto expand,need to override the file or replace the override file content with this, file location wp-content/plugins/tutor/templates/single/course/course-topics.php
<?php
/**
* Template for displaying single course
*
* @since v.1.0.0
*
* @author Themeum
* @url https://themeum.com
*
* @package TutorLMS/Templates
@ibrahim-kardi
ibrahim-kardi / course-price-woocommerce.php
Created November 16, 2021 08:07
defult archive price not showing
<?php
//file path -> plugins/tutor/templates/loop/course-price-woocommerce.php
/**
* Course loop price
*
* @since v.1.0.0
* @author themeum
* @url https://themeum.com
*
.tutor-course-loop-header-meta .tutor-course-wishlist {
z-index: 100;
position: absolute;
right: 6%;
}
## ---- 1. Backend ---- ##
// Adding a custom Meta container to admin products pages
add_action('add_meta_boxes', 'create_custom_meta_box');
if (!function_exists('create_custom_meta_box')) {
function create_custom_meta_box()
{
add_meta_box(
'custom_product_meta_box',
__(' Product Main URL <em>(orginal)</em>', 'cmb'),
function custom_scripts_method() {
/* CSS */
wp_enqueue_style( 'custom-style', home_url('/wp-content/plugins/qubely/assets/css/qubely.bundle.min.css'));
}
add_action( 'wp_enqueue_scripts', 'custom_scripts_method' );
@ibrahim-kardi
ibrahim-kardi / custom meta field in woocommerce product page
Created October 31, 2021 15:27
custom meta field in woocommerce product page
## ---- 1. Backend ---- ##
// Adding a custom Meta container to admin products pages
add_action('add_meta_boxes', 'create_custom_meta_box');
if (!function_exists('create_custom_meta_box')) {
function create_custom_meta_box()
{
add_meta_box(
'custom_product_meta_box',
__(' Product Main URL <em>(orginal)</em>', 'cmb'),
function my_custom_css() {
echo '<style>
.post-type-product #ovaem_sectionid {
display: none !important;
}
</style>';
}
add_action('admin_head', 'my_custom_css' );
@ibrahim-kardi
ibrahim-kardi / filters.php
Last active November 4, 2021 04:48
Need to modify the filters.php file ,here : plugins\tutor\templates\course-filter\filters.php ,added a line in 12 and modified code 58-64
<?php
$filter_object = new \TUTOR\Course_Filter();
// $filter_levels = array(
// 'beginner' => __('Beginner', 'tutor'),
// 'intermediate' => __('Intermediate', 'tutor'),
// 'expert' => __('Expert', 'tutor')
// );
$filter_prices = array(
'free' => __('Free', 'tutor'),
'paid' => __('Paid', 'tutor'),
add_action('after_setup_theme', 'remove_admin_bar');
function remove_admin_bar() {
if (!current_user_can('administrator') && !is_admin()) {
show_admin_bar(false);
}
}
add_action( 'init', 'blockusers_init' ); function blockusers_init() { if ( is_admin() && ! current_user_can( 'administrator' ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { wp_redirect( home_url() ); exit; } }
@ibrahim-kardi
ibrahim-kardi / Ajax.php
Created October 29, 2021 10:02
certificate-language-issue- File path to replace. ~/wp-content/plugins/tutor-lms-certificate-builder/src/Ajax.php
<?php
/**
* Class Ajax
*
* @package Tutor\Certificate\Builder
* @author Themeum <[email protected]>
* @license GPLv2 or later
* @link https://www.themeum.com/product/tutor-lms/
* @since 1.0.0