Changeset 54240 for trunk/src/wp-includes/functions.php
- Timestamp:
- 09/20/2022 02:49:25 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r54233 r54240 6221 6221 6222 6222 /** 6223 * Determines whether global terms are enabled.6224 *6225 * @since 3.0.06226 *6227 * @return bool True if multisite and global terms enabled.6228 */6229 function global_terms_enabled() {6230 if ( ! is_multisite() ) {6231 return false;6232 }6233 6234 static $global_terms = null;6235 if ( is_null( $global_terms ) ) {6236 6237 /**6238 * Filters whether global terms are enabled.6239 *6240 * Returning a non-null value from the filter will effectively short-circuit the function6241 * and return the value of the 'global_terms_enabled' site option instead.6242 *6243 * @since 3.0.06244 *6245 * @param null $enabled Whether global terms are enabled.6246 */6247 $filter = apply_filters( 'global_terms_enabled', null );6248 if ( ! is_null( $filter ) ) {6249 $global_terms = (bool) $filter;6250 } else {6251 $global_terms = (bool) get_site_option( 'global_terms_enabled', false );6252 }6253 }6254 return $global_terms;6255 }6256 6257 /**6258 6223 * Determines whether site meta is enabled. 6259 6224 *
Note: See TracChangeset
for help on using the changeset viewer.