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 __get_wp_fusion_auto_applied_discount() | |
{ | |
$user_tags = wpf_get_tags(false, true); | |
$args = [ | |
"post_status" => "active", | |
"meta_query" => [ | |
[ | |
"key" => "wpf_settings", |
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 | |
/** | |
* Check if the current page is the Bricks editor preview. | |
* | |
* @return bool | |
*/ | |
function pm_is_bricks_editor_preview() { | |
// phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
return isset( $_GET['bricks_preview'] ); | |
} |
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 ) { |
NewerOlder