-
-
Save kurtpayne/f87498aaf0a4dda82261 to your computer and use it in GitHub Desktop.
Customize P3's Auto Scan URLs
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 | |
/* | |
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