Changeset 18597 for trunk/wp-includes/deprecated.php
- Timestamp:
- 08/24/2011 07:32:59 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/deprecated.php
r18498 r18597 2628 2628 function wp_default_editor() { 2629 2629 _deprecated_function( __FUNCTION__, '3.3' ); 2630 2630 2631 2631 global $wp_editor; 2632 2632 if ( !is_a($wp_editor, 'WP_Editor') ) { … … 2634 2634 $wp_editor = new WP_Editor; 2635 2635 } 2636 2636 2637 2637 return $wp_editor->wp_default_editor(); 2638 2638 } … … 2642 2642 * 2643 2643 * @since 2.1.0 2644 * @deprecated 3.3 2644 * @deprecated 3.3 2645 2645 * 2646 2646 * @param string $content Textarea content. … … 2651 2651 */ 2652 2652 function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) { 2653 2653 2654 2654 wp_editor( $content, $id, array( 'media_buttons' => $media_buttons ) ); 2655 2655 return; 2656 2656 } 2657 2657 2658 /** 2659 * Perform the query to get the $metavalues array(s) needed by _fill_user and _fill_many_users 2660 * 2661 * @since 3.0.0 2662 * @param array $ids User ID numbers list. 2663 * @return array of arrays. The array is indexed by user_id, containing $metavalues object arrays. 2664 */ 2665 function get_user_metavalues($ids) { 2666 _deprecated_function( __FUNCTION__, '3.3' ); 2667 2668 $objects = array(); 2669 2670 $ids = array_map('intval', $ids); 2671 foreach ( $ids as $id ) 2672 $objects[$id] = array(); 2673 2674 $metas = update_meta_cache('user', $ids); 2675 2676 foreach ( $metas as $id => $meta ) { 2677 foreach ( $meta as $key => $metavalues ) { 2678 foreach ( $metavalues as $value ) { 2679 $objects[$id][] = (object)array( 'user_id' => $id, 'meta_key' => $key, 'meta_value' => $value); 2680 } 2681 } 2682 } 2683 2684 return $objects; 2685 } 2686 2687 /** 2688 * Sanitize every user field. 2689 * 2690 * If the context is 'raw', then the user object or array will get minimal santization of the int fields. 2691 * 2692 * @since 2.3.0 2693 * @deprecated 3.3.0 2694 * @uses sanitize_user_field() Used to sanitize the fields. 2695 * 2696 * @param object|array $user The User Object or Array 2697 * @param string $context Optional, default is 'display'. How to sanitize user fields. 2698 * @return object|array The now sanitized User Object or Array (will be the same type as $user) 2699 */ 2700 function sanitize_user_object($user, $context = 'display') { 2701 _deprecated_function( __FUNCTION__, '3.3' ); 2702 2703 if ( is_object($user) ) { 2704 if ( !isset($user->ID) ) 2705 $user->ID = 0; 2706 if ( !is_a( $user, 'WP_User' ) ) { 2707 $vars = get_object_vars($user); 2708 foreach ( array_keys($vars) as $field ) { 2709 if ( is_string($user->$field) || is_numeric($user->$field) ) 2710 $user->$field = sanitize_user_field($field, $user->$field, $user->ID, $context); 2711 } 2712 } 2713 $user->filter = $context; 2714 } else { 2715 if ( !isset($user['ID']) ) 2716 $user['ID'] = 0; 2717 foreach ( array_keys($user) as $field ) 2718 $user[$field] = sanitize_user_field($field, $user[$field], $user['ID'], $context); 2719 $user['filter'] = $context; 2720 } 2721 2722 return $user; 2723 }
Note: See TracChangeset
for help on using the changeset viewer.