Changeset 20029 for trunk/wp-includes/deprecated.php
- Timestamp:
- 02/28/2012 09:24:44 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/deprecated.php
r20000 r20029 2908 2908 _deprecated_function( __FUNCTION__, 'error_log()' ); 2909 2909 } 2910 2911 /** 2912 * Retrieve list of themes with theme data in theme directory. 2913 * 2914 * The theme is broken, if it doesn't have a parent theme and is missing either 2915 * style.css and, or index.php. If the theme has a parent theme then it is 2916 * broken, if it is missing style.css; index.php is optional. 2917 * 2918 * @since 1.5.0 2919 * @global array $wp_themes Stores the working themes. 2920 * 2921 * @return array Theme list with theme data. 2922 */ 2923 function get_themes() { 2924 _deprecated_function( __FUNCTION__, '3.4', 'wp_get_themes()' ); 2925 2926 global $wp_themes; 2927 if ( isset( $wp_themes ) ) 2928 return $wp_themes; 2929 2930 $themes = wp_get_themes(); 2931 $wp_themes = array(); 2932 2933 foreach ( $themes as $theme ) { 2934 $wp_themes[ $theme->get('Name') ] = $theme; 2935 } 2936 2937 return $wp_themes; 2938 } 2939 2940 /** 2941 * Retrieve theme data. 2942 * 2943 * @since 1.5.0 2944 * 2945 * @param string $theme Theme name. 2946 * @return array|null Null, if theme name does not exist. Theme data, if exists. 2947 */ 2948 function get_theme( $theme ) { 2949 _deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme($stylesheet)' ); 2950 2951 $themes = get_themes(); 2952 if ( is_array( $themes ) && array_key_exists( $theme, $themes ) ) 2953 return $themes[$theme]; 2954 return null; 2955 }
Note: See TracChangeset
for help on using the changeset viewer.