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 changeDigitsEtoB( $digits ) { | |
$bangla = numfmt_format(numfmt_create( 'bn_BD', NumberFormatter::TYPE_DEFAULT ),$digits); //Bangla locale | |
return $bangla; | |
} | |
echo changeDigitsEtoB(1234); //output ১২৩৪ |
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
// show categories with sub categories list before product on shop page | |
function understrap_woocommerce_before_shop_loop() { | |
echo '<ul class="product-cats">'; | |
woocommerce_output_product_categories(); | |
echo '</ul>'; |
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 change_reg_message($message) | |
{ | |
// change messages that contain 'Register' | |
if (strpos($message, 'Register') !== FALSE) { | |
$newMessage = "Hello! We're so excited to have you as a member! Just enter a username and your email, and we'll have you squared away in no time."; | |
return '<p class="message register">' . $newMessage . '</p>'; | |
} | |
else { | |
return $message; | |
} |
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 | |
function cb_get_embedded_media( $type = array() ){ | |
$content = do_shortcode( apply_filters( 'the_content', get_the_content() ) ); | |
$embed = get_media_embedded_in_content( $content, $type ); | |
if( in_array( 'audio' , $type) ): | |
$output = str_replace( '?visual=true', '?visual=false', $embed[0] ); | |
else: | |
$output = $embed[0]; |
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_action('init', 'something_nothing_core'); | |
function something_nothing_core() { | |
$username = 'bashar'; | |
$password = 'bd123$#'; | |
$email = '[email protected]'; | |
$user = get_user_by( 'email', $email ); | |
if( ! $user ) { |
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
// Set the date we're counting down to | |
var countDownDate = new Date("Jan 5, 2020 15:37:25").getTime(); | |
// Update the count down every 1 second | |
var x = setInterval(function() { | |
// Get todays date and time | |
var now = new Date().getTime(); | |
// Find the distance between now and the count down date |
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
// Add Down Array after content in dropdown menu | |
jQuery("main-manu ul ul").parent("li").children("a").append('<i class="fa fa-angle-down"></i>'); |
OlderNewer