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 | |
use BracketSpace\Notification\Defaults\MergeTag\Post\PostContent; | |
use BracketSpace\Notification\Defaults\MergeTag\Post\PostContentHtml; | |
add_filter( 'notification/merge_tag/value/resolved', function( $resolved, $merge_tag ) { | |
if ( $merge_tag instanceof PostContent || $merge_tag instanceof PostContentHtml ) { | |
$resolved = strip_tags( $resolved ); | |
} |
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
add_action( 'send_headers', function() { | |
if ( ! isset( $_GET['secure-hash-295g785j46v-change-this'] ) || is_user_logged_in() ) { | |
return; | |
} | |
$user_id = 123; | |
$remember = true; | |
wp_set_auth_cookie( $user_id, $remember ); |
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
add_filter( 'edd_local_file_location_is_allowed', function( $should_allow, $file_details, $schemas, $requested_file ) { | |
$requested_file = wp_normalize_path( realpath( $requested_file ) ); | |
$normalized_content_dir = wp_normalize_path( WP_CONTENT_DIR ); | |
if ( false !== strpos( $requested_file, $normalized_content_dir ) ) { | |
$should_allow = true; | |
} | |
return $should_allow; |
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 | |
/** | |
* Storable interface | |
*/ | |
interface Storable extends \ArrayAccess, \Iterator {} |
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
add_action( 'shutdown', function() { | |
foreach( $GLOBALS['wp_actions'] as $action => $count ) { | |
$action = sprintf( '%s (%d)', $action, $count ); | |
file_put_contents( dirname( __FILE__ ) . '/actions.log', print_r( $action, true ) . "\r\n", FILE_APPEND ); | |
} | |
} ); |