mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
eliminate warning in global_terms(), global to static, fixes #13517
git-svn-id: https://develop.svn.wordpress.org/trunk@14866 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bae29da10f
commit
9aef526ca3
@ -1209,18 +1209,19 @@ function fix_import_form_size( $size ) {
|
||||
* @return int An ID from the global terms table mapped from $term_id.
|
||||
*/
|
||||
function global_terms( $term_id, $deprecated = '' ) {
|
||||
global $wpdb, $global_terms_recurse;
|
||||
global $wpdb;
|
||||
static $global_terms_recurse;
|
||||
|
||||
if ( !global_terms_enabled() )
|
||||
return $term_id;
|
||||
|
||||
// prevent a race condition
|
||||
$recurse_start = false;
|
||||
if ( !isset( $global_terms_recurse ) ) {
|
||||
$recurse_start = true;
|
||||
$global_terms_recurse = 1;
|
||||
} elseif ( 10 < $global_terms_recurse++ ) {
|
||||
return $term_id;
|
||||
$recurse_start = false;
|
||||
}
|
||||
|
||||
$term_id = intval( $term_id );
|
||||
|
||||
Loading…
Reference in New Issue
Block a user