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 wpi_s2_payment_notification() { | |
if ( !empty( $_GET['yourauthenticationtoken']) && 'yes' === $_GET['yourauthenticationtoken'] ) { | |
// in the URL, I have '?yourauthenticationtoken=yes', that's what I'm looking for here. | |
// make sure the request comes from a valid user | |
if ( !empty( $_GET['user_id'] ) ) { | |
// Load the user data for the new license | |
$user_id = (integer) esc_attr( $_GET['user_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
function wpi_s2_cancellation_notification() { | |
if ( !empty( $_GET['yourauthenticationtoken']) && 'yes' === $_GET['yourauthenticationtoken'] ) { | |
// in the URL, I have '?yourauthenticationtoken=yes', that's what I'm looking for here. | |
// Only process requests for valid users | |
if ( !empty( $_GET['user_id'] ) ) { | |
$user_id = (integer) esc_attr( $_GET['user_id'] ); | |
$user = new WP_User($user_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
function wpi_check_with_license_server() { | |
$license = get_option( 'youroptionfield' ); | |
$api_params = array( | |
'slm_action' => 'slm_check', | |
'secret_key' => VALIDATION_KEY, | |
'license_key' => $license, | |
); | |
// Send query to the license manager server |
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
This is my gist content. Just a test :) |
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
/** | |
* BLOCK: wpmastery-code-block | |
* | |
* Registering a basic block with Gutenberg. | |
* Simple block, renders and saves the same content without any interactivity. | |
*/ | |
// Import CSS. | |
import './style.scss'; | |
import './editor.scss'; |
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
#! /usr/bin/bash | |
NAME=$1 | |
TYPE=$2 | |
echo "Creating the repository" | |
gh re --browser false --new "$NAME" --type "$TYPE" | |
mkdir "$NAME" | |
cd "$NAME" |
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
#! /usr/bin/bash | |
NAME=$1 | |
TYPE=$2 | |
echo "Creating the repository" | |
gh re --browser false --new "$NAME" --type "$TYPE" | |
mkdir "$NAME" | |
cd "$NAME" |
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
version: '3.2' | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: on-failure | |
environment: | |
# Grab this data from wp-config.php | |
# TODO: Update DB_HOST in wp-config.php to "db:port" |
OlderNewer