Skip to content

Instantly share code, notes, and snippets.

@blueprintmrk
Forked from jdevalk/no-widgets-for-xml.php
Created August 2, 2014 23:50
Show Gist options
  • Save blueprintmrk/873c07445ae608c964fc to your computer and use it in GitHub Desktop.
Save blueprintmrk/873c07445ae608c964fc to your computer and use it in GitHub Desktop.
<?php
if ( isset( $_SERVER['REQUEST_URI'] ) && in_array( substr( $_SERVER['REQUEST_URI'], -4 ), array( '.xml', '.xsl' ) ) ) {
remove_all_actions( 'widgets_init' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment