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:
parent
98642b4821
commit
c7493264a4
|
@ -273,7 +273,10 @@ function add_feed( $feedname, $function ) {
|
||||||
*/
|
*/
|
||||||
function flush_rewrite_rules( $hard = true ) {
|
function flush_rewrite_rules( $hard = true ) {
|
||||||
global $wp_rewrite;
|
global $wp_rewrite;
|
||||||
|
|
||||||
|
if ( is_callable( array( $wp_rewrite, 'flush_rules' ) ) ) {
|
||||||
$wp_rewrite->flush_rules( $hard );
|
$wp_rewrite->flush_rules( $hard );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3-alpha-45698';
|
$wp_version = '5.3-alpha-45699';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue