This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('woocommerce_states', 'stylish_woocommerce_states'); | |
function stylish_woocommerce_states($states) { | |
$states['BD'] = array( | |
'BD-05' => 'Bagerhat - বাগেরহাট', | |
'BD-01' => 'Bandarban - বান্দরবান', | |
'BD-02' => 'Barguna - বরগুনা', | |
'BD-06' => 'Barishal - বরিশাল', | |
'BD-07' => 'Bhola - ভোলা', | |
'BD-03' => 'Bogura - বগুড়া', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function qw( $data ) { | |
if ( true === WP_DEBUG ) { | |
$backtrace = debug_backtrace(); | |
$backtrace = array_shift( $backtrace ); | |
$output['backtrace'] = $backtrace['file'] . ':' . $backtrace['line']; | |
$output['data'] = $data; | |
error_log( print_r( $output, true ) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define('DSK_VERSION', '1.1.4'); | |
$cache_buster = DSK_VERSION; | |
if ( defined( 'WP_DEBUG' ) && WP_DEBUG) { | |
$cache_buster = date("YmdHi", filemtime( get_stylesheet_directory() . '/css/main.css')); | |
} | |
function my_scripts_and_styles(){ | |
global $cache_buster; | |
wp_enqueue_style( 'main-style', get_stylesheet_directory_uri() . '/css/main.css', array( 'woodmart-style' ), $cache_buster, 'all' ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const logger = new Proxy((...message) => { | |
console.log(...message); | |
}, { | |
apply(target, thisArg, argumentsList) { | |
const stack = new Error().stack.split('\n').slice(2, 4).join('\n'); | |
console.log('Logger called with arguments:', argumentsList); | |
console.log('Stack Trace:\n', stack); | |
return target(...argumentsList); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function write_log( ...$data ) { | |
if ( true === WP_DEBUG ) { | |
$backtrace = debug_backtrace(); | |
$backtrace = array_shift( $backtrace ); | |
$output['backtrace'] = $backtrace['file'] . ':' . $backtrace['line']; | |
foreach ( $data as $key => $value ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function init() { | |
add_action( 'init', array( __CLASS__, 'trtrtr') ); | |
add_action( 'weweweaaewa', array( __CLASS__, 'rererere') ); | |
add_filter( 'cron_schedules', array( __CLASS__, 'ac_custom_cron_schedules') ); | |
} | |
public static function ac_custom_cron_schedules( $schedules ) { | |
$schedules['every_minute'] = array( | |
'interval' => 60, // 60 সেকেন্ড = 1 মিনিট |
OlderNewer