Rewrite Rules: Check if $wp_rewrite->flush_rules()
is callable before calling it in flush_rewrite_rules()
.
Props bsetiawan88, markjaquith. Fixes #47087. git-svn-id: https://develop.svn.wordpress.org/trunk@45699 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
aee18a2e09
commit
da0f9cd6fb
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user