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 | |
/** | |
* This code works to update addon/extension plugin slugs during update from a premapped list. | |
* | |
* Code likely needs to be run in separate plugin/theme/mu-plugin/drop-in. | |
* | |
* Tested Working On: | |
* - Single Site: Updates Page - Singe Plugin. |
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 | |
/** | |
* Assumptions: | |
* - Form ID is #28 | |
* - Page ID is 406200 | |
* - Fields include radio for reason & extra details where needed. | |
*/ | |
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: EDD Software Licensing Endpoint | |
* Plugin URI: https://github.com/Frosty-Media/edd-sl-api-endpoint | |
* Description: Endpoint for Easy Digital Downloads Software Licensing add-on. | |
* Version: 1.0.1 | |
* License: GPL version 2 or any later version | |
* Author: Danny van Kooten | |
* Author URI: https://github.com/dannyvankooten/ | |
*/ |
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 | |
function get_custom_email_template() { | |
ob_start(); | |
include __DIR__ . '/index.php'; | |
$content = ob_get_clean(); | |
ob_end_clean(); | |
return $content; | |
} |
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
import domReady from '@wordpress/dom-ready'; | |
import { render } from '@wordpress/element'; | |
import { | |
createRegistry, | |
RegistryProvider, | |
useSelect | |
} from '@wordpress/data'; | |
import { store as coreStore } from '@wordpress/core-data'; |
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( 'edd_update_discount', 'edd_perpetual_discounts_add_meta' ); | |
add_filter( 'edd_insert_discount', 'edd_perpetual_discounts_add_meta' ); | |
add_action( 'edd_edit_discount_form_before_use_once', 'edd_perpetual_discounts_setting', 10, 2 ); | |
add_filter( 'edd_get_option_recurring_one_time_discounts', 'edd_perpetual_discounts_discounts' ); | |
function edd_perpetual_discounts_add_meta( $meta ) { | |
$meta['use_renewals'] = 0; |
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 game library #> | |
$dir = dir "D:\Game Libraries\Steam Library\steamapps\common\" | ?{$_.PSISContainer}; | |
<# Mapped network drive / destination path. #> | |
$nasPath = "G:\Steam Library\steamapps\common"; | |
$log = "E:\gamecopy.log"; | |
Remove-Item $log; | |
$dir | ForEach-Object { |
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 | |
/** | |
* Extract shortcodes from content. | |
* | |
* @param string $content Content containing shortcodes. | |
* | |
* @return array Array of shortcodes found. | |
*/ | |
function get_shortcodes_from_content( $content ) { |
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( 'edd_sl_is_site_active', 'your_namespace_is_site_active_auto_activate_site', 10, 3 ); | |
/** | |
* Allow active licenses to get updates if they're not at the limit, no matter what. | |
* | |
* @param false $is_active | |
* @param int $license_id | |
* @param string $passed_site_url |
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( 'wp_enqueue_scripts', 'custom_force_pm_asset_caching', 11 ); | |
function custom_force_pm_asset_caching() { | |
wp_deregister_script( 'popup-maker-site' ); | |
$cached = get_option( 'pum-has-cached-js' ); | |
if ( ! $cached ) { | |
PUM_AssetCache::cache_js(); | |
$cached = get_option( 'pum-has-cached-js' ); |
NewerOlder