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 / crowd-funding-option-panel-redirection-url
Created December 9, 2021 16:19
crowd funding option panel url redirection URL not saving issue
/plugins/wp-crowdfunding/settings/tabs/Tab_General.php
01. Need to add this code and replace with 112 to 118 line
array(
'id' => 'wpcf_redurl',
'type' => 'text',
'value' => ! empty( get_option( 'wpcf_redurl' ) ) ? absint( get_option( 'wpcf_redurl' ) ) : esc_url( home_url( '/' ) ),
'label' => __('Redirect URL for User Registration Success','wp-crowdfunding'),
),
@ibrahim-kardi
ibrahim-kardi / wpml css loading issue
Created December 17, 2021 09:05
classes-> assets.php
if(tutor_utils()->is_tutor_frontend_dashboard()) {
wp_enqueue_style('tutor-frontend-dashboard-css', tutor()->url . 'assets/css/tutor-frontend-dashboard.min.css', tutor()->version);
}
It will enable the auto-check for creating an account.
add_filter('woocommerce_create_account_default_checked' , function ($checked){
return true;
});
@ibrahim-kardi
ibrahim-kardi / login-shortcode
Created March 3, 2022 15:40
use this [login_lms]
add_shortcode( 'login_lms', 'lms_shortcode' );
function lmscodes_init(){
function lms_shortcode() {
if(tutils()->get_option('disable_tutor_native_login')) {
// Refer to login oage
header('Location: '.wp_login_url($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']));
exit;
}
<?php
/**
* Class Email Notification
*
* @package TUTOR
*
* @since v.1.0.0
*/
<?php
include("simple_html_dom.php");
$html = file_get_html('https://www.laundrycare.biz/locations/');
echo $html ->find('.container .location-state-list-container',0)->innertext;
@ibrahim-kardi
ibrahim-kardi / hide student menu for instructor
Created August 25, 2022 14:51
instructor not able to see regular bar
$user = wp_get_current_user();
if ( !in_array( 'tutor_instructor', (array) $user->roles ) ) {
$nav_items = apply_filters( 'tutor_dashboard/nav_items', $this->default_menus() );
}
else{
$nav_items=[];
}
@ibrahim-kardi
ibrahim-kardi / elementor-extensions.php
Created March 8, 2023 15:30
for theme elementor widgets loader
//elementor includes
include get_template_directory() . '/includes/elements/elementor-extensions.php';
<?php
namespace WPC;
class Widget_Loader
{
<?php
/**
* @author none
* @since 1.0
* @version 1.0
*/
namespace WPC\Widgets;
@ibrahim-kardi
ibrahim-kardi / multi-image
Last active March 8, 2023 15:36
multi-image.php view
<div class="multi-image-container">
<div class="multi-image">
<?php if ($data['multis']) :
foreach ($data['multis'] as $singleimg) :
$image = wp_get_attachment_image_url($singleimg['multi_image']['id'], $data['thumbnail_size']);
if (!$image) {