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
/** | |
* Webpack Config. | |
* | |
* This configuration is a fork of the config that comes with the block editor scripts. | |
*/ | |
/** | |
* External dependencies | |
*/ | |
const { BundleAnalyzerPlugin } = require( 'webpack-bundle-analyzer' ); |
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 | |
/* | |
* Any URL that refers an inactive affiliate will be redirected to the 404 page. | |
* | |
* @since 1.0.0 | |
*/ | |
add_action( 'template_redirect', function() { | |
global $wp_query; | |
// Return early if not using AffiliateWP. |
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/env bash | |
# =================================================================================================== | |
# Script to set up a WordPress test environment for add-ons that requires other plugins as dependencies. | |
# Note that this uses Composer to install the dependencies, so each dependent plugin must have Composer | |
# Configured properly in-order for this tool to install the dependencies properly. | |
# | |
# Ultimately, this is a modified version of the default shell script that is obtained with wp-cli's | |
# wp scaffold plugin-tests command. It has been updated to include steps that will install composer | |
# dependencies inside of the test environment's plugin directory. |
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/env bash | |
apt-get update && apt-get install -y openssh-server | |
sed -i "/service mysql start/aservice ssh start" /etc/scripts/startup.sh | |
echo "root:root" | chpasswd | |
sed -i "s/PermitRootLogin without-password/PermitRootLogin yes/" /etc/ssh/sshd_config | |
echo "ssh update complete. You may now restart Local" |
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
#tooltip { | |
border-radius: 100%; | |
border: 1px solid; | |
display: inline-block; | |
width: 20px; | |
height: 20px; | |
position:relative; | |
vertical-align:-6px; | |
margin-left:5px; | |
transition:all 0.1s ease-in-out; |
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 | |
/** | |
* Calculates the time needed to run the specified function. | |
* @param $function string The callback to run. | |
* @param $function_args array Array of arguments to pass. | |
* @param int $number_of_times int The number of times this function should run. | |
* @return array containing the following information for each benchmark: | |
* $benchmark_time float The amount of time this benchmark took to run | |
* $total_time float The total amount of time it has taken to run this function |
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_filter( 'wp_is_large_network', '__return_false' ); | |
/** | |
* Calculates the time needed to run the specified function. | |
* @param $function string The callback to run. | |
* @param $args array Array of arguments to pass. | |
* @param int $number_of_times int The number of times this function should run. | |
* @return mixed | |
*/ |
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 | |
/** | |
* Keeps the referral var when wp_redirect is used. | |
*/ | |
function affwpsupport_keep_referral_var_on_wp_redirect( $location, $status ) { | |
if ( function_exists( 'affiliate_wp' ) ) { | |
// Get the referral variable being used in AffiliateWP. | |
$referral_var = affiliate_wp()->tracking->get_referral_var(); | |
if ( $_GET[ $referral_var ] ) { | |
// Append the referral variable and value to the URL after the redirect. |
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 | |
/** | |
* Keeps the referral var when wp_redirect is used. | |
*/ | |
function affwpsupport_keep_referral_var_on_wp_redirect( $location, $status ) { | |
if ( function_exists( 'affiliate_wp' ) ) { | |
// Get the referral variable being used in AffiliateWP. | |
$referral_var = affiliate_wp()->tracking->get_referral_var(); |
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
javascript:(function(){ | |
style = document.createElement('style'); | |
style.classList.add('outline-everything-with-red'); | |
style.appendChild(document.createTextNode('@media screen and ( min-width: 768px ) { | |
.edit-post-visual-editor .editor-post-title, | |
.edit-post-visual-editor .editor-block-list__block { | |
max-width: 1100px; | |
} | |
} | |
.edit-post-visual-editor .editor-block-list__block[data-align="wide"] { |