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
{ "keys": ["ctrl+shift+r"], "command": "reindent", "args": {"single_line":false}} | |
prefernces>key binding |
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 | |
"fa-amazon","fa-ambulance","fa-american-sign-language-interpreting","fa-anchor","fa-android","fa-angellist","fa-angle-double-down","fa-angle-double-left","fa-angle-double-right","fa-angle-double-up", | |
"fa-angle-down","fa-angle-left","fa-angle-right","fa-angle-up","fa-apple","fa-archive","fa-area-chart","fa-arrow-circle-down","fa-arrow-circle-left","fa-arrow-circle-o-down","fa-arrow-circle-o-left", | |
"fa-arrow-circle-o-right","fa-arrow-circle-o-up","fa-arrow-circle-right","fa-arrow-circle-up","fa-arrow-down","fa-arrow-left","fa-arrow-right","fa-arrow-up","fa-arrows","fa-arrows-alt","fa-arrows-h", | |
"fa-arrows-v","fa-assistive-listening-systems","fa-asterisk","fa-at","fa-audio-description","fa-backward","fa-balance-scale","fa-ban","fa-bandcamp","fa-bar-chart","fa-barcode","fa-bars","fa-bath", | |
"fa-battery-empty","fa-battery-full","fa-battery-half","fa-battery-quarter","fa-battery-three-quarters","fa-bed","fa-beer","fa-behance","fa-behance-square","fa-bell","fa-bell-o","fa-bell-slash", | |
"fa-bell-slash-o","fa-bic |
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 | |
// Timestamp Convert from date picker | |
$remove_slash_date = explode('/', dd/m/yy); | |
$promo_timestamp = mktime(0, 0, 0, (int)$remove_slash_date[0], (int)$remove_slash_date[1], (int)$remove_slash_date[2]); | |
// Current timestamp from wordpress time admin panel; | |
$current_wp_date = current_time('timestamp'); |
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
<div class="shape-testimonials-left-review"> | |
<div class="row testimonial-masonry-area"> | |
<?php | |
$shae_testimonial_count = $shape_option['shape-testimonial-tesi-count']; | |
if(isset($shae_testimonial_count) && !empty($shae_testimonial_count)) { | |
$shape_tesi_count = $shae_testimonial_count; | |
}else { | |
$shape_tesi_count = -1; | |
} |
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 | |
/* | |
Used for: Output that needs to allow some HTML, but not all tags or attributes. | |
What it does: Strips the content of any tags or attributes that don't match the list of rules passed in. | |
Use wp_kses if there is a context that allows certain tags (e.g. inline formatting tags like <strong> and <em>) to be printed as HTML. | |
A basic example would be displaying comments: |
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
//Active Masonry | |
var $grid_masonry = $('.testimonial-masonry-area').masonry({ | |
itemSelector: '.single-testimonial-masonry', | |
columnWidth: 1 | |
}); | |
var msnry = $grid_masonry.data('masonry'); | |
//Testimonial infinite-scroll js | |
$grid_masonry.infiniteScroll({ |
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('after_setup_theme', 'mytheme_init'); | |
function mytheme_init() { | |
// Check if already saved the activation date & time | |
// to prevent over-writing if user deactive & active theme | |
// multiple time | |
if(!get_option('mytheme_activation_time', false)){ | |
// Generate Current Date & Time in MySQL Date Time Formate | |
$activation_datetime = current_time( 'mysql' ); | |
// Save it in `wp_options` table |
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 | |
/* | |
* Set post views count using post meta | |
*/ | |
function bblack_post_views($postID) { | |
$bblack_key = 'bblack_views'; | |
$bblack_count = get_post_meta($postID, $bblack_key, true); | |
if($bblack_count == '') { |
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 | |
//save theme active time | |
function my_theme_activation_init() { | |
// Check if already saved the activation date & time | |
// to prevent over-writing if user deactive & active theme | |
// multiple time | |
if(!get_option('mytheme_activation_time', false)){ |
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() { | |
$('a[href*="#"]:not([href="#"])').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
$('html, body').animate({ | |
scrollTop: target.offset().top | |
}, 1000); |