This file contains 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 | |
// Get wordpress upload folder directory | |
function get_upload_folder_path(){ | |
$current_user = wp_get_current_user(); | |
$upload_dir = wp_upload_dir(); | |
$uploads_folder = $upload_dir['basedir']; // Path to wordpress uploads folder | |
return $uploads_folder; | |
} | |
?> |
This file contains 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
// Custom scrolling bar for select | |
// Solution for no scroll in MAC browsers | |
<html> | |
<head> | |
<style> | |
.frame::-webkit-scrollbar { | |
-webkit-appearance: none; | |
} |
This file contains 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
jQuery(document).ready(function($) { | |
var divBodyConfig = { | |
selector: '.tinymce-body', | |
menubar: false, | |
inline: true, | |
plugins: [ | |
'link', | |
'textcolor', | |
'lists', | |
// 'powerpaste', |
This file contains 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 | |
// Change email titles (Email template name in Woocommerce Settings Admin) | |
// woocommerce -> settings -> emails | |
add_filter( 'woocommerce_email_title', 'change_woocommerce_email_title', 10, 2 ); | |
function change_woocommerce_email_title( $email_title, $email ){ | |
$domain = "woocommerce"; // The text domain |
This file contains 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 | |
/* To add custom field in order review table in checkout page, you will have to use some of the hooks listed below. | |
do_action( 'woocommerce_review_order_before_cart_contents' ); | |
do_action( 'woocommerce_review_order_after_cart_contents' ); | |
do_action( 'woocommerce_review_order_before_shipping' ); | |
do_action( 'woocommerce_review_order_after_shipping' ); | |
do_action( 'woocommerce_review_order_before_order_total' ); | |
do_action( 'woocommerce_review_order_after_order_total' ); |
This file contains 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
NB : Node should be installed | |
Installing grunt CLI globally | |
* npm install -g grunt-cli | |
Go to project folder and enter | |
* npm install grunt --save-dev | |
Install the modules required |
This file contains 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 custom_wc_translations( $translated_text, $text, $domain ) { | |
if(is_checkout()){ | |
switch ($translated_text) { | |
case 'Replaceble_text' : | |
$translated_text = __('String to Replace', 'Domain'); | |
break; | |
} | |
} | |
return $translated_text; |
This file contains 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 | |
// Content jumping when scroll bar is introduced | |
<div class="outer-wrapper"> | |
<div class="inner-wrapper"> | |
<div> | |
// Contents that affects overflow here | |
</div> | |
</div> | |
</div> |
This file contains 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
<html> | |
<form id="sample_form" name="sample-form"> | |
<p> | |
<label>Name</label><br> | |
<input value="Melvin Stanly" type="text"> | |
</p> | |
<p> | |
<label>File</label><br> | |
<input id="example-file" type="file"> | |
</p> |
This file contains 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
Color picker won't appear when clicked, if it is inside a scrollable div. | |
Also when colorpicker is opened and scrolled, the colorpicker also get scrolled. | |
The solution to fix this is to add `position:relative` to the parent div in which input field, span(colorpicker preview) and | |
div(iris-picker iris-border). |
OlderNewer