Created
September 6, 2023 08:30
-
-
Save rilwis/5ff3b7c1eb8cc19716b8349ea8d58d3a to your computer and use it in GitHub Desktop.
Slim SEO Schema: Remove hash in @id property
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 | |
add_filter( 'slim_seo_schema_graph', function( $graph ) { | |
foreach( $graph as &$schema ) { | |
list( $url ) = explode( '#', $schema['@id'] ); | |
$schema['@id'] = $url; | |
} | |
return $graph; | |
}, 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment