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
<IfModule mod_deflate.c> | |
# Compress HTML, CSS, JavaScript, Text, XML and fonts | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
AddOutputFilterByType DEFLATE application/x-font | |
AddOutputFilterByType DEFLATE application/x-font-opentype | |
AddOutputFilterByType DEFLATE application/x-font-otf | |
AddOutputFilterByType DEFLATE application/x-font-truetype | |
AddOutputFilterByType DEFLATE application/x-font-ttf |
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
.woocommerce .col2-set .col-1, .woocommerce-page .col2-set .col-1, .woocommerce .col2-set .col-2, .woocommerce-page .col2-set .col-2 { | |
flex: 0 0 100%; | |
max-width: 100%; | |
} | |
/* Woocommerce Styles */ | |
/* | |
A couple things to note... | |
1. This code was written very specifically for my base child theme so it might not work out of the box with every theme. |
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 Term Request. | |
*/ | |
function pixelplus_change_term_request( $query ) { | |
$tax_name = 'product_cat'; // specify you taxonomy name here, it can be also 'category' or 'post_tag' | |
// Request for child terms differs, we should make an additional check | |
if ( $query['attachment'] ) : |
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 | |
/** | |
* Remove custom post type slug from URL. | |
*/ | |
function pdvn_remove_slug( $post_link, $post, $leavename ) { | |
if ( 'product' != $post->post_type || 'publish' != $post->post_status ) { | |
return $post_link; | |
} |
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 | |
/** | |
* TEXT control. | |
*/ | |
$this->add_control( | |
'title', | |
[ | |
'label' => __( 'Title', 'elementor' ), | |
'type' => Controls_Manager::TEXT, | |
'dynamic' => [ |
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
<div class="ncn_form-control">[text* your-name placeholder "Họ và Tên"]</div> | |
<div class="ncn_form-control">[email* your-email placeholder "Email của bạn"]</div> | |
<div class="ncn_form-control">[tel your-phone placeholder "Số điện thoại"]</div> | |
<div class="ncn_form-control">[textarea your-message placeholder "Điền nội dung bạn muốn gửi..."]</div> | |
<div class="ncn_form-submit">[submit "Gửi đi"]</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
> IRB | |
2.2.0: 001> require './math' | |
=> Đúng | |
2.2.0: 002> multiply_by_two 2 | |
=> 4 | |
2.2.0: 003> multiply_by_two -2 | |
=> -4 | |
2.2.0: 004> multiply_by_two | |
ArgumentError: Xin cung cấp một số hợp lệ | |
from /Users/bill/dev/math.rb:3:in 'multiply_by_two' |
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
def multiply_by_two (n = "không có giá trị cung cấp") | |
if (n.is_a? (Integer)) | |
n * 2 | |
khác | |
nâng ArgumentError.new ( "Xin vui lòng cung cấp một số hợp lệ") |
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
2.2.0: 004> multiply_by_two | |
ArgumentError: sai số của đối số (0 trong 1) | |
from /Users/bill/dev/math.rb:1:in 'multiply_by_two' | |
from (IRB): 4 từ /Users/bill/.rvm/rubies/ruby-2.2.0/bin/irb:11:in `main' | |
2.2.0: 005> multiply_by_two "ruby" | |
=> "Rubyruby" | |
2.2.0: 006> multiply_by_two nil | |
NoMethodError: Phương pháp xác định `* 'cho con số không: NilClass | |
from /Users/bill/dev/math.rb:2:in 'multiply_by_two' | |
from (IRB): 6 |
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
> IRB | |
2.2.0: 001> require './math' | |
=> Đúng | |
2.2.0: 002> multiply_by_two 2 | |
=> 4 | |
2.2.0: 003> multiply_by_two -2 | |
=> -4 |