mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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