wpseek.com
A WordPress-centric search engine for devs and theme authors
wp_get_global_settings › WordPress Function
Since5.9.0
Deprecatedn/a
› wp_get_global_settings ( $path = array(), $context = array() )
Parameters: (2) |
|
Returns: |
|
Defined at: | |
Codex: |
Function to get the settings resulting of merging core, theme, and user data.
Related Functions: wp_get_global_styles, wp_get_global_stylesheet, wp_set_all_user_settings, get_settings, get_all_user_settings
Source
function wp_get_global_settings( $path = array(), $context = array() ) { if ( ! empty( $context['block_name'] ) ) { $path = array_merge( array( 'blocks', $context['block_name'] ), $path ); } $origin = 'custom'; if ( isset( $context['origin'] ) && 'base' === $context['origin'] ) { $origin = 'theme'; } $settings = WP_Theme_JSON_Resolver::get_merged_data( $origin )->get_settings(); return _wp_array_get( $settings, $path, $settings ); }