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 | |
/** | |
* Disable header links | |
*/ | |
/** | |
* Clean up wp_head() | |
* | |
* Remove unnecessary <link>'s | |
* Remove inline CSS and JS from WP emoji support |
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 | |
//load current cw plus 4 weeks on front page date facet | |
add_filter( 'facetwp_preload_url_vars', function( $url_vars ) { | |
if ( '' == FWP()->helper->get_uri() ) {//frontpage | |
if ( empty( $url_vars['date_facet'] ) ) { | |
$week = date("W"); | |
$year = date("Y"); | |
$start_day = date("Y-m-d", strtotime("{$year}-W{$week}-1"));//return monday of this week | |
$end_day = date("Y-m-d", strtotime("{$year}-W{$week}-7 +3 weeks")); //return sunday in 4 weeks | |
//error_log($start_day); |
OlderNewer