Created
February 26, 2018 12:21
-
-
Save rayrutjes/8c2f9957101e3ea54ac946b8b273e377 to your computer and use it in GitHub Desktop.
Replace domain in Algolia Search plugin for WordPress
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 | |
/** | |
* @version 0.1.0 | |
* Plugin Name: Replace domain in Algolia Search plugin for WordPress | |
*/ | |
function custom_post_shared_attributes( array $shared_attributes ) { | |
$shared_attributes['permalink'] = str_replace( 'admin.rushlimbaugh.com', 'www.rushlimbaugh.com', $shared_attributes['permalink'] ); | |
return $shared_attributes; | |
} | |
add_filter( 'algolia_post_shared_attributes', 'custom_post_shared_attributes' ); | |
add_filter( 'algolia_searchable_post_shared_attributes', 'custom_post_shared_attributes' ); | |
add_filter( 'algolia_term_record', 'custom_post_shared_attributes' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment