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 | |
$request = strtok( substr_replace( $_SERVER['REQUEST_URI'], '', 0, strlen( dirname( $_SERVER['PHP_SELF'] ) ) ), '.' ); | |
$r_parts = array_values( array_filter( explode( '/', $request ) ) ); | |
if ( empty( $r_parts[0] ) ) { | |
http_response_code( 400 ); | |
exit; | |
} |
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 | |
/** | |
* Plugin Name: Search Canonical Push for Google Analytics | |
* Plugin URI: https://theseoframework.com/ | |
* Description: This plugin adds a small script to Search archives that optimizes the Google Analytics script when using pretty Search links. | |
* Version: 1.0.1 | |
* Author: Sybre Waaijer | |
* Author URI: https://theseoframework.com/ | |
* License: GPLv3 | |
*/ |