Changeset 47935
- Timestamp:
- 06/09/2020 03:29:57 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets.php
r47122 r47935 901 901 * @global array $wp_registered_sidebars Registered sidebars. 902 902 * 903 * @return bool True , if using widgets. False, if not using widgets.903 * @return bool True if using widgets, false otherwise. 904 904 */ 905 905 function is_dynamic_sidebar() { 906 906 global $wp_registered_widgets, $wp_registered_sidebars; 907 907 908 $sidebars_widgets = get_option( 'sidebars_widgets' ); 909 908 910 foreach ( (array) $wp_registered_sidebars as $index => $sidebar ) { 909 911 if ( ! empty( $sidebars_widgets[ $index ] ) ) { … … 915 917 } 916 918 } 919 917 920 return false; 918 921 } 919 922 920 923 /** 921 * Determines whether a sidebar is in use.924 * Determines whether a sidebar contains widgets. 922 925 * 923 926 * For more information on this and similar theme functions, check out … … 928 931 * 929 932 * @param string|int $index Sidebar name, id or number to check. 930 * @return bool true if the sidebar is in use, false otherwise.933 * @return bool True if the sidebar has widgets, false otherwise. 931 934 */ 932 935 function is_active_sidebar( $index ) {
Note: See TracChangeset
for help on using the changeset viewer.