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
# Source server commands # | |
# Database backup | |
mysqldump -u USER -pPASSWORD DATABASENAME > mydb.sql | |
# Zip all files and database backup | |
zip -r mysite.zip . | |
# Destination server commands # | |
# Download the zip file to the destination | |
wget https://mywebsiteaddress.com/mysite.zip |
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 | |
/** | |
* Plugin Name: [Forminator] - Disable today on datepicker after specific time | |
* Plugin URI: https://wpmudev.com/project/forminator-pro/ | |
* Description: Disable today date selection on the Forminator Datepicker after 8 am. | |
* Author: Fida Al Hasan @ WPMUDEV | |
* Author URI: https://wpmudev.com/ | |
* License: GPLv2 or later | |
*/ |
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
/** | |
* Header Section | |
*/ | |
.wp-elements-6168ec0dc787a297453884a052a8bf6d { | |
background-color: #6FABAC !important; | |
padding-bottom: 30px !important; | |
} | |
.wp-elements-6168ec0dc787a297453884a052a8bf6d .wp-container-3 { | |
padding-top: 10px !important; | |
} |
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 | |
/** | |
* Unique customer ID | |
* | |
* @return string | |
*/ | |
function wpmu_unique_id() { | |
// Get current user object | |
$current_user = wp_get_current_user(); |
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
## Install Tools | |
sudo apt install autoconf libpcre3-dev -y | |
## Define Module Name and Version | |
MODULE_NAME="apcu" | |
MODULE_VERSION="5.1.21" | |
## Download and Unzip Extensions | |
wget https://pecl.php.net/get/$MODULE_NAME-$MODULE_VERSION.tgz | |
tar -zxvf $MODULE_NAME-$MODULE_VERSION.tgz |
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 | |
/** | |
* Migrate data from v2.0.4 to v2.1.0 | |
* | |
* run once | |
*/ | |
function fida_migrate_data() { | |
if ( get_option( 'fida_migrate_data_204' ) < 1 ) { | |
global $wpdb; |
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 | |
// Save referrer url in cookie | |
function set_referrer_cookie() { | |
$cookie_value = $_SERVER['HTTP_REFERER'] ?? null; // Get URL the user came to your site for | |
if ( !is_admin() && !isset($_COOKIE['origin'])) { // If not an admin or if cookie doesn't exist already | |
setcookie( 'origin', $cookie_value, time()+3600*24*30, COOKIEPATH, COOKIE_DOMAIN, false); // Set cookie for 30 days | |
} | |
} |
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 | |
/* | |
* Automatically add a gift product when customer purchase anything. | |
* Use: Add this code in your theme's function.php file | |
*/ | |
function fida_add_gift_product_to_cart() { | |
global $woocommerce; | |
$cart_total = 1; |