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
server { | |
listen 80; | |
listen [::]:80; | |
server_name mysite.local; | |
location / { | |
proxy_pass http://localhost:3000/; | |
} | |
} |
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
# For Normal Theme | |
{ | |
"phpsab.standard": "WordPress", | |
"phpsab.executablePathCBF": "/Users/aslamdoctor/.composer/vendor/bin/phpcbf", | |
"editor.formatOnSave": true, | |
"scss.validate": false, | |
"[javascriptreact]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, |
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 | |
add_action( | |
'init', | |
function() { | |
if ( isset( $_GET['cleanup_spams'] ) ) { | |
global $wpdb; | |
$query = "SELECT * | |
FROM $wpdb->users | |
WHERE user_email LIKE '%.be'"; | |
$users = $wpdb->get_results( $query ); |
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
// Demo: http://jsfiddle.net/xuyp8qb5/ | |
// Note: You need Google Map API Key to run demo; bit.ly/2pBgToW | |
var latlng; | |
latlng = new google.maps.LatLng(40.730885, -73.997383); // New York, US | |
//latlng = new google.maps.LatLng(37.990849233935194, 23.738339349999933); // Athens, GR | |
//latlng = new google.maps.LatLng(48.8567, 2.3508); // Paris, FR | |
//latlng = new google.maps.LatLng(47.98247572667902, -102.49018710000001); // New Town, US | |
//latlng = new google.maps.LatLng(35.44448406385493, 50.99001635390618); // Parand, Tehran, IR | |
//latlng = new google.maps.LatLng(34.66431108560504, 50.89113940078118); // Saveh, Markazi, IR |
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
// Get The Page ID You Need | |
get_option( 'woocommerce_shop_page_id' ); | |
get_option( 'woocommerce_cart_page_id' ); | |
get_option( 'woocommerce_checkout_page_id' ); | |
get_option( 'woocommerce_pay_page_id' ); | |
get_option( 'woocommerce_thanks_page_id' ); | |
get_option( 'woocommerce_myaccount_page_id' ); | |
get_option( 'woocommerce_edit_address_page_id' ); | |
get_option( 'woocommerce_view_order_page_id' ); | |
get_option( 'woocommerce_terms_page_id' ); |
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
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.css" /> | |
<script src="https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.js"></script> | |
<div class="swiper"> | |
<div class="swiper-wrapper"> | |
<div class="swiper-slide"> | |
Slide 1 | |
</div> | |
<div class="swiper-slide"> | |
Slide 2 |
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
<script src="https://cdnjs.cloudflare.com/ajax/libs/Readmore.js/2.0.2/readmore.min.js" integrity="sha512-llWtDR3k09pa9nOBfutQnrS2kIEG7M6Zm7RIjVVLNab1wRs8NUmA0OjAE38jKzKeCg+A3rdq8AVW41ZTsfhu5Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> |
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 | |
class CRUD { | |
protected $conn; | |
protected $tablename = 'MY_DEFAULT_TABLENAME'; | |
function __construct() { | |
$this->conn = new mysqli( 'HOST', 'USERNAME', 'PASSWORD', 'DB_NAME' ); | |
if ( $this->conn->connect_error ) { | |
die( $this->conn->connect_error ); |
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
{ | |
"scripts": { | |
"build": "npm run sass:dev && npm run postcss:build", | |
"dev": "npm run sass:dev && npm run postcss:dev", | |
"watch": "onchange \"assets/scss/**/*.scss\" -- npm run dev", | |
"sass:dev": "sass assets/scss/custom.scss assets/css/custom.css", | |
"postcss:dev": "postcss assets/css/custom.css --use=autoprefixer --output=assets/css/custom.css", | |
"postcss:build": "postcss assets/css/custom.css --use=autoprefixer --use cssnano --output=assets/css/custom.css" | |
}, | |
"browserslist": [ |
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
// Pause video when slick slide changed | |
$('.act-hero-carousel .the-carousel.carousel-1').on( | |
'beforeChange', | |
function (slick, currentSlide, nextSlide) { | |
var player, command; | |
//find the current slide element and decide which player API we need to use. | |
currentSlide = $('.act-hero-carousel .the-carousel.carousel-1').find( | |
'.slick-current' |
NewerOlder