Rewrite Rules: Check if $wp_rewrite->flush_rules() is callable before calling it in flush_rewrite_rules().
Props bsetiawan88, markjaquith. Fixes #47087. Built from https://develop.svn.wordpress.org/trunk@45699 git-svn-id: http://core.svn.wordpress.org/trunk@45510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -273,7 +273,10 @@ function add_feed( $feedname, $function ) {
|
||||
*/
|
||||
function flush_rewrite_rules( $hard = true ) {
|
||||
global $wp_rewrite;
|
||||
$wp_rewrite->flush_rules( $hard );
|
||||
|
||||
if ( is_callable( array( $wp_rewrite, 'flush_rules' ) ) ) {
|
||||
$wp_rewrite->flush_rules( $hard );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user