~canonical-sysadmins/wordpress/3.9.x

« back to all changes in this revision

Viewing changes to wp-includes/deprecated.php

  • Committer: Andrew Glen-Young
  • Date: 2011-03-08 14:47:51 UTC
  • Revision ID: andrew.glen-young@canonical.com-20110308144751-1n6spqgayztf9h77
[AGY] import 3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
164
164
 * @see next_post_link()
165
165
 *
166
166
 * @param string $format
167
 
 * @param string $previous
 
167
 * @param string $next
168
168
 * @param string $title
169
169
 * @param string $in_same_cat
170
 
 * @param int $limitprev
 
170
 * @param int $limitnext
171
171
 * @param string $excluded_categories
172
172
 */
173
173
function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
430
430
 * @return bool|null
431
431
 */
432
432
function wp_get_linksbyname($category, $args = '') {
433
 
        _deprecated_function(__FUNCTION__, '0.0', 'wp_list_bookmarks()');
 
433
        _deprecated_function(__FUNCTION__, '2.1', 'wp_list_bookmarks()');
434
434
 
435
435
        $defaults = array(
436
436
                'after' => '<br />',
872
872
 * @deprecated Use the_permalink_rss()
873
873
 * @see the_permalink_rss()
874
874
 *
875
 
 * @param string $file
 
875
 * @param string $deprecated
876
876
 */
877
877
function permalink_single_rss($deprecated = '') {
878
 
        _deprecated_function( __FUNCTION__, '0.0', 'the_permalink_rss()' );
 
878
        _deprecated_function( __FUNCTION__, '2.3', 'the_permalink_rss()' );
879
879
        the_permalink_rss();
880
880
}
881
881
 
892
892
 * @return null|string
893
893
 */
894
894
function wp_get_links($args = '') {
895
 
        _deprecated_function( __FUNCTION__, '0.0', 'wp_list_bookmarks()' );
 
895
        _deprecated_function( __FUNCTION__, '2.1', 'wp_list_bookmarks()' );
896
896
 
897
897
        if ( strpos( $args, '=' ) === false ) {
898
898
                $cat_id = $args;
2035
2035
        return apply_filters('attachment_innerHTML', $innerHTML, $post->ID);
2036
2036
}
2037
2037
 
2038
 
/*
 
2038
/**
2039
2039
 * Retrieve bookmark data based on ID.
2040
2040
 *
2041
2041
 * @since 2.0.0
2296
2296
        else
2297
2297
                $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) );
2298
2298
 
2299
 
        wp_cache_delete($user_id, 'users');
 
2299
        clean_user_cache( $user_id );
 
2300
        wp_cache_delete( $user_id, 'user_meta' );
2300
2301
 
2301
2302
        if ( $cur && $cur->umeta_id )
2302
2303
                do_action( 'deleted_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value );
2403
2404
        else
2404
2405
                return false;
2405
2406
 
2406
 
        wp_cache_delete($user_id, 'users');
 
2407
        clean_user_cache( $user_id );
 
2408
        wp_cache_delete( $user_id, 'user_meta' );
2407
2409
 
2408
2410
        if ( !$cur )
2409
2411
                do_action( 'added_usermeta', $wpdb->insert_id, $user_id, $meta_key, $meta_value );
2414
2416
}
2415
2417
 
2416
2418
/**
 
2419
 * Get users for the blog.
 
2420
 *
 
2421
 * For setups that use the multi-blog feature. Can be used outside of the
 
2422
 * multi-blog feature.
 
2423
 *
 
2424
 * @since 2.2.0
 
2425
 * @deprecated 3.1.0
 
2426
 * @uses $wpdb WordPress database object for queries
 
2427
 * @uses $blog_id The Blog id of the blog for those that use more than one blog
 
2428
 *
 
2429
 * @param int $id Blog ID.
 
2430
 * @return array List of users that are part of that Blog ID
 
2431
 */
 
2432
function get_users_of_blog( $id = '' ) {
 
2433
        _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
 
2434
 
 
2435
        global $wpdb, $blog_id;
 
2436
        if ( empty($id) )
 
2437
                $id = (int) $blog_id;
 
2438
        $blog_prefix = $wpdb->get_blog_prefix($id);
 
2439
        $users = $wpdb->get_results( "SELECT user_id, user_id AS ID, user_login, display_name, user_email, meta_value FROM $wpdb->users, $wpdb->usermeta WHERE {$wpdb->users}.ID = {$wpdb->usermeta}.user_id AND meta_key = '{$blog_prefix}capabilities' ORDER BY {$wpdb->usermeta}.user_id" );
 
2440
        return $users;
 
2441
}
 
2442
 
 
2443
/**
2417
2444
 * Enable/disable automatic general feed link outputting.
2418
2445
 *
2419
2446
 * @since 2.8.0
2534
2561
        _deprecated_function( __FUNCTION__, '3.0', 'term_exists()' );
2535
2562
        return term_exists( $term, $taxonomy, $parent );
2536
2563
}
 
2564
 
 
2565
/**
 
2566
 * Is the current admin page generated by a plugin?
 
2567
 *
 
2568
 * @since 1.5.0
 
2569
 * @deprecated 3.1
 
2570
 * @deprecated Use global $plugin_page and/or get_plugin_page_hookname() hooks.
 
2571
 *
 
2572
 * @global $plugin_page
 
2573
 *
 
2574
 * @return bool
 
2575
 */
 
2576
function is_plugin_page() {
 
2577
        _deprecated_function( __FUNCTION__, '3.1'  );
 
2578
 
 
2579
        global $plugin_page;
 
2580
 
 
2581
        if ( isset($plugin_page) )
 
2582
                return true;
 
2583
 
 
2584
        return false;
 
2585
}
 
2586
 
 
2587
/**
 
2588
 * Update the categories cache.
 
2589
 *
 
2590
 * This function does not appear to be used anymore or does not appear to be
 
2591
 * needed. It might be a legacy function left over from when there was a need
 
2592
 * for updating the category cache.
 
2593
 *
 
2594
 * @since 1.5.0
 
2595
 * @deprecated 3.1
 
2596
 *
 
2597
 * @return bool Always return True
 
2598
 */
 
2599
function update_category_cache() {
 
2600
        _deprecated_function( __FUNCTION__, '3.1'  );
 
2601
 
 
2602
        return true;
 
2603
}
 
2604