This file contains hidden or 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('sanitize_user_meta_magic_login_token', 'filter_sanitize_user_meta_magic_login_token', 10, 1); | |
function filter_sanitize_user_meta_magic_login_token( $meta_value ) { | |
$redirect_to = $_POST['redirect_to'] ?? FALSE; | |
if ( $redirect_to && strpos($redirect_to, '/investor-resources/') > -1 ) { | |
$days = get_field('resource_token_ttl', 'options') ?? 3; | |
This file contains hidden or 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('facetwp_is_main_query', filter_facetwp_is_main_query, 10, 2 ); | |
function filter_facetwp_is_main_query( $is_main_query, $query ) { | |
if ( 'template' == $query->get('post_type') ) $is_main_query = FALSE; | |
return $is_main_query; | |
} |
This file contains hidden or 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 | |
/* | |
Trying to capture text that is wrapped in curly braces (e.g. {example}) | |
Problem: [\S\ ]* would capture multiple tags that are on the same line. | |
*/ | |
preg_match_all("(\{[\S\ ]*\})", $template, $tags); | |
// $tags = "{field=first_name} - {field=last_name}" ] | |
/* |
OlderNewer