Changes in trunk/wp-includes/deprecated.php [19420:21050]
- File:
-
- 1 edited
-
trunk/wp-includes/deprecated.php (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/deprecated.php
r19420 r21050 2030 2030 return $innerHTML; 2031 2031 2032 2033 2032 $innerHTML = esc_attr($post->post_title); 2034 2033 … … 2129 2128 } 2130 2129 } 2131 2132 2130 2133 2131 /** … … 2567 2565 * 2568 2566 * @since 1.5.0 2569 * @deprecated 3.1 2567 * @deprecated 3.1.0 2570 2568 * @deprecated Use global $plugin_page and/or get_plugin_page_hookname() hooks. 2571 2569 * … … 2593 2591 * 2594 2592 * @since 1.5.0 2595 * @deprecated 3.1 2593 * @deprecated 3.1.0 2596 2594 * 2597 2595 * @return bool Always return True … … 2607 2605 * 2608 2606 * @since 2.9.0 2609 * @deprecated 3.2 2607 * @deprecated 3.2.0 2610 2608 * 2611 2609 * @return bool … … 2621 2619 * 2622 2620 * @since 2.1.0 2623 * @deprecated 3.3 2621 * @deprecated 3.3.0 2622 * @deprecated Use wp_editor() 2623 * @see wp_editor() 2624 2624 * 2625 2625 * @param string $content Textarea content. … … 2630 2630 */ 2631 2631 function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) { 2632 _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' ); 2632 2633 2633 2634 wp_editor( $content, $id, array( 'media_buttons' => $media_buttons ) ); … … 2639 2640 * 2640 2641 * @since 3.0.0 2642 * @deprecated 3.3.0 2643 * 2641 2644 * @param array $ids User ID numbers list. 2642 2645 * @return array of arrays. The array is indexed by user_id, containing $metavalues object arrays. … … 2671 2674 * @since 2.3.0 2672 2675 * @deprecated 3.3.0 2673 * @uses sanitize_user_field() Used to sanitize the fields.2674 2676 * 2675 2677 * @param object|array $user The User Object or Array … … 2708 2710 * 2709 2711 * @since 2.8.0 2710 * @deprecated 3.3 2712 * @deprecated 3.3.0 2711 2713 * 2712 2714 * @param string $title Optional. Link title format. … … 2748 2750 * 2749 2751 * @since 2.8.0 2750 * @deprecated 3.3 2752 * @deprecated 3.3.0 2751 2753 * 2752 2754 * @param string $title Optional. Link title format. … … 2764 2766 * 2765 2767 * @since 2.8.0 2766 * @deprecated 3.3 2768 * @deprecated 3.3.0 2767 2769 * 2768 2770 * @return string … … 2779 2781 * 2780 2782 * @since 2.8.0 2781 * @deprecated 3.3 2783 * @deprecated 3.3.0 2782 2784 */ 2783 2785 function index_rel_link() { … … 2791 2793 * 2792 2794 * @since 2.8.0 2793 * @deprecated 3.3 2795 * @deprecated 3.3.0 2794 2796 * 2795 2797 * @param string $title Optional. Link title format. … … 2822 2824 * 2823 2825 * @since 2.8.0 2824 * @deprecated 3.3 2826 * @deprecated 3.3.0 2825 2827 */ 2826 2828 function parent_post_rel_link($title = '%title') { … … 2834 2836 * 2835 2837 * @since 3.2.0 2836 * @deprecated 3.3 2838 * @deprecated 3.3.0 2837 2839 */ 2838 2840 function wp_admin_bar_dashboard_view_site_menu( $wp_admin_bar ) { … … 2855 2857 * 2856 2858 * @since MU 2857 * @deprecated 3.3 2859 * @deprecated 3.3.0 2858 2860 * @deprecated Use is_user_member_of_blog() 2859 2861 * @see is_user_member_of_blog() … … 2867 2869 return is_user_member_of_blog( get_current_user_id(), $blog_id ); 2868 2870 } 2871 2872 /** 2873 * Open the file handle for debugging. 2874 * 2875 * @since 0.71 2876 * @deprecated Use error_log() 2877 * @link http://www.php.net/manual/en/function.error-log.php 2878 * @deprecated 3.4.0 2879 */ 2880 function debug_fopen( $filename, $mode ) { 2881 _deprecated_function( __FUNCTION__, 'error_log()' ); 2882 return false; 2883 } 2884 2885 /** 2886 * Write contents to the file used for debugging. 2887 * 2888 * @since 0.71 2889 * @deprecated Use error_log() instead. 2890 * @link http://www.php.net/manual/en/function.error-log.php 2891 * @deprecated 3.4.0 2892 */ 2893 function debug_fwrite( $fp, $string ) { 2894 _deprecated_function( __FUNCTION__, 'error_log()' ); 2895 if ( ! empty( $GLOBALS['debug'] ) ) 2896 error_log( $string ); 2897 } 2898 2899 /** 2900 * Close the debugging file handle. 2901 * 2902 * @since 0.71 2903 * @deprecated Use error_log() 2904 * @link http://www.php.net/manual/en/function.error-log.php 2905 * @deprecated 3.4.0 2906 */ 2907 function debug_fclose( $fp ) { 2908 _deprecated_function( __FUNCTION__, 'error_log()' ); 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 * @deprecated 3.4.0 2920 * @deprecated Use wp_get_themes() 2921 * @see wp_get_themes() 2922 * 2923 * @return array Theme list with theme data. 2924 */ 2925 function get_themes() { 2926 _deprecated_function( __FUNCTION__, '3.4', 'wp_get_themes()' ); 2927 2928 global $wp_themes; 2929 if ( isset( $wp_themes ) ) 2930 return $wp_themes; 2931 2932 $themes = wp_get_themes(); 2933 $wp_themes = array(); 2934 2935 foreach ( $themes as $theme ) { 2936 $name = $theme->get('Name'); 2937 if ( isset( $wp_themes[ $name ] ) ) 2938 $wp_themes[ $name . '/' . $theme->get_stylesheet() ] = $theme; 2939 else 2940 $wp_themes[ $name ] = $theme; 2941 } 2942 2943 return $wp_themes; 2944 } 2945 2946 /** 2947 * Retrieve theme data. 2948 * 2949 * @since 1.5.0 2950 * @deprecated 3.4.0 2951 * @deprecated Use wp_get_theme() 2952 * @see wp_get_theme() 2953 * 2954 * @param string $theme Theme name. 2955 * @return array|null Null, if theme name does not exist. Theme data, if exists. 2956 */ 2957 function get_theme( $theme ) { 2958 _deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme( $stylesheet )' ); 2959 2960 $themes = get_themes(); 2961 if ( is_array( $themes ) && array_key_exists( $theme, $themes ) ) 2962 return $themes[ $theme ]; 2963 return null; 2964 } 2965 2966 /** 2967 * Retrieve current theme name. 2968 * 2969 * @since 1.5.0 2970 * @deprecated 3.4.0 2971 * @deprecated Use (string) wp_get_theme() 2972 * @see wp_get_theme() 2973 * 2974 * @return string 2975 */ 2976 function get_current_theme() { 2977 _deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme()' ); 2978 2979 if ( $theme = get_option( 'current_theme' ) ) 2980 return $theme; 2981 2982 return wp_get_theme()->get('Name'); 2983 } 2984 2985 /** 2986 * Accepts matches array from preg_replace_callback in wpautop() or a string. 2987 * 2988 * Ensures that the contents of a <<pre>>...<</pre>> HTML block are not 2989 * converted into paragraphs or line-breaks. 2990 * 2991 * @since 1.2.0 2992 * @deprecated 3.4.0 2993 * 2994 * @param array|string $matches The array or string 2995 * @return string The pre block without paragraph/line-break conversion. 2996 */ 2997 function clean_pre($matches) { 2998 _deprecated_function( __FUNCTION__, '3.4' ); 2999 3000 if ( is_array($matches) ) 3001 $text = $matches[1] . $matches[2] . "</pre>"; 3002 else 3003 $text = $matches; 3004 3005 $text = str_replace(array('<br />', '<br/>', '<br>'), array('', '', ''), $text); 3006 $text = str_replace('<p>', "\n", $text); 3007 $text = str_replace('</p>', '', $text); 3008 3009 return $text; 3010 } 3011 3012 3013 /** 3014 * Add callbacks for image header display. 3015 * 3016 * @since 2.1.0 3017 * @deprecated 3.4.0 3018 * @deprecated Use add_theme_support('custom-header', $args) 3019 * @see add_theme_support() 3020 * 3021 * @param callback $wp_head_callback Call on 'wp_head' action. 3022 * @param callback $admin_head_callback Call on custom header administration screen. 3023 * @param callback $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional. 3024 */ 3025 function add_custom_image_header( $wp_head_callback, $admin_head_callback, $admin_preview_callback = '' ) { 3026 _deprecated_function( __FUNCTION__, '3.4', 'add_theme_support( \'custom-header\', $args )' ); 3027 $args = array( 3028 'wp-head-callback' => $wp_head_callback, 3029 'admin-head-callback' => $admin_head_callback, 3030 ); 3031 if ( $admin_preview_callback ) 3032 $args['admin-preview-callback'] = $admin_preview_callback; 3033 return add_theme_support( 'custom-header', $args ); 3034 } 3035 3036 /** 3037 * Remove image header support. 3038 * 3039 * @since 3.1.0 3040 * @deprecated 3.4.0 3041 * @deprecated Use remove_theme_support('custom-header') 3042 * @see remove_theme_support() 3043 * 3044 * @return bool Whether support was removed. 3045 */ 3046 function remove_custom_image_header() { 3047 _deprecated_function( __FUNCTION__, '3.4', 'remove_theme_support( \'custom-header\' )' ); 3048 return remove_theme_support( 'custom-header' ); 3049 } 3050 3051 /** 3052 * Add callbacks for background image display. 3053 * 3054 * @since 3.0.0 3055 * @deprecated 3.4.0 3056 * @deprecated Use add_theme_support('custom-background, $args) 3057 * @see add_theme_support() 3058 * 3059 * @param callback $wp_head_callback Call on 'wp_head' action. 3060 * @param callback $admin_head_callback Call on custom background administration screen. 3061 * @param callback $admin_preview_callback Output a custom background image div on the custom background administration screen. Optional. 3062 */ 3063 function add_custom_background( $wp_head_callback = '', $admin_head_callback = '', $admin_preview_callback = '' ) { 3064 _deprecated_function( __FUNCTION__, '3.4', 'add_theme_support( \'custom-background\', $args )' ); 3065 $args = array(); 3066 if ( $wp_head_callback ) 3067 $args['wp-head-callback'] = $wp_head_callback; 3068 if ( $admin_head_callback ) 3069 $args['admin-head-callback'] = $admin_head_callback; 3070 if ( $admin_preview_callback ) 3071 $args['admin-preview-callback'] = $admin_preview_callback; 3072 return add_theme_support( 'custom-background', $args ); 3073 } 3074 3075 /** 3076 * Remove custom background support. 3077 * 3078 * @since 3.1.0 3079 * @see add_custom_background() 3080 * 3081 * @return bool Whether support was removed. 3082 */ 3083 function remove_custom_background() { 3084 _deprecated_function( __FUNCTION__, '3.4', 'remove_theme_support( \'custom-background\' )' ); 3085 return remove_theme_support( 'custom-background' ); 3086 } 3087 3088 /** 3089 * Retrieve theme data from parsed theme file. 3090 * 3091 * @since 1.5.0 3092 * @deprecated 3.4.0 3093 * @deprecated Use wp_get_theme() 3094 * @see wp_get_theme() 3095 * 3096 * @param string $theme_file Theme file path. 3097 * @return array Theme data. 3098 */ 3099 function get_theme_data( $theme_file ) { 3100 _deprecated_function( __FUNCTION__, 3.4, 'wp_get_theme()' ); 3101 $theme = new WP_Theme( basename( dirname( $theme_file ) ), dirname( dirname( $theme_file ) ) ); 3102 3103 $theme_data = array( 3104 'Name' => $theme->get('Name'), 3105 'URI' => $theme->display('ThemeURI', true, false), 3106 'Description' => $theme->display('Description', true, false), 3107 'Author' => $theme->display('Author', true, false), 3108 'AuthorURI' => $theme->display('AuthorURI', true, false), 3109 'Version' => $theme->get('Version'), 3110 'Template' => $theme->get('Template'), 3111 'Status' => $theme->get('Status'), 3112 'Tags' => $theme->get('Tags'), 3113 'Title' => $theme->get('Name'), 3114 'AuthorName' => $theme->get('Author'), 3115 ); 3116 3117 foreach ( apply_filters( 'extra_theme_headers', array() ) as $extra_header ) { 3118 if ( ! isset( $theme_data[ $extra_header ] ) ) 3119 $theme_data[ $extra_header ] = $theme->get( $extra_header ); 3120 } 3121 3122 return $theme_data; 3123 } 3124 3125 /** 3126 * Alias of update_post_cache(). 3127 * 3128 * @see update_post_cache() Posts and pages are the same, alias is intentional 3129 * 3130 * @since 1.5.1 3131 * @deprecated 3.4.0 3132 * 3133 * @param array $pages list of page objects 3134 */ 3135 function update_page_cache( &$pages ) { 3136 _deprecated_function( __FUNCTION__, 3.4, 'update_post_cache()' ); 3137 3138 update_post_cache( $pages ); 3139 } 3140 3141 /** 3142 * Will clean the page in the cache. 3143 * 3144 * Clean (read: delete) page from cache that matches $id. Will also clean cache 3145 * associated with 'all_page_ids' and 'get_pages'. 3146 * 3147 * @since 2.0.0 3148 * @deprecated 3.4.0 3149 * 3150 * @uses do_action() Will call the 'clean_page_cache' hook action. 3151 * 3152 * @param int $id Page ID to clean 3153 */ 3154 function clean_page_cache( $id ) { 3155 _deprecated_function( __FUNCTION__, 3.4, 'clean_post_cache()' ); 3156 3157 clean_post_cache( $id ); 3158 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)