Skip to content

Instantly share code, notes, and snippets.

@kurtpayne
Created November 22, 2012 04:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kurtpayne/f87498aaf0a4dda82261 to your computer and use it in GitHub Desktop.
Save kurtpayne/f87498aaf0a4dda82261 to your computer and use it in GitHub Desktop.
Customize P3's Auto Scan URLs
<?php
/*
Plugin Name: Example plugin
Plugin URI: http://example.com/
Description: Customize the pages scanned by P3's auto scan mode
Author: edwardra3
Version: 1.0
Author URI: http://example.com/
*/
function my_p3_auto_scan_pages( $urls ) {
foreach ( $urls as $k => $v ) {
if ( false !== strpos( $v, '/wp-admin' ) ) {
unset( $urls[ $k ] );
}
}
return $urls;
}
add_filter( 'p3_automatic_scan_urls', 'my_p3_auto_scan_pages', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment